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


 > > > I would have preferred if instead of adding if, the code was modified to
 > > > look at
 > > 
 > > >         value_type (var->value)
 > > 
 > > > as opposed to
 > > 
 > > >         var->type
 > > 
 > > I'm not sure that I follow your point.  The patch just gets the target
 > > type, after dereferencing, in the case of a pointer.
 > > 
 > > > The latter is the type of the varobj expression as it is in source
 > > > program.  The former is the value we're actually showing. It makes sense
 > > > to use value_type (var->value) for all presentation purposes.
 > > 
 > > The former appears to be a type also (not a value).
 > 
 > Slight typo: the former is the type of the value we're actually showing. So,
 > you don't need to take original type and try to arrived to the type that
 > should be shown to the user, you just use value_type (var->value), and don't
 > need any further processing. One less thing that can be broken in future.

I'm still not sure that I follow.  My patch doesn't look at var->type directly.
Are you saying get_type should use value_type (var->value) instead of
var->type?  Or even all occurrances of var->type?  This would presumably be a
separate patch altogether.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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