Re: -stack-list-locals and children

Vladimir Prus
2009-06-29T16:40:52Z

Pawel Piech wrote:

> Nick Roberts wrote:
>> Note that -stack-list-locals --simple-values _does_ give type information and,
>> if this is presented to the user, he can usually infer the number of children.
>> In the manual:
>>
>> -stack-list-locals --simple-values
>> ^done,locals=[{name="A",type="int",value="1"},
>> {name="B",type="int",value="2"},{name="C",type="int [3]"}]
>> (gdb) ^^^^^^^
>>
>
> No kidding! 2 more questions then:
>
> - does stack-list-args support the --simple-values option?

Does not seem so. In fact, it does not seem like -stack-list-locals support if
either ;-). Both take an integer parameter though, passing '2' for it should
cause only simple values to be printed.

> - how long has this feature been around?

Which? Printing types? I believe it was around for approximately -1 day.
However, please be advised that parsing types is very bad idea.

- Volodya