summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1996-11-09 01:32:56 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1996-11-09 01:32:56 +0000
commita3377a8b07a455515c819f1192b5fc59a41ea046 (patch)
tree52d6bc1d7084d5aba0f1ee166babb5917339f369 /gcc/varasm.c
parente8976cd79d68eeee0362077b9836af68f1d163dc (diff)
downloadgcc-a3377a8b07a455515c819f1192b5fc59a41ea046.tar.gz
x
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13116 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 77798286ba5..e7a566359ad 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1175,15 +1175,20 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
&& (TREE_PUBLIC (decl) == 0 || DECL_INITIAL (decl) == 0))
sdbout_symbol (decl, 0);
#endif
+#ifdef DWARF_DEBUGGING_INFO
+ if (write_symbols == DWARF_DEBUG && top_level
+ && DECL_CONTEXT (decl))
+ dwarfout_file_scope_decl (decl, 0);
+#endif
}
- /* Don't output any DWARF debugging information for variables here.
- In the case of local variables, the information for them is output
- when we do our recursive traversal of the tree representation for
- the entire containing function. In the case of file-scope variables,
- we output information for all of them at the very end of compilation
- while we are doing our final traversal of the chain of file-scope
- declarations. */
+ /* Only output DWARF debugging information for record-scope variables
+ here. In the case of function-scope variables, the information
+ for them is output when we do our recursive traversal of the tree
+ representation for the entire containing function. In the case of
+ file-scope variables, we output information for all of them at the
+ very end of compilation while we are doing our final traversal of
+ the chain of file-scope declarations. */
return;
}
@@ -1298,14 +1303,19 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
&& (TREE_PUBLIC (decl) == 0 || DECL_INITIAL (decl) == 0))
sdbout_symbol (decl, 0);
#endif
+#ifdef DWARF_DEBUGGING_INFO
+ if (write_symbols == DWARF_DEBUG && top_level
+ && DECL_CONTEXT (decl))
+ dwarfout_file_scope_decl (decl, 0);
+#endif
- /* Don't output any DWARF debugging information for variables here.
- In the case of local variables, the information for them is output
- when we do our recursive traversal of the tree representation for
- the entire containing function. In the case of file-scope variables,
- we output information for all of them at the very end of compilation
- while we are doing our final traversal of the chain of file-scope
- declarations. */
+ /* Only output DWARF debugging information for record-scope variables
+ here. In the case of function-scope variables, the information
+ for them is output when we do our recursive traversal of the tree
+ representation for the entire containing function. In the case of
+ file-scope variables, we output information for all of them at the
+ very end of compilation while we are doing our final traversal of
+ the chain of file-scope declarations. */
#if 0 /* ??? We should either delete this or add a comment describing what
it was intended to do and why we shouldn't delete it. */