diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-07-17 19:47:58 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-07-17 19:47:58 +0000 |
commit | 653e276c6536663cda57bda038a9df4e64adb96f (patch) | |
tree | 9abd13faa762d57f769d9f43c78300834738874b /gcc/final.c | |
parent | 91a18fe0e6d96ec2cdad7d4f12ada3b4f5ed11e6 (diff) | |
download | gcc-653e276c6536663cda57bda038a9df4e64adb96f.zip gcc-653e276c6536663cda57bda038a9df4e64adb96f.tar.gz gcc-653e276c6536663cda57bda038a9df4e64adb96f.tar.bz2 |
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function.
* dbxout.c (dbxout_really_begin_function): Rename to
dbxout_begin_function.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_begin_function): Remove.
(dbxout_function): Update.
(dbxout_source_line): Update prototype.
* dbxout.h (dbxout_begin_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree): Update.
(debug_nothing_charstar_rtx): Remove.
* debug.h (union tree_node): Declare.
(struct rtx_def): Remove.
(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
begin_function. Change source_line prototype.
(debug_nothing_tree): New.
(debug_nothing_charstar_rtx): Delete.
(dwarf2out_begin_prologue): Moved from ...
* tree.h: ... here.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_begin_prologue): Update prototype. If genuine dwarf2
debug info, call dwarf2out_source_line.
(dwarf2out_souce_line): Update prototype.
* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
Change prototype, make static.
(dwarfout_source_line): Update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_function): Remove.
* final.c (final_start_function, final_scan_insn): Use appropriate
debug hooks, update to use notice_source_line.
(output_source_line): Rename notice_source_line. Don't call the
source_line debug hook.
* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
make static, update prototype.
(sdbout_mark_begin_function): Rename sdbout_begin_function, update
prototype.
(sdbout_end_prologue): New.
(sdbout_source_line): Update prototype.
(sdbout_debug_hooks): Update.
(sdbout_symbol): Remove unused var.
* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
Delete.
* varasm.c: Include debug.h.
(assemble_start_function): Use begin_function debug_hook.
* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update with prototype.
(xcoffout_source_line): Update prototype.
* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update prototype.
(xcoffout_source_line): Update prototype.
From-SVN: r44087
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 64 |
1 files changed, 14 insertions, 50 deletions
diff --git a/gcc/final.c b/gcc/final.c index 83b2297..6a8c298 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -252,7 +252,7 @@ static void profile_function PARAMS ((FILE *)); static void profile_after_prologue PARAMS ((FILE *)); static void add_bb PARAMS ((FILE *)); static int add_bb_string PARAMS ((const char *, int)); -static void output_source_line PARAMS ((rtx)); +static void notice_source_line PARAMS ((rtx)); static rtx walk_alter_subreg PARAMS ((rtx)); static void output_asm_name PARAMS ((void)); static void output_operand PARAMS ((rtx, int)); @@ -1576,37 +1576,16 @@ final_start_function (first, file, optimize) } #endif - /* Initial line number is supposed to be output - before the function's prologue and label - so that the function's address will not appear to be - in the last statement of the preceding function. */ if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED) - last_linenum = high_block_linenum = high_function_linenum - = NOTE_LINE_NUMBER (first); + notice_source_line (first); + high_block_linenum = high_function_linenum = last_linenum; -#if defined (DWARF2_UNWIND_INFO) || defined (IA64_UNWIND_INFO) \ - || defined (DWARF2_DEBUGGING_INFO) - dwarf2out_begin_prologue (); -#endif + (*debug_hooks->begin_prologue) (last_linenum, last_filename); - /* For SDB and XCOFF, the function beginning must be marked between - the function label and the prologue. We always need this, even when - -g1 was used. Defer on MIPS systems so that parameter descriptions - follow function entry. */ -#if defined(SDB_DEBUGGING_INFO) && !defined(MIPS_DEBUGGING_INFO) - if (write_symbols == SDB_DEBUG) - sdbout_begin_function (last_linenum); - else -#endif -#ifdef XCOFF_DEBUGGING_INFO - if (write_symbols == XCOFF_DEBUG) - xcoffout_begin_function (file, last_linenum); - else +#if defined (DWARF2_UNWIND_INFO) || defined (IA64_UNWIND_INFO) + if (write_symbols != DWARF2_DEBUG) + dwarf2out_begin_prologue (0, NULL); #endif - /* But only output line number for other debug info types if -g2 - or better. */ - if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED) - output_source_line (first); #ifdef LEAF_REG_REMAP if (current_function_uses_only_leaf_regs) @@ -2079,24 +2058,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) break; case NOTE_INSN_FUNCTION_BEG: -#if defined(SDB_DEBUGGING_INFO) && defined(MIPS_DEBUGGING_INFO) - /* MIPS stabs require the parameter descriptions to be after the - function entry point rather than before. */ - if (write_symbols == SDB_DEBUG) - { - app_disable (); - sdbout_begin_function (last_linenum); - } -#endif -#ifdef DWARF_DEBUGGING_INFO - /* This outputs a marker where the function body starts, so it - must be after the prologue. */ - if (write_symbols == DWARF_DEBUG) - { - app_disable (); - dwarfout_begin_function (); - } -#endif + app_disable (); + (*debug_hooks->end_prologue) (last_linenum); break; case NOTE_INSN_BLOCK_BEG: @@ -2191,7 +2154,10 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) /* Output this line note if it is the first or the last line note in a row. */ if (!note_after) - output_source_line (insn); + { + notice_source_line (insn); + (*debug_hooks->source_line) (last_linenum, last_filename); + } } break; } @@ -2906,7 +2872,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) based on the NOTE-insn INSN, assumed to be a line number. */ static void -output_source_line (insn) +notice_source_line (insn) rtx insn; { register const char *filename = NOTE_SOURCE_FILE (insn); @@ -2923,8 +2889,6 @@ output_source_line (insn) last_linenum = NOTE_LINE_NUMBER (insn); high_block_linenum = MAX (last_linenum, high_block_linenum); high_function_linenum = MAX (last_linenum, high_function_linenum); - - (*debug_hooks->source_line) (filename, insn); } /* For each operand in INSN, simplify (subreg (reg)) so that it refers |