This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug symtab/17547] New: over-eager debuginfo reading


https://sourceware.org/bugzilla/show_bug.cgi?id=17547

            Bug ID: 17547
           Summary: over-eager debuginfo reading
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org

I'm doing multi-inferior debugging of firefox.

I started gdb and did "catch exec".  Then I "ran".

Here is some output from just before the catchpoint
triggers:

[New inferior 19343]
[New process 19343]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Reading symbols from
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/libmozsandbox.so...done.
Reading symbols from
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/libnspr4.so...done.
Reading symbols from
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/libplc4.so...done.
[...]
Catchpoint 1 (exec'd
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/plugin-container),
0x00007ffff7dde1f0 in _start () from /lib64/ld-linux-x86-64.so.2


I think what is happening here is that gdb is reading the debuginfo
for the newly fork()d inferior.  Then it proceeds to discard it all
again when the inferior exec()s.  (And in my case, since the subprocess
execs firefox with different arguments, it actually re-reads it all
once again...)

This is pretty inefficient, especially with a large program like firefox.
Reading all the debuginfo is on the order of 10 seconds -- a noticeable
hiccup in the debug session.

While the long term fix is address-space-independence, perhaps a
short-term solution can be found as well.  It seems to me that in
the fork case, the shared libraries cannot be further relocated, so
perhaps some way of sharing debuginfo across inferiors could be found.
For example, an objfile could appear in multiple address spaces (or program
spaces?  I never keep those straight).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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