[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] debugger question
|
On Thursday 14 August 2008 18:52:16 Mikhail Khodjaiants wrote:
> Marc, that's the first case that comes to mind.
> But I would like to ask the gdb folks the same question, maybe Vladimir
> can clarify it. If there is no difference then we can use
> -var-evaluate-expression instead.
-data-evaluate-expression renders value as CLI would. Consider:
-var-create V * p4
^done,name="V",numchild="1",value="{...}",type="B"
(gdb)
-var-evaluate-expression V
^done,value="{...}"
(gdb)
-data-evaluate-expression p4
^done,value="{i = -1081367664, j = -1208527256, static k = 11}"
(gdb)
Here, -data-evaluate-expression prints all content of expression. I think
the difference is observable only for composite types -- structures/classes
and arrays. For structures, I'm not actually sure why this alternative
presentation is desirable. For arrays, I suspect that raw dump of elements
that -data-evaluate-expression will give is not more helpful than the list
of children provided by -var-* commands.
- Volodya