Commit 27d95cbe by Richard Henderson Committed by Richard Henderson

dwarf2out.c (FRAME_BEGIN_LABEL): New.

        * dwarf2out.c (FRAME_BEGIN_LABEL): New.
        (output_call_frame_info): Use it instead of __FRAME_BEGIN__ and
        the gas section-name-as-label feature.

From-SVN: r46037
parent 2600825e
2001-10-05 Richard Henderson <rth@redhat.com>
* dwarf2out.c (FRAME_BEGIN_LABEL): New.
(output_call_frame_info): Use it instead of __FRAME_BEGIN__ and
the gas section-name-as-label feature.
2001-10-05 Neil Booth <neil@daikokuya.demon.co.uk> 2001-10-05 Neil Booth <neil@daikokuya.demon.co.uk>
* doc/cppinternals.texi: Update. * doc/cppinternals.texi: Update.
......
...@@ -288,6 +288,7 @@ static void def_cfa_1 PARAMS ((const char *, dw_cfa_location *)); ...@@ -288,6 +288,7 @@ static void def_cfa_1 PARAMS ((const char *, dw_cfa_location *));
#ifndef FUNC_END_LABEL #ifndef FUNC_END_LABEL
#define FUNC_END_LABEL "LFE" #define FUNC_END_LABEL "LFE"
#endif #endif
#define FRAME_BEGIN_LABEL "Lframe"
#define CIE_AFTER_SIZE_LABEL "LSCIE" #define CIE_AFTER_SIZE_LABEL "LSCIE"
#define CIE_END_LABEL "LECIE" #define CIE_END_LABEL "LECIE"
#define CIE_LENGTH_LABEL "LLCIE" #define CIE_LENGTH_LABEL "LLCIE"
...@@ -1708,7 +1709,7 @@ output_call_frame_info (for_eh) ...@@ -1708,7 +1709,7 @@ output_call_frame_info (for_eh)
register unsigned int i; register unsigned int i;
register dw_fde_ref fde; register dw_fde_ref fde;
register dw_cfi_ref cfi; register dw_cfi_ref cfi;
char l1[20], l2[20]; char l1[20], l2[20], section_start_label[20];
int any_lsda_needed = 0; int any_lsda_needed = 0;
char augmentation[6]; char augmentation[6];
int augmentation_size; int augmentation_size;
...@@ -1747,11 +1748,13 @@ output_call_frame_info (for_eh) ...@@ -1747,11 +1748,13 @@ output_call_frame_info (for_eh)
ASM_GLOBALIZE_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); ASM_GLOBALIZE_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
#endif #endif
assemble_label ("__FRAME_BEGIN__");
} }
else else
named_section_flags (DEBUG_FRAME_SECTION, SECTION_DEBUG); named_section_flags (DEBUG_FRAME_SECTION, SECTION_DEBUG);
ASM_GENERATE_INTERNAL_LABEL (section_start_label, FRAME_BEGIN_LABEL, for_eh);
ASM_OUTPUT_LABEL (asm_out_file, section_start_label);
/* Output the CIE. */ /* Output the CIE. */
ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh); ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh);
ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh); ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh);
...@@ -1882,19 +1885,10 @@ output_call_frame_info (for_eh) ...@@ -1882,19 +1885,10 @@ output_call_frame_info (for_eh)
"FDE Length"); "FDE Length");
ASM_OUTPUT_LABEL (asm_out_file, l1); ASM_OUTPUT_LABEL (asm_out_file, l1);
/* ??? This always emits a 4 byte offset when for_eh is true, but it
emits a target dependent sized offset when for_eh is not true.
This inconsistency may confuse gdb. The only case where we need a
non-4 byte offset is for the Irix6 N64 ABI, so we may lose SGI
compatibility if we emit a 4 byte offset. We need a 4 byte offset
though in order to be compatible with the dwarf_fde struct in frame.c.
If the for_eh case is changed, then the struct in frame.c has
to be adjusted appropriately. */
if (for_eh) if (for_eh)
dw2_asm_output_delta (4, l1, "__FRAME_BEGIN__", "FDE CIE offset"); dw2_asm_output_delta (4, l1, section_start_label, "FDE CIE offset");
else else
dw2_asm_output_offset (DWARF_OFFSET_SIZE, dw2_asm_output_offset (DWARF_OFFSET_SIZE, section_start_label,
stripattributes (DEBUG_FRAME_SECTION),
"FDE CIE offset"); "FDE CIE offset");
if (for_eh) if (for_eh)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment