• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
GDB & static const variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB & static const variables


  • Subject: GDB & static const variables
  • From: Eric Gorr <email@hidden>
  • Date: Thu, 16 Jul 2009 11:25:22 -0400

I have a function which looks like:

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


	return ( doubleByteDegreeMark == 42 && anotherVar == 12 );
}

from GDB, if I do 'info locals' 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.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GDB & static const variables
      • From: Fritz Anderson <email@hidden>
    • Re: GDB & static const variables
      • From: Tim Murison <email@hidden>
  • Prev by Date: Re: GDB problems and version
  • Next by Date: Re: GDB & static const variables
  • Previous by thread: Xcode - View code files in fullscreen
  • Next by thread: Re: GDB & static const variables
  • Index(es):
    • Date
    • Thread