Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* tracing variables - is it ok?
@ 2007-06-01  7:59 Bogdan Slusarczyk
  2007-06-01  8:37 ` Vladimir Prus
  0 siblings, 1 reply; 5+ messages in thread
From: Bogdan Slusarczyk @ 2007-06-01  7:59 UTC (permalink / raw)
  To: gdb

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. Is it intended behaviour? How can I properly trace variable 
changes? It applies not only for function arguments - I tryied do the 
same thing with 'k', there is the same problem. It strange for me 
because '-var-create - @' handles scope changes properly (see below)
{
    int a = 10;
    {
       int a = 20;
    }
}


Regards,
Bogdan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-01  9:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-01  7:59 tracing variables - is it ok? Bogdan Slusarczyk
2007-06-01  8:37 ` Vladimir Prus
2007-06-01  9:13   ` Bogdan Slusarczyk
2007-06-01  9:17     ` Vladimir Prus
2007-06-01  9:28       ` Bogdan Slusarczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox