tracing variables - is it ok?

Vladimir Prus ghost@cs.msu.su
Fri Jun 1 08:37:00 GMT 2007


Bogdan Slusarczyk wrote:

> Hi everybody, suppose such code:
> 
> void testB( int a ) { //a == 20
>     int k = a;
> }
> void testA( int a ) { //a == 10
>     int k = a;
>      testB( 20 );
> }
> void main() {
>     testA( 10 );
> }
> 
> Inside testA I did '-var-create - @ a' and inside testB '-var-update',
> but gdb (6.3, 6.6) says that nothing changes and returns a==10 from
> testA. 

This seems weird. Can you also print 'a' right after creating varobj,
and right after -var-update, to make sure it's the problem with
variable objects, and not with something else. Please do this test with
gdb 6.6, or better yet, with CVS version.

Thanks,
Volodya




More information about the Gdb mailing list