This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

backtrace/1545: can't backtrace through signal handler


>Number:         1545
>Category:       backtrace
>Synopsis:       can't backtrace through signal handler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 06 19:18:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     carlton@kealia.com
>Release:        GNU gdb 2004-01-26-cvs
>Organization:
>Environment:
Red Hat 7.3, any GCC.
>Description:
Ever since we switched over to the DWARF 2 unwinder,
I've been having a problem backtracing through signal
handlers.  If you compile the attached program and run
it, you'll get a core dump; with current GDB, I then get:

quartette$ gdb-mainline a.out core.12434
GNU gdb 2004-01-26-cvs
...
(gdb) bt
#0  0x42029331 in kill () from /lib/i686/libc.so.6
#1  0x4202911a in raise () from /lib/i686/libc.so.6
#2  0x4202a8c2 in abort () from /lib/i686/libc.so.6
#3  0x0804848b in sigsegv_handler ()
#4  <signal handler called>
#5  0x00000000 in ?? ()

whereas with GDB 5.3 I got:

quartette$ /usr/bin/gdb a.out core.12434
GNU gdb Red Hat Linux (5.3-1)
...
(gdb) bt
#0  0x42029331 in kill () from /lib/i686/libc.so.6
#1  0x4202911a in raise () from /lib/i686/libc.so.6
#2  0x4202a8c2 in abort () from /lib/i686/libc.so.6
#3  0x0804848b in sigsegv_handler ()
#4  <signal handler called>
#5  0x080484fe in main ()
#6  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

I've seen this on Red Hat 7.3 and on Red Hat 8.0 (though,
in the latter case, we don't get frame #5 in the first
backtrace); I haven't tried a more recent OS/libc yet.
>How-To-Repeat:
Compile the attached program, run it, run GDB on
the resulting core file and do a backtrace.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="backtrace.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="backtrace.c"

I2luY2x1ZGUgPHNpZ25hbC5oPgoKdm9pZCBzaWdzZWd2X2hhbmRsZXIoIGludCBuLCBzaWdpbmZv
X3QgKmluZm8sIHZvaWQgKnB0ciApIHsKICAgIGFib3J0KCk7Cn0KCnZvaWQgaW5zdGFsbF9zaWdu
YWxfaGFuZGxlcigpIHsKICAgIHN0cnVjdCBzaWdhY3Rpb24gc2lndmFjdGlvbjsKICAgIHNpZ3Zh
Y3Rpb24uc2FfaGFuZGxlciA9IDA7CiAgICBzaWd2YWN0aW9uLnNhX3NpZ2FjdGlvbiA9ICZzaWdz
ZWd2X2hhbmRsZXI7CiAgICBzaWdlbXB0eXNldCggJnNpZ3ZhY3Rpb24uc2FfbWFzayApOwogICAg
c2lndmFjdGlvbi5zYV9mbGFncyA9IFNBX1NJR0lORk8gfCBTQV9SRVNFVEhBTkQ7CiAgICBzaWdh
Y3Rpb24oIFNJR1NFR1YsICZzaWd2YWN0aW9uLCAwICk7Cn0KCmludCAqemVybygpIHsKICAgIHJl
dHVybiAwOwp9CgppbnQgbWFpbigpIHsKICAgIGluc3RhbGxfc2lnbmFsX2hhbmRsZXIoKTsKCiAg
ICAqKCB6ZXJvKCkgKSA9IDE7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]