aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-07-22 17:02:53 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-07-22 17:02:53 +0000
commit3914abb46ef94ef60c9bb44c7e3573534c0c6815 (patch)
treef1f87373eb821207cc415143ba8c00551d90838c /gcc/dbxout.c
parentbe7560ea81db88a710ff0915d8736b9dee2c9ad1 (diff)
downloadgcc-3914abb46ef94ef60c9bb44c7e3573534c0c6815.zip
gcc-3914abb46ef94ef60c9bb44c7e3573534c0c6815.tar.gz
gcc-3914abb46ef94ef60c9bb44c7e3573534c0c6815.tar.bz2
dbxout.c (dbxout_global_decl): New.
* dbxout.c (dbxout_global_decl): New. (xcoff_debug_hooks, dbx_debug_hooks): Use it. * sdbout.c (sdbout_finish): New. (sdbout_debug_hooks): Use it, add comments. (sdbout_global_decl): Defer initialised public vars to sdbout_finish. * varasm.c (assemble_variable): Don't output debug information for file-scope variables. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r44243
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index e7c2c54..b321cfc 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -313,6 +313,7 @@ static void dbxout_prepare_symbol PARAMS ((tree));
static void dbxout_finish_symbol PARAMS ((tree));
static void dbxout_block PARAMS ((tree, int, tree));
static void dbxout_begin_function PARAMS ((tree));
+static void dbxout_global_decl PARAMS ((tree));
/* The debug hooks structure. */
#if defined (DBX_DEBUGGING_INFO)
@@ -343,7 +344,7 @@ struct gcc_debug_hooks dbx_debug_hooks =
#endif
debug_nothing_int, /* end_function */
dbxout_function_decl,
- debug_nothing_tree, /* global_decl */
+ dbxout_global_decl, /* global_decl */
debug_nothing_tree, /* deferred_inline_function */
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx /* label */
@@ -369,7 +370,7 @@ struct gcc_debug_hooks xcoff_debug_hooks =
debug_nothing_tree, /* begin_function */
xcoffout_end_function,
debug_nothing_tree, /* function_decl */
- debug_nothing_tree, /* global_decl */
+ dbxout_global_decl, /* global_decl */
debug_nothing_tree, /* deferred_inline_function */
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx /* label */
@@ -623,6 +624,18 @@ dbxout_end_block (line, n)
ASM_OUTPUT_INTERNAL_LABEL (asmfile, "LBE", n);
}
+/* Debug information for a global DECL. Called from toplev.c after
+ compilation proper has finished. */
+static void
+dbxout_global_decl (decl)
+ tree decl;
+{
+ if (TREE_CODE (decl) == VAR_DECL
+ && ! DECL_EXTERNAL (decl)
+ && DECL_RTL_SET_P (decl)) /* Not necessary? */
+ dbxout_symbol (decl, 0);
+}
+
/* Output dbx data for a function definition.
This includes a definition of the function name itself (a symbol),
definitions of the parameters (locating them in the parameter list)