diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2009-06-23 17:46:52 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2009-06-23 17:46:52 +0000 |
commit | 27aa8d6aa032b25160328cd92c78c4f8158fa0b7 (patch) | |
tree | 2b823b28f96ac6982967c72208f9ec1423306ce4 /gdb/buildsym.c | |
parent | ad068eabda988774e168b3f9b410306b40f5c191 (diff) | |
download | gdb-27aa8d6aa032b25160328cd92c78c4f8158fa0b7.zip gdb-27aa8d6aa032b25160328cd92c78c4f8158fa0b7.tar.gz gdb-27aa8d6aa032b25160328cd92c78c4f8158fa0b7.tar.bz2 |
2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
* dwarf2read.c (process_die): Handle import statements
(DW_TAG_imported_declaration, case DW_TAG_imported_module)
(read_import_statement): New.
(read_func_scope): Update using_directives to point to current context
(read_lexical_block_scope): Ditto.
* cp-support.h: Added prototype for cp_add_using.
* cp-namespace.c: Removed local context_stack.
(cp_initialize_namespace): Deleted.
(cp_finalize_namespace): Deleted.
(cp_add_using_directive): Use using_directives instead of using_list.
(cp_add_using): No longer static.
* buildsym.h: Created global using_direct variable.
Created using_direct variable in context_stack.
* buildsym.c (finish_block): Set using directives for the block under
construction.
(start_symtab): Removed call to cp_initialize_namespace().
(end_symtab): Removed call to cp_finalize_namespace().
(push_context): Save and reset using_directives.
* block.c (block_using): Return using directives for given
block instead of static block.
2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/namespace-using.exp: New test.
* gdb.cp/namespace-using.cc: New test.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r-- | gdb/buildsym.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c index f94c14d..8d7fed3 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -384,6 +384,8 @@ finish_block (struct symbol *symbol, struct pending **listhead, opblock = pblock; } + block_set_using (block, using_directives, &objfile->objfile_obstack); + record_pending_block (objfile, block, opblock); return block; @@ -812,10 +814,6 @@ start_symtab (char *name, char *dirname, CORE_ADDR start_addr) /* We shouldn't have any address map at this point. */ gdb_assert (! pending_addrmap); - /* Set up support for C++ namespace support, in case we need it. */ - - cp_initialize_namespace (); - /* Initialize the list of sub source files with one entry for this file (the top-level source file). */ @@ -1021,8 +1019,6 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section) finish_block (0, &global_symbols, 0, last_source_start_addr, end_addr, objfile); blockvector = make_blockvector (objfile); - cp_finalize_namespace (BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK), - &objfile->objfile_obstack); } /* Read the line table if it has to be read separately. */ @@ -1234,10 +1230,12 @@ push_context (int desc, CORE_ADDR valu) new->params = param_symbols; new->old_blocks = pending_blocks; new->start_addr = valu; + new->using_directives = using_directives; new->name = NULL; local_symbols = NULL; param_symbols = NULL; + using_directives = NULL; return new; } |