This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
use typedef'd type or original type?
- From: Doug Evans <dje at sebabeach dot org>
- To: gdb at sourceware dot org
- Date: Tue, 29 Jan 2008 19:44:12 -0800 (PST)
- Subject: use typedef'd type or original type?
While working on
http://sourceware.org/ml/gdb-patches/2008-01/msg00759.html
I came across this.
(gdb) l
1 typedef int myint;
2
3 myint x = 3;
4
5 int
6 main ()
7 {
8 }
[assumed stopped in main]
(gdb) whatis x
type = myint
(gdb) whatis -x
type = myint
(gdb) whatis +x
type = int
fyi, I made the patch change "whatis -x" print "int" instead of "myint" -
if myint was myshort the result should be int.