From: Jim Blandy <jimb@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: Daniel Jacobowitz <drow@mvista.com>,
Eli Zaretskii <eliz@elta.co.il>,
gdb-patches@sources.redhat.com
Subject: Re: [RFC/dwarf-2] Add support for included files
Date: Wed, 07 Apr 2004 16:05:00 -0000 [thread overview]
Message-ID: <vt2d66jdbd8.fsf@zenia.home> (raw)
Picking up a dropped thread from January:
http://sources.redhat.com/ml/gdb-patches/2004-01/msg00015.html
Some comments:
It's fine for GDB core code to assume that the psymtabs mention every
source file in the program. They're supposed to. The whole purpose
of the psymtabs is to act as an index for the full symbol information,
so that without taking the time/memory to read full symbols, we can at
least find the compilation unit we do need to read. If that index
doesn't mention a source file, then it's incomplete.
I'm not too enthusiastic about Eli's suggestion that we put off
scanning for source file names until we get a filename we can't find.
It would help: we can find source files most of the time already, and
when the second scan was needed, it wouldn't be any more work than
what Joel's proposing we do every time. But it's adding a third phase
to debug reading; I'd prefer to fix this problem without architectural
changes like that, if it's practical.
The original motivation for introducing psymtabs at all was speed:
GDB's startup time was, believe it or not, CPU-bound. By constructing
only partial symtabs at startup time, we avoided parsing types
(essentially). How does this patch affect the time GDB takes to start
up on itself? (If you had some monster program lying around, that
would be better, but if all we've got is a brute...)
If it makes a big speed difference, then let's try ignoring
DW_LNE_define_file, not scanning the line number program, and just
entering the files given in the file_names table as psymtabs. GCC
doesn't generate DW_LNE_define_file. If that is much faster, then I
think it'll be okay.
(It's interesting to note that, since DW_LNE_define_file exists, the
mechanisms Dwarf 3 provides for "accelerated access" are insufficient:
there's no way to build a complete index of source file names without
reading the line tables.)
next reply other threads:[~2004-04-07 16:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 16:05 Jim Blandy [this message]
2004-04-13 5:20 ` Joel Brobecker
2004-04-14 19:10 ` Jim Blandy
2004-04-15 22:13 ` Joel Brobecker
2004-04-16 4:24 ` Jim Blandy
2004-04-16 4:28 ` Joel Brobecker
2004-04-16 23:08 ` Joel Brobecker
2004-04-29 23:32 ` Jim Blandy
2004-05-01 1:14 ` Joel Brobecker
2004-05-01 4:57 ` Jim Blandy
2004-05-03 16:25 ` Joel Brobecker
-- strict thread matches above, loose matches on Subject: below --
2004-05-03 22:15 Andrew Pinski
2004-05-04 0:15 ` Joel Brobecker
2004-05-04 0:18 ` Andrew Pinski
2004-01-02 7:25 Joel Brobecker
2004-01-02 14:18 ` Daniel Jacobowitz
2004-01-03 14:42 ` Joel Brobecker
2004-01-03 16:34 ` Eli Zaretskii
2004-01-03 17:47 ` Joel Brobecker
2004-01-02 14:45 ` Eli Zaretskii
2004-01-05 16:18 ` Andrew Cagney
2004-01-05 19:17 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vt2d66jdbd8.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=brobecker@gnat.com \
--cc=drow@mvista.com \
--cc=eliz@elta.co.il \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox