[Bug gdb/12130] New: gdb: backtrace on stripped binary much slower than on binary with debug info

edwintorok at gmail dot com sourceware-bugzilla@sourceware.org
Mon Oct 18 13:19:00 GMT 2010


           Summary: gdb: backtrace on stripped binary much slower than on
                    binary with debug info
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: edwintorok@gmail.com

It takes 5 seconds to unwind the entire stack for the following testcase (quite
good), but it takes 45 seconds if the binary is stripped.

This is on x86-64, so gdb should be using the async unwind tables in both
cases, not sure why in the 2nd case this is slow.

Original scenario where bug was encountered:
 - main app compiled with debug info
 - library stripped
 - infinite recursion in library
 - run 'bt -16' to see beginning of infinite recursion
 - had to wait a few minutes, and each time I thought I fixed it, I've rerun
it, and had to wait a few more minutes, and so on

If gdb can get a fast(er) backtrace with debug info, it should be able with not
debug info too.

gdb --version
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:

cat >x.c <<EOF
int foo()
int main()

gcc -g x.c -o a.out
echo "With debug info:"
time gdb --batch-silent -ex run -ex 'bt -16' ./a.out
echo "Without debug info (stripped):"
strip a.out
time gdb --batch-silent -ex run -ex 'bt -16' ./a.out

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the Gdb-prs mailing list