From referenced bug: When stepping into new functions on i386, the frame being stepped from may dissapear during the first instruction of that stack frame. The frame then reappears on subsequent steps. I'll attach the source of a test program and its assembly. Stepping into 'jump()' from 'foo()' results in the stack trace missing frame 'foo()' on the first instruction of the new frame.
Created attachment 148454 [details] Test program
Created attachment 148455 [details] gcc -S -g stepper.c
Problem is that -fasynchronous-unwind-tables is not default on i?86 and so .eh_frame is not present there. .eh_frame is the only unwind information currently supported by libunwind. GDB supports also .debug_frame (generated by -g) and so it handles the case without problem. libunwind supports heuristics for unwinding without .eh_frame in general cases (function bodies) but it fails in the prologue as was reported here. libunwind support for .debug_frame has been discussed at: http://lists.gnu.org/archive/html/libunwind-devel/2007-02/msg00000.html Considering this Bug as a tracker for libunwind based on elfutils unwinding method.
Created attachment 149211 [details] Implementation (v2). Currently it passes the testsuite (tested on x86) with some exceptions below. Performance looks as a bit lower but it was not investigated so far. Code could be cleaned up a bit but some David Mosberger-Tang internal API advices could be helpful.
Bug 230903: FEAT: dwfl_module_addrname() should also return lowpc+highpc results in this current libunwind-using-elfutils testsuite regression: Backtrace does not match on level==7, want "_start+", got "_start" FAILURE: detected 1 errors FAIL: run-ptrace-stepper Backtrace does not match on level==5, want "_start+", got "_start" FAILURE: detected 1 errors Backtrace does not match on level==5, want "_start+", got "_start" FAILURE: detected 1 errors Backtrace does not match on level==5, want "_start+", got "_start" FAILURE: detected 1 errors Backtrace does not match on level==5, want "_start+", got "_start" FAILURE: detected 1 errors XFAIL: run-ptrace-signull
Implementation currently needs for VDSO symbols resolving a kernel workaround Bug 230850: [kernel] /proc/PID/mem is not readable implemented to elfutils; needed on kernel-xen-2.6.19-1.2898.2.3.fc7.i686. Some unlisted libunwind-using-elfutils testsuite regressions apply otherwise.
Implementation currently recommends to rather use an elfutils bugfix Bug 230793: File descriptors leakage Some unlisted libunwind-using-elfutils testsuite regressions apply otherwise (the regressions may no longer be true as elfutils caching is now implemented).
Created attachment 149409 [details] Implementation (v4). npremji: Tested/bugfixed now also on x86_64. It should be usable with elfutils-0.126-1 (only Bug 230793 fix is recommended).
NEEDINFO(npremji) as a dependency on his work-in-progress libunwind changes as there may be conflicts of these two patches. This patch should get applied after his one gets applied. This patch (of Comment 8) should also get ported to elfutils-0.127-1 finally fixing Bug 230903 needing the patch update. It also fixes Bug 230793 referenced in Comment 8.
(In reply to comment #9) My patches are mostly in, with maybe a few bugfixes to follow.
Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
This bug has been in NEEDINFO for more than 30 days since feedback was first requested. As a result we are closing it. If you can reproduce this bug in the future against a maintained Fedora version please feel free to reopen it against that version. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp