This is the mail archive of the gdb@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: "set foo"


> From: Tom Tromey <tromey@redhat.com>
> Cc: Joel Brobecker <brobecker@adacore.com>, gdb@sourceware.org
> Date: Mon, 26 Apr 2010 10:23:25 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> The specific use-case is that GDB does not recognize a certain struct;
> Eli> for example, "ptype struct foo_t" says "No struct type named foo_t".
> Eli> But if I type "set foo", where `foo' is a function whose code uses
> Eli> that struct, GDB magically recognizes the struct afterwards.
> 
> FWIW, this sounds like a gdb bug to me.

Could be a GCC bug as well, no?

> I looked at emacs/src/.gdbinit and it seems to me that the types and
> variables in question are global (in the sense of, not local to a
> function).  So, they should be found without this trick.

So you are saying that global types and variables are always loaded by
GDB automatically, not lazily?


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