diff options
author | David Carlton <carlton@bactrian.org> | 2002-12-18 00:45:44 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2002-12-18 00:45:44 +0000 |
commit | 7ea19bb97a4124a289d752b9bb92f10682905ff1 (patch) | |
tree | 693748a1783e1638343a6358a29bf13191544863 /gdb/dwarf2read.c | |
parent | 1d9ae06b28c95a6cba96007f3028e9028baed6fe (diff) | |
download | gdb-7ea19bb97a4124a289d752b9bb92f10682905ff1.zip gdb-7ea19bb97a4124a289d752b9bb92f10682905ff1.tar.gz gdb-7ea19bb97a4124a289d752b9bb92f10682905ff1.tar.bz2 |
2002-12-17 David Carlton <carlton@math.stanford.edu>
* c-exp.y (yylex): Modify the #if 1 block to handle nested types
in a more honest manner.
* symtab.c (lookup_nested_type): New function.
* symtab.h: Declare lookup_nested_type.
2002-12-16 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_partial_symbol): Don't search past the end of
the partial symbols.
* Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c.
* dwarf2read.c (new_symbol): Only make global symbols associated
to structures, etc. if the current language is C++.
(add_partial_symbol): Ditto (for partial symbols).
2002-12-17 David Carlton <carlton@math.stanford.edu>
* gdb.c++/m-data.cc: Whitespace cleanup, to match mainline patch.
* gdb.c++/m-static.cc: Ditto.
* gdb.c++/namespace.exp: Fix comment. Delete third argument to
all the gdb_tests.
2002-12-16 David Carlton <carlton@math.stanford.edu>
* gdb.c++/namespace.exp: Change KFAIL messages to point to c++/XXX
instead of gdb/XXX.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2c64f59..f36aa30 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1559,7 +1559,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, return; add_psymbol_to_list (actual_name, strlen (actual_name), STRUCT_NAMESPACE, LOC_TYPEDEF, - &objfile->global_psymbols, + cu_language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); if (cu_language == language_cplus) @@ -1574,7 +1576,9 @@ add_partial_symbol (struct partial_die_info *pdi, struct objfile *objfile, case DW_TAG_enumerator: add_psymbol_to_list (actual_name, strlen (actual_name), VAR_NAMESPACE, LOC_CONST, - &objfile->global_psymbols, + cu_language == language_cplus + ? &objfile->static_psymbols + : &objfile->global_psymbols, 0, (CORE_ADDR) 0, cu_language, objfile); break; default: @@ -5243,19 +5247,18 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, } { - /* NOTE: carlton/2002-11-29: Class symbols shouldn't + /* NOTE: carlton/2002-11-29: C++ class symbols shouldn't really ever be static objects: otherwise, if you try to, say, break of a class's method and you're in a file which doesn't mention that class, it won't work unless the check for all static symbols in lookup_symbol_aux - saves you. Though perhaps C allows different files to - define different structs with the same name; if so, - this should be conditional on C++. See the - OtherFileClass tests in gdb.c++/namespace.exp. */ + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ struct pending **list_to_add; list_to_add = (list_in_scope == &file_symbols + && cu_language == language_cplus ? &global_symbols : list_in_scope); add_symbol_to_list (sym, list_to_add); @@ -5318,6 +5321,7 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, struct pending **list_to_add; list_to_add = (list_in_scope == &file_symbols + && cu_language == language_cplus ? &global_symbols : list_in_scope); add_symbol_to_list (sym, list_to_add); |