Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [gdb 6.7.1/6.8] does '-var-create - @' work or not?
@ 2008-04-03 13:20 Bogdan Slusarczyk
  2008-04-03 13:33 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Bogdan Slusarczyk @ 2008-04-03 13:20 UTC (permalink / raw)
  To: gdb

I've done simple test:

int test2( int a )
{
	int b = a + 20;
	return b;//should be a=11, b=31, but is a=31,b=0
}

int test1( int a )
{
	int b = a + 10;
	return test2( b );//should be a=1, b=11, but is a=11, b=11
}

int main( int argc, char** argv )
{
	int a = 10;
	int b = 1;
	test1( 1 );//should be a=10, b=1 and is a=10, b=1

	return 0;
}

I thought that created var objects using '-var-create - @' can be 
updated in another frame. But it doesn't work, -var-evaluate-expression 
returns wrong value. On the other hand 'print' returns right values. Or 
maybe I did something wrong? My sequence: -var-create at the begining, 
and next -var-update and -var-evaluate-expression in another frames.

Regards,
Bogdan


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

end of thread, other threads:[~2008-04-03 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 13:20 [gdb 6.7.1/6.8] does '-var-create - @' work or not? Bogdan Slusarczyk
2008-04-03 13:33 ` Daniel Jacobowitz
2008-04-03 13:50   ` Vladimir Prus
2008-04-03 14:30     ` Bogdan Slusarczyk
2008-04-03 17:33       ` Vladimir Prus
2008-04-03 14:13   ` Bogdan Slusarczyk

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