From: David Carlton Date: Wed, 20 Nov 2002 01:09:54 +0000 (+0000) Subject: 2002-11-19 David Carlton X-Git-Tag: newlib-1_11_0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0580ef36be9f57b48fb0a32cd4bf93dbd57e441;p=thirdparty%2Fbinutils-gdb.git 2002-11-19 David Carlton * block.c: Whitespace cleanup. * buildsym.c (finish_block): Delete #if'd out code. * symtab.c (lookup_symbol_namespace): Add comment. * dwarf2read.c (scan_partial_symbols): Fix typo. 2002-11-19 David Carlton * gdb.c++/namespace.exp: Delete FIXME comment. Fill in PR's for setup_kfail's. Fiddle with comments at top of file. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e4540a172e1..cac8981d4c9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-11-19 David Carlton + + * block.c: Whitespace cleanup. + * buildsym.c (finish_block): Delete #if'd out code. + * symtab.c (lookup_symbol_namespace): Add comment. + * dwarf2read.c (scan_partial_symbols): Fix typo. + 2002-11-15 David Carlton * symtab.c (lookup_symbol_aux): Get at static block via diff --git a/gdb/block.c b/gdb/block.c index 2566a4ab8aa..bdcc286cca7 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -84,7 +84,6 @@ block_all_usings (const struct block *block) return using; } - /* Set block_using (BLOCK) to USING; if needed, allocate memory via OBSTACK. */ diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d9fb7ddebf3..311bc96b0f7 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -478,20 +478,6 @@ finish_block (struct symbol *symbol, struct pending **listhead, want to make sure I'm not running into surprises. */ gdb_assert (*next == '\0'); } - -#if 0 - for (next = cp_find_first_component (name); - *next == ':'; - /* The '+ 2' is to skip the '::'. */ - next = cp_find_first_component (next + 2)) - { - block_set_using (block, - cp_add_using_obstack (name, 0, next - name, - block_using (block), - &objfile->symbol_obstack), - &objfile->symbol_obstack); - } -#endif } } else diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 35d5d2e36f3..13182f0b28f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1348,7 +1348,7 @@ scan_partial_symbols (char *info_ptr, struct objfile *objfile, /* We only want to read in symbols corresponding to variables or other similar objects that are global or static. Normally, these are all children of the DW_TAG_compile_unit die, so are all at - level 1. But C++ namespaces give ries to DW_TAG_namespace dies + level 1. But C++ namespaces give rise to DW_TAG_namespace dies whose children are global objects. So we keep track of what level we currently think of as referring to file scope; this should always equal 1 plus the number of namespaces that we are diff --git a/gdb/symtab.c b/gdb/symtab.c index c465506f254..fefcf806278 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -137,6 +137,7 @@ struct symbol *lookup_symbol_aux_using_loop (const char *name, const char *scope, int scope_len, struct using_direct_node *using); + static struct symbol *lookup_symbol_namespace (const char *prefix, int prefix_len, @@ -1300,6 +1301,11 @@ symbol *lookup_symbol_aux_using_loop (const char *name, namespaces first-class objects. (Which is certainly a good idea for other reasons, but it will take a little while.) */ +/* NOTE: carlton/2002-11-19: This is optimistically called + lookup_symbol_namespace instead of lookup_symbol_aux_namespace in + hopes that it or something like it might eventually be useful + outside of lookup_symbol. */ + static struct symbol * lookup_symbol_namespace (const char *prefix, int prefix_len, diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9704d5c7d5d..d6c1f8258a5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-11-19 David Carlton + + * gdb.c++/namespace.exp: Delete FIXME comment. + Fill in PR's for setup_kfail's. + Fiddle with comments at top of file. + 2002-11-08 Jeff Johnston * lib/mi-support.exp (mi_gdb_start): Verify the startup message diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp index 7a5966def02..543ec5c2697 100644 --- a/gdb/testsuite/gdb.c++/namespace.exp +++ b/gdb/testsuite/gdb.c++/namespace.exp @@ -18,14 +18,14 @@ # bug-gdb@prep.ai.mit.edu # tests for namespaces -# Written by Satish Pai 1997-07-23 +# Originally written by Satish Pai 1997-07-23 # This file is part of the gdb testsuite -# Note: These tests are geared to the HP aCC compiler, +# Note: The original tests were geared to the HP aCC compiler, # which has an idiosyncratic way of emitting debug info # for namespaces. -# Note: As of 2000-06-03, these pass under g++ - djb +# Note: As of 2000-06-03, they passed under g++ - djb if $tracelevel then { @@ -201,18 +201,12 @@ gdb_test "print 'C::cc'" "\\$\[0-9\].* = 2" "print C::cc" gdb_test "print cd" "\\$\[0-9\].* = 3" "print cd" gdb_test "print 'C::D::cd'" "\\$\[0-9\].* = 3" "print C::D::cd" gdb_test "print 'E::cde'" "\\$\[0-9\].* = 5" "print E::cde" - -# FIXME: carlton/2002-10-17: It's somewhat accidental that we -# currently get this one right. (Delete this comment once namespace -# scope issues have been handled correctly!) - gdb_test "print shadow" "\\$\[0-9\].* = 13" "print shadow" - # NOTE: carlton/2002-10-17: This one won't get fixed until namespaces -# are first-class objects. +# are first-class objects. The PR isn't right, either. -setup_kfail "FIXME" +setup_kfail "gdb/827" gdb_test "print 'E::ce'" "No symbol \"E::ce\" in current context." "print E::ce" # Some anonymous namespace tests. @@ -226,7 +220,7 @@ gdb_test "print 'G::XgX'" "\\$\[0-9\].* = 11" "print G::XgX" # Test namespace renaming. -setup_kfail "FIXME" +setup_kfail "gdb/830" gdb_test "print 'I::h'" "\\$\[0-9\].* = 14" "print I::h" # Test using directives. @@ -235,22 +229,22 @@ gdb_test "print 'I::h'" "\\$\[0-9\].* = 14" "print I::h" # have unfortunate interactions with namespace scope issues. As of # this writing, some of these pass, but they pass for the wrong reasons. -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print j" "\\$\[0-9\].* = 15" "print j" -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print 'L::k'" "\\$\[0-9\].* = 16" "print L::k" -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print k" "No symbol \"k\" in current context." "print k" -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print cdm" "\\$\[0-9\].* = 17" "print cdm" -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print 'Q::o'" "\\$\[0-9\].* = 18" "print Q::o" -setup_kfail "FIXME" +setup_kfail "gdb/829" gdb_test "print o" "No symbol \"o\" in current context." "print o" # Test using declarations. I should probably test these more. -setup_kfail "FIXME" +setup_kfail "gdb/831" gdb_test "print r1" "\\$\[0-9\].* = 19" "print r1" -setup_kfail "FIXME" +setup_kfail "gdb/831" gdb_test "print r2" "No symbol \"r2\" in current context." "print r2"