This is the mail archive of the gdb@sources.redhat.com 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: Formatting of function pointer value


Daniel Jacobowitz wrote:

>> To clarify more, here's what I get with MI:
>> 
>>    -data-evaluate-expression *p3
>>    ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"
>>    (gdb)
>>    -var-create VP3 0 *p3
>>    ^done,name="VP3",numchild="0",type="int (int)"
>>    (gdb)
>>    -var-evaluate-expression VP3
>>    ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"
>> 
>> The type enclosed in {} is still there.
> 
> The intention is that this is a user-readable value, to be displayed.

Hmm.. since MI is for gdb frontends, this just imposes work for frontend. It
frontend wants to display the type, it can get this information easily with
extra MI command, while stripping '{}' is somewhat hacky. Especially
because {} is also used to delimit arrays.

> There's limited facility for computing values with machine-readable
> results, probably because there has been limited need for it to date.

So, 
1. It's not possible to avoid those {} in the current code, using MI or CLI.
2. It's not likely that this will change
Right?

If so, then I'll just drop the ball, and use a hacky {}-stripping code in
kdevelop.

- Volodya




 



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