libunwind-devel
[Top][All Lists]
Advanced

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

Re: [libunwind] Unwind information caching for x86-64


From: Arun Sharma
Subject: Re: [libunwind] Unwind information caching for x86-64
Date: Tue, 21 Feb 2006 09:46:13 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051011)

rajagopal, dwarak wrote:
Great work! Now that libunwind should work well for static unwinding in
x86_64, I'm eager to know on how it works for dynamic unwinding. It
right now fails for Ltest-dyn1 and Gtest-dyn1. It fails - "FAILURE: expected 13, not 4 frames below signal frame". I
couldn't find code for dynamic unwinding in x86_64 source dir. Is that
still to be implemented or am I missing something? (I do see registering
canceling in mi/ dir) If yes, can anybody give me clues on what part is
to be implemented still?


After this patch:

diff -r 05da4d2940ca tests/Gtest-dyn1.c
--- a/tests/Gtest-dyn1.c        Wed Feb 15 06:38:44 2006
+++ b/tests/Gtest-dyn1.c        Tue Feb 21 09:42:48 2006
@@ -95,9 +95,12 @@
   unw_getcontext (&uc);
   unw_init_local (&cursor, &uc);

-  while (!unw_is_signal_frame (&cursor))
+  while (!unw_is_signal_frame (&cursor)) {
     if (unw_step (&cursor) < 0)
       panic ("failed to find signal frame!\n");
+    unw_get_reg (&cursor, UNW_REG_IP, &ip);
+    printf ("ip = %lx\n", (long) ip);
+  }
   unw_step (&cursor);

   do

I get:

$ ./Ltest-dyn1 -v
old code @ 0x400ec0, new code @ 0x517010
iteration ii
iteration iii
iteration iv
iteration v
iteration vi
iteration vii
iteration viii
iteration ix
iteration x
caught signal 11
ip = 2aaaaabf09e0
ip = 0
Segmentation fault

So unwinding across signal frames and dynamically generated code (think JIT'ed code) is not working too well.

Unwinding in dynamically linked binaries should be working ok.

        -Arun

reply via email to

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