This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Honor DWARF2_FRAME_INFO defined and not 0
- From: Olivier Hainque <hainque at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: hainque at adacore dot com
- Date: Sun, 27 Mar 2005 12:03:21 +0200
- Subject: [PATCH] Honor DWARF2_FRAME_INFO defined and not 0
Hello,
This is a followup to http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01487.html
The issue is .debug_frame sections not emitted without -g for
mips-sgi-irix6.5 configured with --with-gnu-as, despite those bits in
iris6.h:
/* Force the generation of dwarf .debug_frame sections even if not
compiling -g. This guarantees that we can unwind the stack. */
#define DWARF2_FRAME_INFO !TARGET_SGI_O32_AS
and what the documentation says about this macro.
We reach dwar2fout_frame_finish thanks to DWARF2_UNWIND_INFO defined and
dwarf2out_do_frame returning 1, but frame_finish, unlike do_frame, has no
check to honor the DWARF2_FRAME_INFO setting above.
The patch below addresses that by adjusting dwarf2out_frame_finish to
perform the same checks as in dwarf2out_fo_frame.
Bootstrapped and regression tested on mips-sgi-irix6.5 for languages=all,ada.
2005-03-27 Olivier Hainque <hainque@adacore.com>
* dwarf2out.c (dwarf2out_frame_finish): Honor DWARF2_FRAME_INFO
defined and non-zero.
*** ./dwarf2out.c.ori Sun Mar 27 04:47:49 2005
--- ./dwarf2out.c Thu Mar 17 16:15:35 2005
*************** void
*** 2468,2474 ****
dwarf2out_frame_finish (void)
{
/* Output call frame information. */
! if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
output_call_frame_info (0);
#ifndef TARGET_UNWIND_INFO
--- 2468,2479 ----
dwarf2out_frame_finish (void)
{
/* Output call frame information. */
! if (write_symbols == DWARF2_DEBUG
! || write_symbols == VMS_AND_DWARF2_DEBUG
! #ifdef DWARF2_FRAME_INFO
! || DWARF2_FRAME_INFO
! #endif
! )
output_call_frame_info (0);
#ifndef TARGET_UNWIND_INFO