Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable backward-cpp #1

Merged
merged 2 commits into from
Jun 19, 2023
Merged

feat: enable backward-cpp #1

merged 2 commits into from
Jun 19, 2023

Conversation

fzakaria
Copy link
Owner

This enabled the repository backward-cpp for this repository.
It does so by adding: elfutils (libelf) + libdwarf.

Extra care was taken for libdwarf because recent versions have changed the API unfortunately as seen in bombela/backward-cpp#298

❯ ./bazel-bin/third_party/backward-cpp/suicide
Running suicide application
Stack trace (most recent call last):
#3    Object "/usr/local/google/home/fmzakari/.cache/bazel/_bazel_fmzakari/2ed7345d389cf32aae8898775744d0ac/execroot/__main__/bazel-out/k8-dbg/bin/third_party/backward-cpp/suicide", at 0x26902d, in 
#2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f12a63f2244, in __libc_start_main
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f12a63f2189, in 
#0    Source "/proc/self/cwd/third_party/backward-cpp/suicide.cc", line 9, in int main() [0x26912f]
          6: int main() {
          7:   std::cout << "Running suicide application" << std::endl;
          8:   int* ptr = nullptr;
      >   9:   *ptr += 1;
         10:   return 0;
         11: }
Segmentation fault (Address not mapped to object [(nil)])
[1]    3672545 segmentation fault  ./bazel-bin/third_party/backward-cpp/suicide

(it has nice coloring)

@fzakaria fzakaria merged commit 117f002 into main Jun 19, 2023
@fzakaria fzakaria deleted the backward-cpp branch June 19, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant