When running user-mode Linux under gdb in Red Hat 8.0, I am unable to get a stack trace that goes back before a signal handler runs. Only the functions called from the signal handler (in this case, |segv| and |panic|) are visible when stopped at a breakpoint in |panic|. Manual walking of $ebp will let me find calling PCs, so the stack hasn't been trashed. I've tried with both gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110) and gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) with similar results. I will try to find time to try with a RH7.3-era gdb to see if the results are different. The user-mode Linux in question is built from the Red Hat 2.4.18-14 kernel, with some VFS patches. gdb-5.2.1-4
Could you attach a copy of gdb's backtrace output? I suspect this is a known bug, and it is being fixed in the FSF gdb development branch. Thanks Elena
Now that I've started using the compat-gcc-7.3 gcc to build my kernel, the problem has gone away. I can try to restore the old setup, if you really need me too, but the stack trace would look very much like: (gdb) bt #0 0xdeadbeef in panic (args to panic) at panic_source.c:42 #1 0xcafebabe in segv (args to segv) at segv_source.c:1977 (gdb) Trying to go up from frame 1 would tell me (gdb) up Initial frame selected; you cannot go up. I'll try a build with 3.2 this weekend, once I'm finished with my current development task.
Thanks, could I also bribe you in trying the current FSF gdb on sources.redhat.com/gdb? A fix was recently checked in for this problem. (Ignore the 5.3 branch). Elena
Sure. Once I've torched my development environment, I don't mind dancing on the ashes. =) Can I just grab a today-or-later snapshot, or should I really pull from CVS?
The snapshots should be ok.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-126.html