From 15a564111c4a4a33c28444b4b0f1464bdee08fab Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 30 Jan 2002 00:19:23 +0000 Subject: [PATCH] * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes. (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended. (reg_save): Use DW_CFA_offset_extended_sf instead. * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49334 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 +++++++++-- gcc/dwarf2out.c | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 629d1d8..0e5fe05 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-01-28 Jason Merrill + + * dwarf2out.c (dwarf_cfi_name): Add other DWARF 3 codes. + (output_cfi): Likewise. Disable DW_CFA_GNU_negative_offset_extended. + (reg_save): Use DW_CFA_offset_extended_sf instead. + + * dwarf2out.c (dwarf2out_finish): Don't abort if there were errors. + 2002-01-29 Jakub Jelinek * cselib.c (cselib_record_sets): Use IF_THEN_ELSE result @@ -150,8 +158,7 @@ objc: 2002-01-28 Jason Merrill - * dwarf2.h (enum dwarf_call_frame_info): Add other DWARF 3 codes. - Sync with src version. + * dwarf2.h: Sync with src version. 2002-01-28 Paul Koning diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 18fcfb0..526766b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -473,8 +473,18 @@ dwarf_cfi_name (cfi_opc) return "DW_CFA_def_cfa_register"; case DW_CFA_def_cfa_offset: return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ case DW_CFA_def_cfa_expression: return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; /* SGI/MIPS specific */ case DW_CFA_MIPS_advance_loc8: @@ -768,10 +778,7 @@ reg_save (label, reg, sreg, offset) #endif offset /= DWARF_CIE_DATA_ALIGNMENT; if (offset < 0) - { - cfi->dw_cfi_opc = DW_CFA_GNU_negative_offset_extended; - offset = -offset; - } + cfi->dw_cfi_opc = DW_CFA_offset_extended_sf; cfi->dw_cfi_oprnd2.dw_cfi_offset = offset; } @@ -1714,13 +1721,19 @@ output_cfi (cfi, fde, for_eh) break; case DW_CFA_offset_extended: - case DW_CFA_GNU_negative_offset_extended: case DW_CFA_def_cfa: dw2_asm_output_data_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, NULL); dw2_asm_output_data_uleb128 (cfi->dw_cfi_oprnd2.dw_cfi_offset, NULL); break; + case DW_CFA_offset_extended_sf: + case DW_CFA_def_cfa_sf: + dw2_asm_output_data_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, + NULL); + dw2_asm_output_data_sleb128 (cfi->dw_cfi_oprnd2.dw_cfi_offset, NULL); + break; + case DW_CFA_restore_extended: case DW_CFA_undefined: case DW_CFA_same_value: @@ -1741,13 +1754,22 @@ output_cfi (cfi, fde, for_eh) dw2_asm_output_data_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_offset, NULL); break; + case DW_CFA_def_cfa_offset_sf: + dw2_asm_output_data_sleb128 (cfi->dw_cfi_oprnd1.dw_cfi_offset, NULL); + break; + case DW_CFA_GNU_window_save: break; case DW_CFA_def_cfa_expression: + case DW_CFA_expression: output_cfa_loc (cfi); break; + case DW_CFA_GNU_negative_offset_extended: + /* Obsoleted by DW_CFA_offset_extended_sf. */ + abort (); + default: break; } @@ -12049,6 +12071,9 @@ dwarf2out_finish (input_filename) (SAVE_EXPR_CONTEXT (node->created_for))))) add_child_die (origin, die); + else if (errorcount > 0 || sorrycount > 0) + /* It's OK to be confused by errors in the input. */ + add_child_die (comp_unit_die, die); else if (node->created_for && ((DECL_P (node->created_for) && (context = DECL_CONTEXT (node->created_for))) @@ -12066,9 +12091,6 @@ dwarf2out_finish (input_filename) abort (); add_child_die (origin, die); } - else if (errorcount > 0 || sorrycount > 0) - /* It's OK to be confused by errors in the input. */ - add_child_die (comp_unit_die, die); else abort (); } -- 2.7.4