diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1997-09-10 14:00:28 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1997-09-10 14:00:28 -0400 |
commit | 0021b564f4ce0b648a8d6ec49b29afe609370788 (patch) | |
tree | 0928096722cf7e87c6973bd7bb029f787ab959db /gcc/final.c | |
parent | 0680d170431a1a44f958ca97a9ce01ea12b676b6 (diff) | |
download | gcc-0021b564f4ce0b648a8d6ec49b29afe609370788.zip gcc-0021b564f4ce0b648a8d6ec49b29afe609370788.tar.gz gcc-0021b564f4ce0b648a8d6ec49b29afe609370788.tar.bz2 |
dwarf2 EH support
From-SVN: r15255
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gcc/final.c b/gcc/final.c index a7fe94d..48e1a08 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -955,9 +955,9 @@ final_start_function (first, file, optimize) last_linenum = high_block_linenum = high_function_linenum = NOTE_LINE_NUMBER (first); -#ifdef DWARF2_DEBUGGING_INFO +#if defined (DWARF2_UNWIND_INFO) /* Output DWARF definition of the function. */ - if (write_symbols == DWARF2_DEBUG) + if (dwarf2out_do_frame ()) dwarf2out_begin_prologue (); #endif @@ -992,6 +992,11 @@ final_start_function (first, file, optimize) profile_function (file); #endif /* PROFILE_BEFORE_PROLOGUE */ +#if defined (DWARF2_UNWIND_INFO) && defined (HAVE_prologue) + if (dwarf2out_do_frame ()) + dwarf2out_frame_debug (NULL_RTX); +#endif + #ifdef FUNCTION_PROLOGUE /* First output the function prologue: code to set up the stack frame. */ FUNCTION_PROLOGUE (file, get_frame_size ()); @@ -1142,8 +1147,8 @@ final_end_function (first, file, optimize) dwarfout_end_epilogue (); #endif -#ifdef DWARF2_DEBUGGING_INFO - if (write_symbols == DWARF2_DEBUG) +#if defined (DWARF2_UNWIND_INFO) + if (dwarf2out_do_frame ()) dwarf2out_end_epilogue (); #endif @@ -1265,11 +1270,6 @@ final (first, file, optimize, prescan) last_ignored_compare = 0; new_block = 1; -#if defined (DWARF2_DEBUGGING_INFO) && defined (HAVE_prologue) - if (write_symbols == DWARF2_DEBUG) - dwarf2out_frame_debug (NULL_RTX); -#endif - check_exception_handler_labels (); /* Make a map indicating which line numbers appear in this function. @@ -2171,12 +2171,21 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) output_asm_insn (template, recog_operand); -#if defined (DWARF2_DEBUGGING_INFO) && defined (HAVE_prologue) +#if defined (DWARF2_UNWIND_INFO) +#if !defined (ACCUMULATE_OUTGOING_ARGS) + /* If we push arguments, we need to check all insns for stack + adjustments. */ + if (dwarf2out_do_frame ()) + dwarf2out_frame_debug (insn); +#else +#if defined (HAVE_prologue) /* If this insn is part of the prologue, emit DWARF v2 call frame info. */ - if (write_symbols == DWARF2_DEBUG && RTX_FRAME_RELATED_P (insn)) + if (RTX_FRAME_RELATED_P (insn) && dwarf2out_do_frame ()) dwarf2out_frame_debug (insn); #endif +#endif +#endif #if 0 /* It's not at all clear why we did this and doing so interferes |