This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog ada-lang.c testsuite/ChangeL ...
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 1 Jul 2011 18:26:50 -0000
- Subject: src/gdb ChangeLog ada-lang.c testsuite/ChangeL ...
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2011-07-01 18:26:50
Modified files:
gdb : ChangeLog ada-lang.c
gdb/testsuite : ChangeLog
Added files:
gdb/testsuite/gdb.ada: same_enum.exp
gdb/testsuite/gdb.ada/same_enum: a.adb pck.adb pck.ads
Log message:
treat identical enum types as the same type
This is to avoid an unnecessary multiple-choice menu for an
expression involving an enumeral declared in two types, when
the second type is an identical copy of the first type. This
happens in the following situation:
type Color is (Black, Red, Green, Blue, White);
type RGB_Color is new Color range Red .. Blue;
In that case, an implict type is created, and is used as the base
type for type RGB_Color. This base type is a copy of type Color.
We've added some extensive comments explaining the situation and
our approach further.
gdb/ChangeLog:
* ada-lang.c (ada_identical_enum_types_p): New function.
(symbols_are_identical_enums): New function.
(remove_extra_symbols): Do nothing if NSYMS < 2.
Use symbols_are_identical_enums.
gdb/testsuite/ChangeLog:
* gdb.ada/same_enum: New testcase.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13138&r2=1.13139
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.303&r2=1.304
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2767&r2=1.2768
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/same_enum.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/same_enum/a.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/same_enum/pck.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/same_enum/pck.ads.diff?cvsroot=src&r1=NONE&r2=1.1