backward-cpp icon indicating copy to clipboard operation
backward-cpp copied to clipboard

ARM and -funwind-tables gcc option

Open kiranpradeep opened this issue 8 years ago • 2 comments

We needed -funwind-tables option on ARM processors to get backtrace. Could that be added to CMakeLists.txt conditionally for ARM ?

kiranpradeep avatar Nov 30 '16 05:11 kiranpradeep

I am sure it is doable, there must be a way to add computer flags based in compilers & platforms. Pull requests are welcome :)

On Tue, Nov 29, 2016, 21:34 Kiran Pradeep [email protected] wrote:

We needed -funwind-tables option on ARM processors to get backtrace. Could that be added to CMakeLists.txt conditionally for ARM ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bombela/backward-cpp/issues/48, or mute the thread https://github.com/notifications/unsubscribe-auth/AANMjANZxooJMJqKkjJB0UvjsXeeZMm-ks5rDQrWgaJpZM4K_0lV .

bombela avatar Nov 30 '16 05:11 bombela

Hi so i am using nvidia-jetson nano arm64 i have tried a lot of things for showing a complete stacktrace but all ended up in vain:

Running sample bracktrace_test on x86_64:

$ g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname --operating-system  --kernel-name --kernel-release --hardware-platform --processor
Linux 4.15.0-65-generic x86_64 x86_64 GNU/Linux

$ g++ -g -rdynamic backward.hpp backtrace_test.cpp -o backtrace_test -ldw
$ ./backtrace_test

x86_64 stacktrace 2

Running same sample bracktrace_test on nano arm64:

$ g++ --version
g++ (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname --operating-system  --kernel-name --kernel-release --hardware-platform --processor
Linux 4.9.140-tegra aarch64 aarch64 GNU/Linux

$  g++ -g -rdynamic -funwind-tables -fasynchronous-unwind-tables backward.hpp backtrace_test.cpp  -o backtrace_test -ldw

$ ./backtrace_test

aarch64 stacktrace

on Stackoverflow

HarrisDePerceptron avatar Oct 30 '19 05:10 HarrisDePerceptron