public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/17547] New: over-eager debuginfo reading
@ 2014-11-04 15:59 tromey at sourceware dot org
  2021-05-25 19:15 ` [Bug symtab/17547] " fche at redhat dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2014-11-04 15:59 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-01-05  1:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-04 15:59 [Bug symtab/17547] New: over-eager debuginfo reading tromey at sourceware dot org
2021-05-25 19:15 ` [Bug symtab/17547] " fche at redhat dot com
2021-05-25 19:18 ` cbiesinger at google dot com
2021-05-25 19:19 ` fche at redhat dot com
2021-05-25 19:44 ` simark at simark dot ca
2021-05-25 19:50 ` fche at redhat dot com
2021-05-25 20:21 ` keiths at redhat dot com
2021-05-25 21:24 ` tromey at sourceware dot org
2021-05-26  1:49 ` rfhn.fhbrrjnzeneqpf at noclue dot notk.org
2023-01-01 22:24 ` tromey at sourceware dot org
2023-01-03 23:02 ` amerey at redhat dot com
2023-01-04  2:03 ` tromey at sourceware dot org
2023-01-05  1:16 ` amerey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).