diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-08-21 18:40:34 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-08-21 18:40:34 +0000 |
commit | df8a16a1ee1a3d464ecffd6ad66a1d2e09d47838 (patch) | |
tree | 94c8eeebaaaa93603980657b438764404597d614 /gdb/dbxread.c | |
parent | 3567439cdefa9f2340bae3fbb068780923934865 (diff) | |
download | gdb-df8a16a1ee1a3d464ecffd6ad66a1d2e09d47838.zip gdb-df8a16a1ee1a3d464ecffd6ad66a1d2e09d47838.tar.gz gdb-df8a16a1ee1a3d464ecffd6ad66a1d2e09d47838.tar.bz2 |
* buildsym.c (add_symbol_to_list): Do not call
cp_scan_for_anonymous_namespaces here.
(finish_block): Do not call cp_set_block_scope here.
* cp-namespace.c (processing_has_namespace_info)
(processing_current_prefix): Delete.
(cp_initialize_namespace): Do not initialize
processing_has_namespace_info.
(cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME. Do
not check processing_has_namespace_info.
(cp_set_block_scope): Take prefix and namespace info flag as
arguments. Honor namespaces regardless of a demangled name.
* cp-support.h (processing_has_namespace_info)
(processing_current_prefix): Delete declarations.
(cp_set_block_scope): Update prototype.
* dwarf2read.c (processing_has_namespace_info)
(processing_current_prefix): New static variables.
(read_file_scope): Initialize processing_has_namespace_info.
(read_func_scope): Call cp_set_block_scope for C++.
(new_symbol): Call cp_scan_for_anonymous_namespaces for C++.
* symtab.c (symbol_demangled_name): Accept a const argument.
* symtab.h (symbol_demangled_name): Update prototype.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 42c9f4b..25ec313 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -54,6 +54,7 @@ #include "demangle.h" #include "complaints.h" #include "cp-abi.h" +#include "cp-support.h" #include "gdb_assert.h" #include "gdb_string.h" @@ -2738,6 +2739,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, { /* This N_FUN marks the end of a function. This closes off the current block. */ + struct block *block; if (context_stack_depth <= 0) { @@ -2756,9 +2758,14 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, new = pop_context (); /* Make a block for the local symbols within. */ - finish_block (new->name, &local_symbols, new->old_blocks, - new->start_addr, new->start_addr + valu, - objfile); + block = finish_block (new->name, &local_symbols, new->old_blocks, + new->start_addr, new->start_addr + valu, + objfile); + + /* For C++, set the block's scope. */ + if (SYMBOL_LANGUAGE (new->name) == language_cplus) + cp_set_block_scope (new->name, block, &objfile->objfile_obstack, + "", 0); /* May be switching to an assembler file which may not be using block relative stabs, so reset the offset. */ @@ -3148,10 +3155,19 @@ no enclosing block")); if (context_stack_depth > 0) { + struct block *block; + new = pop_context (); /* Make a block for the local symbols within. */ - finish_block (new->name, &local_symbols, new->old_blocks, - new->start_addr, valu, objfile); + block = finish_block (new->name, &local_symbols, + new->old_blocks, new->start_addr, + valu, objfile); + + /* For C++, set the block's scope. */ + if (SYMBOL_LANGUAGE (new->name) == language_cplus) + cp_set_block_scope (new->name, block, + &objfile->objfile_obstack, + "", 0); } new = push_context (0, valu); |