From: Richard Kenner Date: Fri, 28 Jul 1995 13:02:42 +0000 (-0400) Subject: (final_start_function): If SDB_DEBUG, call sdbout_begin_function. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e2bbce29a23563ec681f2f5e9991e735d4e02e5;p=platform%2Fupstream%2Fgcc.git (final_start_function): If SDB_DEBUG, call sdbout_begin_function. If XCOFF_DEBUG, call xcoffout_begin_function instead of xcoffout_output_first_source_line. (final_scan_insn): Don't call sdbout_begin_function or xcoffout_begin_function. From-SVN: r10181 --- diff --git a/gcc/final.c b/gcc/final.c index f8a2277..2e2c6e1 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -891,19 +891,19 @@ final_start_function (first, file, optimize) last_linenum = high_block_linenum = high_function_linenum = NOTE_LINE_NUMBER (first); + /* For SDB and XCOFF, the function beginning must be marked between + the function label and the prologue. */ +#ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG) - /* For sdb, let's not, but say we did. - We need to set last_linenum for sdbout_function_begin, - but we can't have an actual line number before the .bf symbol. - (sdb_begin_function_line is not set, - and other compilers don't do it.) */ - ; + sdbout_begin_function (last_linenum); + else +#endif #ifdef XCOFF_DEBUGGING_INFO - else if (write_symbols == XCOFF_DEBUG) - xcoffout_output_first_source_line (file, last_linenum); + if (write_symbols == XCOFF_DEBUG) + xcoffout_begin_function (file, last_linenum); + else #endif - else - output_source_line (file, first); + output_source_line (file, first); } #ifdef LEAF_REG_REMAP @@ -1312,15 +1312,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) break; if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) { -#ifdef SDB_DEBUGGING_INFO - if (write_symbols == SDB_DEBUG) - sdbout_begin_function (last_linenum); -#endif -#ifdef XCOFF_DEBUGGING_INFO - if (write_symbols == XCOFF_DEBUG) - xcoffout_begin_function (file, 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) dwarfout_begin_function (); #endif