Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* printing static const variables
@ 2009-07-16 16:16 Eric Gorr
  2009-07-16 16:21 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Gorr @ 2009-07-16 16:16 UTC (permalink / raw)
  To: gdb

I have a function which looks like:

Boolean TestFunction( void )
{
	static const int doubleByteDegreeMark = 42;
	static int anotherVar = 12;
	
	
	return ( doubleByteDegreeMark == 42 && anotherVar == 12 );
}

I set a breakpoint inside of this function and when it stops at this  
breakpoint, I do 'info locals' and it prints out:

(gdb) info locals
anotherVar = 12

if I try to print out the value of doubleByteDegreeMark, it gives me  
the error message:

(gdb) print doubleByteDegreeMark
No symbol "doubleByteDegreeMark" in current context.

So, my (probably really simple) question is how can I print out the  
value of doubleByteDegreeMark from GDB?

Thank you.



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

end of thread, other threads:[~2009-07-16 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-16 16:16 printing static const variables Eric Gorr
2009-07-16 16:21 ` Tom Tromey
2009-07-16 16:35   ` Eric Gorr
2009-07-16 16:56     ` Tom Tromey
2009-07-16 17:28     ` Grant Edwards

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