This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB and GDB/MI different reponses....
- From: Pedro Alves <palves at redhat dot com>
- To: John Martin <jmartin at larraioz dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 04 Apr 2013 11:15:31 +0100
- Subject: Re: GDB and GDB/MI different reponses....
- References: <CAFTqdrNmXCMTaJ8vHngQ3n9WMQy98TUoT7JO4MEU0j=JmKJ+yg at mail dot gmail dot com> <CAFTqdrPKfdUH1qn0O5fB499uEPjs-_eecPd0GZFrc2M0S-f0GA at mail dot gmail dot com> <515D495A dot 2040207 at redhat dot com> <515D425E dot 90001 at larraioz dot com>
On 04/04/2013 10:05 AM, John Martin wrote:
> Perhaps it isn't enough information.
>
> I have fixed the problem but I don't understand how to do it.
>
> If I execute the follow command:
> "gdb --interpreter=mi --readnow" then I have several anonimous structs.
>
> But if I call gdb without "--readnow" argument, then GDB/MI return me correct structs types.
Okay, then MI seems to be a red herring. You should see the
same (--readnow vs no --readnow) with the CLI?
> What is "--readnow"?
>From gdb --help:
--readnow Fully read symbol files on first access.
Reading debug info is a slow process, and without that switch (the
default), GDB will read in debug info lazily, as necessary.
It is not advisable to use --readnow. It's mostly useful for
debugging/testing gdb's debug info read speed.
In principle, that switch should not cause user visible behavior
change. But if you have more than one variable with the same name
in your program, reading in all debug info preemptively could
change which variable happens to find first (this is the kind of
thing I was referring to as "phase of the moon", btw). I think
we have bug reports open around this.
--
Pedro Alves