> I'm hope this is right group.

In practice, no.  Most people follow [EMAIL PROTECTED]

> 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"}]
                               ^^^^^^^^^^^^^^^
This says that VALIDATED is no longer in scope.  Are you sure that your
program is not executing?

> -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=[]
                 ^^

It looks like VALIDATED is back in scope but that its value was set to 1
before you created the variable object.

> -var-evaluate-expression var3
> ^done,value="1"
> -var-delete var3
> ^done,ndeleted="1"

-var-update should report any changes since last update/creation, and update
 object if appropriate:

-var-create - * VALIDATED
^done,name="var1",numchild="0",type="int"
-var-update var1
^done,changelist=[]
-var-evaluate-expression var1
^done,value="77828156"

program executes...

  VALIDATE = 5;

program stops

-var-evaluate-expression var1
^done,value="77828156"
-var-update var1
^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
-var-evaluate-expression var1
^done,value="5"

> GDB 6.3/windows.

GDB 6.4 is available now.

If there is a bug, for someone to be able to fix it, you need to show how it
can be reproduced with a simple test program.

Nick                                           http://www.inet.net.nz/~nickrob


_______________________________________________
Bug-gdb mailing list
Bug-gdb@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gdb

Reply via email to