🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Sebastian Bialy Thu, 09 Feb 2006 08:16
GDB/MI - garbage in first call to -var-evaluate-expression
#1207
Author: Sebastian Bialy
Date: Thu, 09 Feb 2006 08:16
42 lines
2780 bytes
Hi all.

I'm hope this is right group.

I'm working with GDB/MI. I'm stepping on C++ code (actually it is 
SystemC code). I want to read local variable 'VALIDATED' of current frame:

-var-create - * VALIDATED
^done,name="var2",numchild="0",type="int"
-var-info-type var2
^done,type="int"
-var-update var2
^done,changelist=[{name="var2",in_scope="false"}]
-var-evaluate-expression var2
^done,value="77828156"
-var-delete var2
^done,ndeleted="1"

As you can see there is garbage instead of real variable value.

However if I do exactly the same instructions again (no change in 
debugger between) I get proper value:

-var-create - * VALIDATED
^done,name="var3",numchild="0",type="int"
-var-info-type var3
^done,type="int"
-var-update var3
^done,changelist=[]
-var-evaluate-expression var3
^done,value="1"
-var-delete var3
^done,ndeleted="1"

I cannot support You with this piece of code. But anyway problem exists 
_every_ time, first "evaluate-expression" always returns garbage. I mean 
"first" after any step instruction. This happens with all "numeric" 
variables in my code. Looks like GDB/MI bug for me.

GDB 6.3/windows.

Sebastian Bialy.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads