tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate if this label is for eh.

* doc/tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate
	if this label is for eh.
	* config/darwin-protos.h (darwin_emit_unwind_label): Likewise.
	* config/darwin.c (darwin_emit_unwind_label): Likewise.
	* dwarf2out.c (output_call_frame_info): Likewise.
	* output.h (default_emit_unwind_label): Likewise.
	* target.h (unwind_label): Likewise.
	* varasm.c (default_emit_unwind_label): Likewise.

	* config/darwin.h (DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE,
	DEBUG_FRAME_SECTION, DEBUG_INFO_SECTION, DEBUG_ABBREV_SECTION,
	DEBUG_ARANGES_SECTION, DEBUG_MACINFO_SECTION, DEBUG_LINE_SECTION,
	DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_STR_SECTION,
	DEBUG_RANGES_SECTION): Define.

Radar 3657068.

Co-Authored-By: Devang Patel <dpatel@apple.com>

From-SVN: r82016
This commit is contained in:
Mike Stump 2004-05-19 02:11:42 +00:00 committed by Mike Stump
parent bb9a388dad
commit eeab4d81a6
9 changed files with 55 additions and 13 deletions

View File

@ -1,3 +1,21 @@
2004-05-18 Mike Stump <mrs@apple.com>
Devang Patel <dpatel@apple.com>
* doc/tm.texi (TARGET_ASM_EMIT_UNWIND_LABEL): Add argument to indicate
if this label is for eh.
* config/darwin-protos.h (darwin_emit_unwind_label): Likewise.
* config/darwin.c (darwin_emit_unwind_label): Likewise.
* dwarf2out.c (output_call_frame_info): Likewise.
* output.h (default_emit_unwind_label): Likewise.
* target.h (unwind_label): Likewise.
* varasm.c (default_emit_unwind_label): Likewise.
* config/darwin.h (DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE,
DEBUG_FRAME_SECTION, DEBUG_INFO_SECTION, DEBUG_ABBREV_SECTION,
DEBUG_ARANGES_SECTION, DEBUG_MACINFO_SECTION, DEBUG_LINE_SECTION,
DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_STR_SECTION,
DEBUG_RANGES_SECTION): Define.
2004-05-18 Zack Weinberg <zack@codesourcery.com>
* cgraph.c (hash_node, eq_node, cgraph_node, cgraph_remove_node)

View File

@ -76,7 +76,7 @@ extern void darwin_asm_named_section (const char *, unsigned int);
extern unsigned int darwin_section_type_flags (tree, const char *, int);
extern void darwin_non_lazy_pcrel (FILE *, rtx);
extern void darwin_emit_unwind_label(FILE *, tree, int);
extern void darwin_emit_unwind_label (FILE *, tree, int, int);
extern void darwin_pragma_ignore (struct cpp_reader *);
extern void darwin_pragma_options (struct cpp_reader *);

View File

