diff options
author | David Carlton <carlton@bactrian.org> | 2003-01-07 01:28:24 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-01-07 01:28:24 +0000 |
commit | 237d3b4bdf0e40179b38c7eacc74bbd134c6bcc7 (patch) | |
tree | 9c373029832a7922057383fd732c2c927fd2c07d /gdb/testsuite | |
parent | 0040581fd0a8cca4cf7af353c1042225c8088cb9 (diff) | |
download | gdb-237d3b4bdf0e40179b38c7eacc74bbd134c6bcc7.tar.gz |
2003-01-06 David Carlton <carlton@math.stanford.edu>
* config/djgpp/fnchange.lst: Mention
testsuite/gdb.c++/namespace1.cc.
* cp-support.h: Declare cp_lookup_namespace_symbol.
* cp-support.c (cp_lookup_namespace_symbol): New function.
(cp_check_namespace_symbol): Call cp_lookup_namespace_symbol.
(cp_lookup_possible_namespace_symbol): Update comment.
* symtab.c (lookup_symbol_aux_file): Add 'anonymous_namespace'
argument.
(lookup_symbol_namespace): Call lookup_symbol_aux_file with new
argument.
* cp-support.h: Declare cp_is_anonymous.
* cp-support.c (cp_is_anonymous): New function.
* buildsym.c (add_symbol_to_list): Don't test for anonymous
namespace mention here.
(scan_for_anonymous_namespaces): Test for it here, instead.
* symtab.c (lookup_symbol_aux_minsyms): Delete.
(lookup_symbol_aux_nonlocal): Don't call
lookup_symbol_aux_minsyms.
2003-01-06 David Carlton <carlton@math.stanford.edu>
* gdb.c++/namespace.exp: Test anonymous namespaces and multiple
files.
* gdb.c++/namespace1.cc: Add anonymous namespaces.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/namespace.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/namespace1.cc | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c3372c7ebeb..d5e3fc8beb9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-01-06 David Carlton <carlton@math.stanford.edu> + + * gdb.c++/namespace.exp: Test anonymous namespaces and multiple + files. + * gdb.c++/namespace1.cc: Add anonymous namespaces. + 2002-12-23 David Carlton <carlton@math.stanford.edu> * gdb.base/selftest.exp (do_steps_and_nexts): Allow initial brace diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp index 78775b18571..57b7f320502 100644 --- a/gdb/testsuite/gdb.c++/namespace.exp +++ b/gdb/testsuite/gdb.c++/namespace.exp @@ -274,6 +274,8 @@ gdb_test "print X" "\\$\[0-9\].* = 9" gdb_test "print 'G::Xg'" "\\$\[0-9\].* = 10" 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." # Test namespace renaming. diff --git a/gdb/testsuite/gdb.c++/namespace1.cc b/gdb/testsuite/gdb.c++/namespace1.cc index ac4703cd405..6d9a0e0151d 100644 --- a/gdb/testsuite/gdb.c++/namespace1.cc +++ b/gdb/testsuite/gdb.c++/namespace1.cc @@ -4,4 +4,12 @@ namespace C public: int z; }; + + namespace { + int cXOtherFile = 29; + }; +} + +namespace { + int XOtherFile = 317; } |