[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing backtrace information on aarch64

From: Phil Reid
Subject: Re: Missing backtrace information on aarch64
Date: Thu, 19 Mar 2020 09:09:36 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 19/03/2020 08:57, Stephen Hemminger wrote:
On Thu, 19 Mar 2020 08:34:35 +0800
Phil Reid <address@hidden> wrote:

On 19/03/2020 01:45, Stephen Hemminger wrote:
Trying to use libunwind on Arm64 and discovered that it is not working
as expected. Only one function is printed.

On x86 Debian 10 (1.2.1-9)
$ ./bt
^\Signal Quit recevied
#0 0x5640deb47308 (sigquit+0x29)
#1 0x7f4337b8587f (killpg+0x40)
#2 0x7f4337c146f4 (nanosleep+0x14)
#3 0x7f4337c1462a (sleep+0x3a)
#4 0x5640deb4732c (main+0x1f)
#5 0x7f4337b7209b (__libc_start_main+0xeb)
#6 0x564

On Arm64

# /tmp/bt
^\Signal Quit recevied
#0 0xab9f2f927bf0 (sigquit+0x34)
Aborted (core dumped)

I patched gcc libs with the following for an 32bit arm system to get more 
complete backtraces.

diff -Naur a/libsupc++/ b/libsupc++/
--- a/libstdc++-v3/libsupc++/    2019-02-28 14:31:50.951261183 
+++ b/libstdc++-v3/libsupc++/    2019-02-28 14:32:42.040396849 
@@ -40,7 +40,7 @@
   using namespace __cxxabiv1;

-__cxxabiv1::__terminate (std::terminate_handler handler) throw ()
+__cxxabiv1::__terminate (std::terminate_handler handler)
diff -Naur a/libsupc++/unwind-cxx.h b/libsupc++/unwind-cxx.h
--- a/libstdc++-v3/libsupc++/unwind-cxx.h       2019-02-28 14:31:50.949253953 
+++ b/libstdc++-v3/libsupc++/unwind-cxx.h       2019-02-28 14:32:53.073426806 
@@ -189,8 +189,7 @@

   // Invokes given handler, dying appropriately if the user handler was
   // so inconsiderate as to return.
-extern void __terminate(std::terminate_handler) throw ()
-  __attribute__((__noreturn__));
+extern void __terminate(std::terminate_handler);
   extern void __unexpected(std::unexpected_handler)

But gcc backtrace already works on this platform, I am confused.

Do you me gdb backtrace or the gcc builtin functions?
gdb worked for me ok as well before the patch.

Any which way that's what I had to do.
I think the noreutrn attribute results in something getting
missed thats required for libunwind.

Phil Reid

reply via email to

[Prev in Thread] Current Thread [Next in Thread]