This is the mail archive of the gdb-patches@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]

Re: [patchv2] Record objfile->original_name as an absolute path


On Wed, Oct 9, 2013 at 9:58 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> > +/* Cheezy hack to prevent set_initial_language from trying to look up main.
>> > +   We do this so that gdb won't try to open the dwp file when the file is
>> > +   first selected.  This gives us a chance to do a chdir before attempting
>> > +   to access the debug info.  */
>> > +asm (".globl main.main");
>> > +asm ("main.main: .byte 0");
>> > +
>> >  int
>> >  main (int argc, char **argv)
>> >  {
>>
>> People are actually ok with this?
>
> FWIW, I tend to be a little less demanding in the testsuite.
> But the first question is whether there is another alternative.
> Is there?

I was thinking,
We have auto-solib-add and sharedlibrary.
We just need something like that for symfile_objfile.
[I realize it's a bit different.  What I mean is we need a way to stop
gdb from auto-loading symbols and then a command to load the symbols
at a later point.  The catch here is that we need gdb to already know
about the file (we need to exercise whatever path gets set in the
objfile) - we just need to defer loading symbols until after we get
gdb to cd to a different directory.]
I'm trying to think of a use-case beyond the testsuite to better
justify having such a feature.

[One could do something to defer setting the initial language, but
that's just one reason why gdb might want to load symbols
immediately.]


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