This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tracing variables - is it ok?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]