This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: tracing variables - is it ok?
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Fri, 01 Jun 2007 12:37:21 +0400
- Subject: Re: tracing variables - is it ok?
- References: <465FD1AD.9040909@op.pl>
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