From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12406 invoked by alias); 4 Nov 2014 15:59:46 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 12345 invoked by uid 48); 4 Nov 2014 15:59:45 -0000 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/17547] New: over-eager debuginfo reading Date: Tue, 04 Nov 2014 15:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q4/txt/msg00185.txt.bz2 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.