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: MI: fix base members in references


On Mon, Dec 11, 2006 at 10:15:29AM +1300, Nick Roberts wrote:
> Looking at code is a bit like peeling an onion: when you remove one layer
> there's another layer beneath.  Unfortunately I have to work within my
> limitations, both temporal and mental, and I was just trying to get Vladimir to
> do a sanity check.  It's easier to show code doesn't work than prove it does
> and I don't follow his point about using value_type (var->value) instead of
> var->type.  Surely if he thinks that there is a simpler/better patch then
> the onus is on him to provide it?

If you can't explain why your change is correct, then by default, it is
not the correct fix.  We can't just throw bandages at the codebase;
that's how you get bigger onions, not better programs.

>  > get_type_deref looks at the type, and if it is a pointer or reference,
>  > it dereferences it.  I assume that this is because we want to show the
>  > children of pointers to structs and references to structs.  Is that
>  > right?
> 
> My patch was just for references to pointers.

Sorry, I don't know how else to explain what that function does; that's
the important thing here.  What does not happen that you want to make
happen, and why doesn't it happen?  The explanation in my previous
message _should_ answer those questions, if I've understood the
discussion right, but maybe it doesn't.

-- 
Daniel Jacobowitz
CodeSourcery


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