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: MI: variable objects: children naming


Daniel Jacobowitz wrote:

>> However, the information gdb prints does not allow me to compute m[0]:
> 
> Is this the only thing you need the name for, or is it useful for other
> purposes in the user interface too?  (Honest question - I have no
> idea.)
> 

Yes, there are other purposes. Say, if you right-click an item in variables
tree and select, in the popup menu, the "Remember" command, the current
value of the item will be shown in a separate area for future reference.
But we need to show the full name of the item there. It's only for user, and
we need full name there.

> If watchpoints are the only reason, then you could have a variant of a
> watchpoint command which took a varobj.
> 
>>   - Calling '-var-info-expression TMP.0' returns:
>>         ^done,lang="C++",exp="0"
>> 
>> It seems like Apple version has new command -var-info-path-expression,
>> which is not present in FSF version, and which supposedly will produce
>> "m[0]".
> 
> We'd have to ask Jim for the history, but why should we do this instead
> of fixing -var-info-expression?  That behavior looks pretty wrong!

Jim has explained this -- 'info-expression' is local name of an item
relative to the parent, while 'info-path-expression' is full name.

- Volodya


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