From 27aa8d6aa032b25160328cd92c78c4f8158fa0b7 Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Tue, 23 Jun 2009 17:46:52 +0000 Subject: 2009-06-23 Sami Wagiaalla * 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 * gdb.cp/namespace-using.exp: New test. * gdb.cp/namespace-using.cc: New test. --- gdb/buildsym.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/buildsym.h') diff --git a/gdb/buildsym.h b/gdb/buildsym.h index bf23ecc..6f8b09f 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -125,6 +125,10 @@ EXTERN struct pending *local_symbols; EXTERN struct pending *param_symbols; +/* "using" directives local to lexical context. */ + +EXTERN struct using_direct *using_directives; + /* Stack representing unclosed lexical contexts (that will become blocks, eventually). */ @@ -138,6 +142,10 @@ struct context_stack struct pending *params; + /* Pending using directives at the time we entered. */ + + struct using_direct *using_directives; + /* Pointer into blocklist as of entry */ struct pending_block *old_blocks; -- cgit v1.1