This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Speed up find_pc_section
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, Tom Tromey <tromey at redhat dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Fri, 11 Sep 2009 01:33:02 -0700
- Subject: Re: [patch] Speed up find_pc_section
- References: <8ac60eac0908201340k6b759eb5o9bb73c8f473d8785@mail.gmail.com> <200908211130.n7LBUCJc011108@d12av02.megacenter.de.ibm.com> <8ac60eac0908231548x135edf2doa04fa59a49455bcd@mail.gmail.com> <8ac60eac0908260020l4200cf84v2686a76b5858d13@mail.gmail.com> <20090909055824.GB11738@adacore.com> <8ac60eac0909101036r101263e7qd11c1a69f13008f1@mail.gmail.com> <C35C7BFD-F792-4F77-8AD4-BB3C6F149AB3@adacore.com>
On Fri, Sep 11, 2009 at 12:53 AM, Tristan Gingold <gingold@adacore.com> wrote:
>>
>> [The separate debuginfo file is thus fundamentally different from the
>> "bunch of .o files with debug info on MacOS", and extending the separate
>> debuginfo to cover MacOS situation (mentioned elsewhere as a possible
>> solution) is (IMHO) the wrong approach.]
>
> Can you elaborate ?
>
> IMHO this is not fundamentally different. ?In both cases, one file contains
> the code and the other/others debug infos.
As I said before, the "primary" and "secondary" objfiles in the
separate debuginfo case have a common ancestor, and are almost like
identical twins: same sections (except for the weird F11 prelinking
case), same symbol tables, same file ELF file type, etc.
That isn't at all the case for MacOS "bunch of .o files" -- now we
have a "pile of parts" and a "completed engine". Certainly the
sections from separate .o files should not appear in the section map;
not sure whether symbols should, but likely not.
It sounds to me as if you'd want to pick up just the debug bits from
*.o, without turning them into full-blown objfiles.
I should mention that on Solaris, Sun cc uses the same trick: leaves
(stabs) debug info in the .o files and doesn't put any of them into
the final linked image (unless '-xs' flag is given on command line).
The name of the object file with debug info is recorded in N_OPT stab
entries in the image, so DBX knows where to find them. It doesn't look
like GDB supports this currently.
Cheers,
--
Paul Pluzhnikov