diff options
author | Tom Tromey <tromey@redhat.com> | 2010-01-19 18:11:19 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-01-19 18:11:19 +0000 |
commit | ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce (patch) | |
tree | e05ef253dd96f02213ec5358eba51946ed12da37 /gdb/testsuite/gdb.cp | |
parent | 5696ab0b73cb827e7b3636255694d1fe61c89a32 (diff) | |
download | gdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.zip gdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.tar.gz gdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.tar.bz2 |
gdb
PR c++/8000:
* dwarf2read.c (partial_die_parent_scope): Put enumeration type
into parent scope, and enumerator into grandparent scope.
gdb/testsuite
PR c++/8000:
* gdb.cp/namespace.exp: Use new enum. Fix line numbers in
existing tests.
* gdb.cp/namespace.cc (AAA::SomeEnum): New enum.
(main): Use AAA::SomeEnum.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/namespace.cc | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/namespace.exp | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.cp/namespace.cc b/gdb/testsuite/gdb.cp/namespace.cc index 4ac9187..f918b63 100644 --- a/gdb/testsuite/gdb.cp/namespace.cc +++ b/gdb/testsuite/gdb.cp/namespace.cc @@ -8,6 +8,11 @@ namespace AAA { int xx; int fum (int); }; + enum SomeEnum { + ALPHA, + BETA, + DELTA + }; }; int AAA::inA::fum (int i) @@ -174,6 +179,7 @@ int main () { using AAA::inA; char c1; + AAA::SomeEnum var = AAA::ALPHA; using namespace BBB; diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp index a2b8242..4362fd8 100644 --- a/gdb/testsuite/gdb.cp/namespace.exp +++ b/gdb/testsuite/gdb.cp/namespace.exp @@ -164,7 +164,7 @@ gdb_expect { # Break on a function in a namespace gdb_test "break AAA::xyzq" \ - "Breakpoint.*at $hex: file.*namespace.cc, line 42\\." + "Breakpoint.*at $hex: file.*namespace.cc, line 47\\." # Call a function in a nested namespace @@ -189,7 +189,7 @@ gdb_expect { # Break on a function in a nested namespace gdb_test "break BBB::CCC::xyzq" \ - "Breakpoint.*at $hex: file.*namespace.cc, line 58\\." + "Breakpoint.*at $hex: file.*namespace.cc, line 63\\." # Print address of a function in a class in a namespace @@ -214,7 +214,7 @@ gdb_expect { # Break on a function in a class in a namespace gdb_test "break BBB::Class::xyzq" \ - "Breakpoint.*at $hex: file.*namespace.cc, line 63\\." + "Breakpoint.*at $hex: file.*namespace.cc, line 68\\." # Test to see if the appropriate namespaces are in scope when trying # to print out stuff from within a function defined within a @@ -271,3 +271,6 @@ gdb_test "print G::Xg" "\\$\[0-9\].* = 10" gdb_test "print G::XgX" "\\$\[0-9\].* = 11" gdb_test "print cXOtherFile" "No symbol \"cXOtherFile\" in current context." gdb_test "print XOtherFile" "No symbol \"XOtherFile\" in current context." + +# Enum tests. +gdb_test "print AAA::ALPHA" "\\$\[0-9\].* = AAA::ALPHA" |