@ -1334,10 +1334,12 @@ darwin_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED)
}
/* Emit a label for an FDE, making it global and/or weak if appropriate.
The third parameter is nonzero if this is just a placeholder for an
The third parameter is nonzero if this is for exception handling.
The fourth parameter is nonzero if this is just a placeholder for an
FDE that we are omitting. */
void
darwin_emit_unwind_label(FILE *file, tree decl, int empty)
darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty)
{
tree id = DECL_ASSEMBLER_NAME (decl)
? DECL_ASSEMBLER_NAME (decl)
@ -1350,12 +1352,15 @@ darwin_emit_unwind_label(FILE *file, tree decl, int empty)
unsigned int base_len = IDENTIFIER_LENGTH (id);
const char *suffix = ".eh";
unsigned int suffix_len = 3;
int need_quotes = name_needs_quotes (base);
int quotes_len = need_quotes ? 2 : 0;
char *lab;
char *lab = xmalloc (prefix_len + base_len + suffix_len + quotes_len + 1);
if (! for_eh)
suffix = ".eh1";
lab = xmalloc (prefix_len + base_len + strlen (suffix) + quotes_len + 1);
lab[0] = '\0';
if (need_quotes)
@ -1385,6 +1390,7 @@ darwin_emit_unwind_label(FILE *file, tree decl, int empty)
}
/* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */
void
darwin_non_lazy_pcrel (FILE *file, rtx addr)
{

View File

@ -304,6 +304,21 @@ Boston, MA 02111-1307, USA. */
#define DBX_DEBUGGING_INFO 1
/* Also enable Dwarf 2 as an option. */
#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define DEBUG_FRAME_SECTION "__DWARFA,__debug_frame,coalesced,no_toc+strip_static_syms"
#define DEBUG_INFO_SECTION "__DWARFA,__debug_info"
#define DEBUG_ABBREV_SECTION "__DWARFA,__debug_abbrev"
#define DEBUG_ARANGES_SECTION "__DWARFA,__debug_aranges"
#define DEBUG_MACINFO_SECTION "__DWARFA,__debug_macinfo"
#define DEBUG_LINE_SECTION "__DWARFA,__debug_line"
#define DEBUG_LOC_SECTION "__DWARFA,__debug_loc"
#define DEBUG_PUBNAMES_SECTION "__DWARFA,__debug_pubnames"
#define DEBUG_STR_SECTION "__DWARFA,__debug_str"
#define DEBUG_RANGES_SECTION "__DWARFA,__debug_ranges"
/* When generating stabs debugging, use N_BINCL entries. */
#define DBX_USE_BINCL

View File

@ -7493,13 +7493,14 @@ If this macro is not defined, nothing special is output at the end of
the jump-table.
@end defmac
@deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (@var{stream}, @var{decl}, @var{empty})
@deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (@var{stream}, @var{decl}, @var{for_eh}, @var{empty})
This target hook emits a label at the beginning of each FDE. It
should be defined on targets where FDEs need special labels, and it
should write the appropriate label, for the FDE associated with the
function declaration @var{decl}, to the stdio stream @var{stream}.
The third argument, @var{empty}, is a boolean: true if this is a
placeholder label for an omitted FDE.
The third argument, @var{for_eh}, is a boolean: true if this is for an
exception table. The fourth argument, @var{empty}, is a boolean:
true if this is a placeholder label for an omitted FDE.
The default is that FDEs are not given nonlocal labels.
@end deftypefn

View File

@ -1959,7 +1959,7 @@ output_call_frame_info (int for_eh)
&& !fde_table[i].uses_eh_lsda
&& ! DECL_ONE_ONLY (fde_table[i].decl))
targetm.asm_out.unwind_label (asm_out_file, fde_table[i].decl,
/* empty */ 1);
for_eh, /* empty */ 1);
/* If we don't have any functions we'll want to unwind out of, don't
emit any EH unwind information. Note that if exceptions aren't
@ -2123,7 +2123,7 @@ output_call_frame_info (int for_eh)
&& !fde->uses_eh_lsda)
continue;
targetm.asm_out.unwind_label (asm_out_file, fde->decl, /* empty */ 0);
targetm.asm_out.unwind_label (asm_out_file, fde->decl, for_eh, /* empty */ 0);
targetm.asm_out.internal_label (asm_out_file, FDE_LABEL, for_eh + i * 2);
ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i * 2);
ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i * 2);

View File

@ -515,7 +515,7 @@ extern const char *default_strip_name_encoding (const char *);
extern bool default_binds_local_p (tree);
extern bool default_binds_local_p_1 (tree, int);
extern void default_globalize_label (FILE *, const char *);
extern void default_emit_unwind_label (FILE *, tree, int);
extern void default_emit_unwind_label (FILE *, tree, int, int);
extern void default_internal_label (FILE *, const char *, unsigned long);
extern void default_file_start (void);
extern void file_end_indicate_exec_stack (void);

View File

@ -76,9 +76,10 @@ struct gcc_target
/* Output code that will emit a label for unwind info, if this
target requires such labels. Second argument is the decl the
unwind info is associated with, third is is a boolean: true if
unwind info is associated with, third is a boolean: true if
this is for exception handling, fourth is a boolean: true if
this is only a placeholder for an omitted FDE. */
void (* unwind_label ) (FILE *, tree, int);
void (* unwind_label) (FILE *, tree, int, int);
/* Output an internal label. */
void (* internal_label) (FILE *, const char *, unsigned long);

View File

@ -5000,6 +5000,7 @@ default_globalize_label (FILE * stream, const char *name)
void
default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED,
int for_eh ATTRIBUTE_UNUSED,
int empty ATTRIBUTE_UNUSED)
{
}