This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
printing enumerated values
- To: gdb at sources dot redhat dot com
- Subject: printing enumerated values
- From: Shaun Jackman <shaunj at gray-interfaces dot com>
- Date: Fri, 6 Oct 2000 11:11:11 -0600
- Organization: Gray Interfaces
- Reply-To: shaunj at gray-interfaces dot com
I have an enum that looks something like...
enum {
A = 512,
B = 513
};
It's not really an enumerated list, more like constant integers. I don't want
to use defines though because I can't work with them in GDB. And, 'const int's
have performance issues in -O0 (where I'll be staying until we leave the
touchy development phase).
In GDB I get this...
(gdb) p A
$1 = 0
(gdb) p B
$2 = 1
(gdb)
This should be 512, and 513 respectively (clearly).
Cheers,
Shaun