This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog ada-exp.y testsuite/ChangeLo ...
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 1 Jul 2011 18:25:17 -0000
- Subject: src/gdb ChangeLog ada-exp.y testsuite/ChangeLo ...
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2011-07-01 18:25:17
Modified files:
gdb : ChangeLog ada-exp.y
gdb/testsuite : ChangeLog
Added files:
gdb/testsuite/gdb.ada: char_enum.exp
gdb/testsuite/gdb.ada/char_enum: foo.adb pck.adb pck.ads
Log message:
handle character-based enumeration typedefs
Consider the following type:
type Char_Enum_Type is ('A', 'B', 'C', 'D');
If the compiler generates a Char_Enum_Type typedef in the debugging
information, the debugger fails in the following case:
(gdb) p Char_Enum_Type'('B')
$1 = 66
For our type, the underlying value of 'B' is actually 1, not 66
(ASCII 'B'). We are failing this case because we were not handling
typedef to enum types before. This patch fixes this.
gdb/ChangeLog:
* ada-exp.y (convert_char_literal): Handle typedef types.
gdb/testsuite/ChangeLog:
* gdb.ada/char_enum: New testcase.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13134&r2=1.13135
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-exp.y.diff?cvsroot=src&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2763&r2=1.2764
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/char_enum.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/char_enum/foo.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/char_enum/pck.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/char_enum/pck.ads.diff?cvsroot=src&r1=NONE&r2=1.1