From 3914abb46ef94ef60c9bb44c7e3573534c0c6815 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 22 Jul 2001 17:02:53 +0000 Subject: 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 From-SVN: r44243 --- gcc/dbxout.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gcc/dbxout.c') 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) -- cgit v1.1