diff options
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 297 |
1 files changed, 222 insertions, 75 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index e7a7738816d..55c7ee535ee 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -229,6 +229,10 @@ struct dbx_file static struct dbx_file *current_file; #endif +/* APPLE LOCAL begin ss2 */ +/* This is the output file used by dbxout routines. */ +static FILE *dbx_out_file; +/* APPLE LOCAL end ss2 */ /* This is the next file number to use. */ static GTY(()) int next_file_number; @@ -343,7 +347,7 @@ static void dbxout_handle_pch (unsigned); static void dbxout_source_line (unsigned int, const char *); static void dbxout_begin_prologue (unsigned int, const char *); static void dbxout_source_file (const char *); -static void dbxout_function_end (void); +static void dbxout_function_end (tree); static void dbxout_begin_function (tree); static void dbxout_begin_block (unsigned, unsigned); static void dbxout_end_block (unsigned, unsigned); @@ -378,7 +382,8 @@ const struct gcc_debug_hooks dbx_debug_hooks = debug_nothing_tree, /* outlining_inline_function */ debug_nothing_rtx, /* label */ dbxout_handle_pch, /* handle_pch */ - debug_nothing_rtx /* var_location */ + debug_nothing_rtx, /* var_location */ + 0 /* start_end_main_source_file */ }; #endif /* DBX_DEBUGGING_INFO */ @@ -408,7 +413,8 @@ const struct gcc_debug_hooks xcoff_debug_hooks = debug_nothing_tree, /* outlining_inline_function */ debug_nothing_rtx, /* label */ dbxout_handle_pch, /* handle_pch */ - debug_nothing_rtx /* var_location */ + debug_nothing_rtx, /* var_location */ + 0 /* start_end_main_source_file */ }; #endif /* XCOFF_DEBUGGING_INFO */ @@ -423,7 +429,8 @@ const struct gcc_debug_hooks xcoff_debug_hooks = } \ while (NUM > 0) -/* Utility: write a decimal integer NUM to asm_out_file. */ +/* APPLE LOCAL ss2 */ +/* Utility: write a decimal integer NUM to dbx_out_file. */ void dbxout_int (int num) { @@ -433,12 +440,14 @@ dbxout_int (int num) if (num == 0) { - putc ('0', asm_out_file); + /* APPLE LOCAL ss2 */ + putc ('0', dbx_out_file); return; } if (num < 0) { - putc ('-', asm_out_file); + /* APPLE LOCAL ss2 */ + putc ('-', dbx_out_file); unum = -num; } else @@ -448,7 +457,8 @@ dbxout_int (int num) while (p < buf + sizeof buf) { - putc (*p, asm_out_file); + /* APPLE LOCAL ss2 */ + putc (*p, dbx_out_file); p++; } } @@ -468,15 +478,18 @@ dbxout_int (int num) void dbxout_stab_value_zero (void) { - fputs ("0\n", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs ("0\n", dbx_out_file); } /* Write out the label LABEL as the value of a stab. */ void dbxout_stab_value_label (const char *label) { - assemble_name (asm_out_file, label); - putc ('\n', asm_out_file); + /* APPLE LOCAL begin ss2 */ + assemble_name (dbx_out_file, label); + putc ('\n', dbx_out_file); + /* APPLE LOCAL end ss2 */ } /* Write out the difference of two labels, LABEL - BASE, as the value @@ -484,10 +497,12 @@ dbxout_stab_value_label (const char *label) void dbxout_stab_value_label_diff (const char *label, const char *base) { - assemble_name (asm_out_file, label); - putc ('-', asm_out_file); - assemble_name (asm_out_file, base); - putc ('\n', asm_out_file); + /* APPLE LOCAL begin ss2 */ + assemble_name (dbx_out_file, label); + putc ('-', dbx_out_file); + assemble_name (dbx_out_file, base); + putc ('\n', dbx_out_file); + /* APPLE LOCAL end ss2 */ } /* Write out an internal label as the value of a stab, and immediately @@ -503,7 +518,8 @@ dbxout_stab_value_internal_label (const char *stem, int *counterp) ASM_GENERATE_INTERNAL_LABEL (label, stem, counter); dbxout_stab_value_label (label); - targetm.asm_out.internal_label (asm_out_file, stem, counter); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, stem, counter); } /* Write out the difference between BASE and an internal label as the @@ -518,20 +534,25 @@ dbxout_stab_value_internal_label_diff (const char *stem, int *counterp, ASM_GENERATE_INTERNAL_LABEL (label, stem, counter); dbxout_stab_value_label_diff (label, base); - targetm.asm_out.internal_label (asm_out_file, stem, counter); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, stem, counter); } /* The following functions produce specific kinds of stab directives. */ -/* Write a .stabd directive with type STYPE and desc SDESC to asm_out_file. */ +/* APPLE LOCAL ss2 */ +/* Write a .stabd directive with type STYPE and desc SDESC to dbx_out_file. */ void dbxout_stabd (int stype, int sdesc) { - fputs (ASM_STABD_OP, asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABD_OP, dbx_out_file); dbxout_int (stype); - fputs (",0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,", dbx_out_file); dbxout_int (sdesc); - putc ('\n', asm_out_file); + /* APPLE LOCAL ss2 */ + putc ('\n', dbx_out_file); } /* Write a .stabn directive with type STYPE. This function stops @@ -542,9 +563,11 @@ dbxout_stabd (int stype, int sdesc) void dbxout_begin_stabn (int stype) { - fputs (ASM_STABN_OP, asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABN_OP, dbx_out_file); dbxout_int (stype); - fputs (",0,0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,0,", dbx_out_file); } /* Write a .stabn directive with type N_SLINE and desc LINE. As above, @@ -552,11 +575,14 @@ dbxout_begin_stabn (int stype) void dbxout_begin_stabn_sline (int lineno) { - fputs (ASM_STABN_OP, asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABN_OP, dbx_out_file); dbxout_int (N_SLINE); - fputs (",0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,", dbx_out_file); dbxout_int (lineno); - putc (',', asm_out_file); + /* APPLE LOCAL ss2 */ + putc (',', dbx_out_file); } /* Begin a .stabs directive with string "", type STYPE, and desc and @@ -565,10 +591,13 @@ dbxout_begin_stabn_sline (int lineno) void dbxout_begin_empty_stabs (int stype) { - fputs (ASM_STABS_OP, asm_out_file); - fputs ("\"\",", asm_out_file); + /* APPLE LOCAL begin ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + fputs ("\"\",", dbx_out_file); + /* APPLE LOCAL end ss2 */ dbxout_int (stype); - fputs (",0,0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,0,", dbx_out_file); } /* Begin a .stabs directive with string STR, type STYPE, and desc 0. @@ -576,24 +605,31 @@ dbxout_begin_empty_stabs (int stype) void dbxout_begin_simple_stabs (const char *str, int stype) { - fputs (ASM_STABS_OP, asm_out_file); - output_quoted_string (asm_out_file, str); - putc (',', asm_out_file); + /* APPLE LOCAL begin ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + output_quoted_string (dbx_out_file, str); + putc (',', dbx_out_file); + /* APPLE LOCAL end ss2 */ dbxout_int (stype); - fputs (",0,0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,0,", dbx_out_file); } /* As above but use SDESC for the desc field. */ void dbxout_begin_simple_stabs_desc (const char *str, int stype, int sdesc) { - fputs (ASM_STABS_OP, asm_out_file); - output_quoted_string (asm_out_file, str); - putc (',', asm_out_file); + /* APPLE LOCAL begin ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + output_quoted_string (dbx_out_file, str); + putc (',', dbx_out_file); + /* APPLE LOCAL end ss2 */ dbxout_int (stype); - fputs (",0,", asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (",0,", dbx_out_file); dbxout_int (sdesc); - putc (',', asm_out_file); + /* APPLE LOCAL ss2 */ + putc (',', dbx_out_file); } /* The next set of functions are entirely concerned with production of @@ -607,15 +643,17 @@ dbxout_begin_simple_stabs_desc (const char *str, int stype, int sdesc) out not to be the case, and anyway this needs fewer #ifdefs.) */ /* Begin a complex .stabs directive. If we can, write the initial - ASM_STABS_OP to the asm_out_file. */ + ASM_STABS_OP to the dbx_out_file. */ static void dbxout_begin_complex_stabs (void) { emit_pending_bincls_if_required (); FORCE_TEXT; - fputs (ASM_STABS_OP, asm_out_file); - putc ('"', asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + /* APPLE LOCAL ss2 */ + putc ('"', dbx_out_file); gcc_assert (stabstr_last_contin_point == 0); } @@ -624,8 +662,10 @@ dbxout_begin_complex_stabs (void) static void dbxout_begin_complex_stabs_noforcetext (void) { - fputs (ASM_STABS_OP, asm_out_file); - putc ('"', asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + /* APPLE LOCAL ss2 */ + putc ('"', dbx_out_file); gcc_assert (stabstr_last_contin_point == 0); } @@ -815,18 +855,19 @@ stabstr_continue (void) #define DBX_FINISH_STABS(SYM, CODE, LINE, ADDR, LABEL, NUMBER) \ do { \ int line_ = use_gnu_debug_info_extensions ? LINE : 0; \ - \ +/* APPLE LOCAL begin ss2 */ \ dbxout_int (CODE); \ - fputs (",0,", asm_out_file); \ + fputs (",0,", dbx_out_file); \ dbxout_int (line_); \ - putc (',', asm_out_file); \ + putc (',', dbx_out_file); \ if (ADDR) \ - output_addr_const (asm_out_file, ADDR); \ + output_addr_const (dbx_out_file, ADDR); \ else if (LABEL) \ - assemble_name (asm_out_file, LABEL); \ + assemble_name (dbx_out_file, LABEL); \ else \ dbxout_int (NUMBER); \ - putc ('\n', asm_out_file); \ + putc ('\n', dbx_out_file); \ +/* APPLE LOCAL end ss2 */ \ } while (0) #endif @@ -867,8 +908,10 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code, for (;;) { chunklen = strlen (chunk); - fwrite (chunk, 1, chunklen, asm_out_file); - fputs ("\",", asm_out_file); + /* APPLE LOCAL ss2 */ + fwrite (chunk, 1, chunklen, dbx_out_file); + /* APPLE LOCAL ss2 */ + fputs ("\",", dbx_out_file); /* Must add an extra byte to account for the NUL separator. */ chunk += chunklen + 1; @@ -880,8 +923,10 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code, if (len == 0) break; - fputs (ASM_STABS_OP, asm_out_file); - putc ('"', asm_out_file); + /* APPLE LOCAL ss2 */ + fputs (ASM_STABS_OP, dbx_out_file); + /* APPLE LOCAL ss2 */ + putc ('"', dbx_out_file); } stabstr_last_contin_point = 0; } @@ -894,7 +939,8 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code, len = obstack_object_size (&stabstr_ob); str = obstack_finish (&stabstr_ob); - fwrite (str, 1, len, asm_out_file); + /* APPLE LOCAL ss2 */ + fwrite (str, 1, len, dbx_out_file); DBX_FINISH_STABS (sym, code, line, addr, label, number); } obstack_free (&stabstr_ob, str); @@ -903,7 +949,7 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code, #if defined (DBX_DEBUGGING_INFO) static void -dbxout_function_end (void) +dbxout_function_end (tree decl) { char lscope_label_name[100]; @@ -915,7 +961,8 @@ dbxout_function_end (void) the system doesn't insert underscores in front of user generated labels. */ ASM_GENERATE_INTERNAL_LABEL (lscope_label_name, "Lscope", scope_labelno); - targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, "Lscope", scope_labelno); scope_labelno++; /* The N_FUN tag at the end of the function is a GNU extension, @@ -923,13 +970,15 @@ dbxout_function_end (void) named sections. */ if (!use_gnu_debug_info_extensions || NO_DBX_FUNCTION_END - || !targetm.have_named_sections) + || !targetm.have_named_sections + || DECL_IGNORED_P (decl)) return; /* By convention, GCC will mark the end of a function with an N_FUN symbol and an empty string. */ #ifdef DBX_OUTPUT_NFUN - DBX_OUTPUT_NFUN (asm_out_file, lscope_label_name, current_function_decl); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_NFUN (dbx_out_file, lscope_label_name, current_function_decl); #else dbxout_begin_empty_stabs (N_FUN); dbxout_stab_value_label_diff (lscope_label_name, @@ -960,6 +1009,10 @@ get_lang_number (void) return N_SO_PASCAL; else if (strcmp (language_string, "GNU Objective-C") == 0) return N_SO_OBJC; + /* APPLE LOCAL begin mainline */ + else if (strcmp (language_string, "GNU Objective-C++") == 0) + return N_SO_OBJCPLUS; + /* APPLE LOCAL end mainline */ else return 0; @@ -978,6 +1031,21 @@ dbxout_init (const char *input_file_name) typevec_len = 100; typevec = ggc_calloc (typevec_len, sizeof typevec[0]); + /* APPLE LOCAL begin ss2 */ + /* Open dbx_out_file */ + if (flag_save_repository + && flag_pch_file + && !flag_debug_only_used_symbols + && asm_file_name + && strcmp (asm_file_name, "-")) + { + dbx_out_file = fopen (asm_file_name, "w+b"); + if (dbx_out_file == 0) + fatal_error ("can%'t open %s for writing: %m", asm_file_name); + } + else + dbx_out_file = asm_out_file; + /* APPLE LOCAL end ss2 */ /* stabstr_ob contains one string, which will be just fine with 1-byte alignment. */ obstack_specify_allocation (&stabstr_ob, 0, 1, xmalloc, free); @@ -1001,7 +1069,8 @@ dbxout_init (const char *input_file_name) cwd = concat (cwd, "/", NULL); } #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY - DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (dbx_out_file, cwd); #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ dbxout_begin_simple_stabs_desc (cwd, N_SO, get_lang_number ()); dbxout_stab_value_label (ltext_label_name); @@ -1010,7 +1079,8 @@ dbxout_init (const char *input_file_name) } #ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME - DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, input_file_name); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_MAIN_SOURCE_FILENAME (dbx_out_file, input_file_name); #else dbxout_begin_simple_stabs_desc (input_file_name, N_SO, get_lang_number ()); dbxout_stab_value_label (ltext_label_name); @@ -1020,7 +1090,8 @@ dbxout_init (const char *input_file_name) if (used_ltext_label_name) { text_section (); - targetm.asm_out.internal_label (asm_out_file, "Ltext", 0); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, "Ltext", 0); } /* Emit an N_OPT stab to indicate that this file was compiled by GCC. @@ -1045,6 +1116,13 @@ dbxout_init (const char *input_file_name) current_file->pending_bincl_name = NULL; #endif +/* APPLE LOCAL begin gdb only used symbols */ +#ifndef DBX_ONLY_USED_SYMBOLS + dbxout_symbol (TYPE_NAME (integer_type_node), 0); + dbxout_symbol (TYPE_NAME (char_type_node), 0); +#endif +/* APPLE LOCAL end gdb only used symbols */ + /* Get all permanent types that have typedef names, and output them all, except for those already output. Some language front ends put these declarations in the top-level scope; some do not; @@ -1085,8 +1163,30 @@ dbxout_typedefs (tree syms) static void emit_bincl_stab (const char *name) { + /* APPLE LOCAL ss2 */ + static unsigned int dbx_checksum; + dbxout_begin_simple_stabs (name, N_BINCL); - dbxout_stab_value_zero (); + + /* APPLE LOCAL begin ss2 */ + if (flag_save_repository + && flag_pch_file + && !flag_debug_only_used_symbols) + { + /* Include dummy checksum with BINCL stab while creating + symbol repoistory. Add corrosponding EXCL stab in + asm file. */ + dbx_checksum = crc32_string (42, name); + + fprintf (asm_out_file, "%s", ASM_STABS_OP); + output_quoted_string (asm_out_file, name); + fprintf (asm_out_file, ",%d,0,0,%d\n", N_EXCL, dbx_checksum); + + fprintf (dbx_out_file, "%d\n", dbx_checksum); + } + else + dbxout_stab_value_zero (); + /* APPLE LOCAL end ss2 */ } /* If there are pending bincls then it is time to emit all of them. */ @@ -1249,7 +1349,8 @@ dbxout_source_line (unsigned int lineno, const char *filename) dbxout_source_file (filename); #ifdef DBX_OUTPUT_SOURCE_LINE - DBX_OUTPUT_SOURCE_LINE (asm_out_file, lineno, dbxout_source_line_counter); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_SOURCE_LINE (dbx_out_file, lineno, dbxout_source_line_counter); #else if (DBX_LINES_FUNCTION_RELATIVE) { @@ -1270,7 +1371,8 @@ static void dbxout_begin_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n) { emit_pending_bincls_if_required (); - targetm.asm_out.internal_label (asm_out_file, "LBB", n); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, "LBB", n); } /* Describe the end line-number of an internal block within a function. */ @@ -1279,7 +1381,8 @@ static void dbxout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n) { emit_pending_bincls_if_required (); - targetm.asm_out.internal_label (asm_out_file, "LBE", n); + /* APPLE LOCAL ss2 */ + targetm.asm_out.internal_label (dbx_out_file, "LBE", n); } /* Output dbx data for a function definition. @@ -1296,7 +1399,7 @@ dbxout_function_decl (tree decl) dbxout_begin_function (decl); #endif dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl)); - dbxout_function_end (); + dbxout_function_end (decl); } #endif /* DBX_DEBUGGING_INFO */ @@ -1332,7 +1435,8 @@ static void dbxout_finish (const char *filename ATTRIBUTE_UNUSED) { #ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END - DBX_OUTPUT_MAIN_SOURCE_FILE_END (asm_out_file, filename); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_MAIN_SOURCE_FILE_END (dbx_out_file, filename); #elif defined DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END { text_section (); @@ -1341,6 +1445,18 @@ dbxout_finish (const char *filename ATTRIBUTE_UNUSED) } #endif debug_free_queue (); + + /* APPLE LOCAL begin ss2 */ + if (flag_save_repository + && flag_pch_file && !flag_debug_only_used_symbols) + { + /* Close dbx_out_file now here. toplev.c takes care of asm file. */ + if (ferror (dbx_out_file) != 0) + fatal_error ("error writing to %s: %m", asm_file_name); + if (fclose (dbx_out_file) != 0) + fatal_error ("error closing %s: %m", asm_file_name); + } + /* APPLE LOCAL end ss2 */ } /* Output the index of a type. */ @@ -1636,10 +1752,17 @@ dbxout_type (tree type, int full) tree main_variant; static int anonymous_type_number = 0; + /* APPLE LOCAL begin vector attribute mainline 2005-04-25 */ + bool vector_type = false; + if (TREE_CODE (type) == VECTOR_TYPE) - /* The frontend feeds us a representation for the vector as a struct - containing an array. Pull out the array type. */ - type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); + { + /* The frontend feeds us a representation for the vector as a struct + containing an array. Pull out the array type. */ + type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); + vector_type = true; + } + /* APPLE LOCAL end vector attribute mainline 2005-04-25 */ /* If there was an input error and we don't really have a type, avoid crashing and write something that is at least valid @@ -1979,6 +2102,14 @@ dbxout_type (tree type, int full) break; } + /* APPLE LOCAL begin vector attribute mainline 2005-04-25 */ + if (vector_type) + { + have_used_extensions = 1; + stabstr_S ("@V;"); + } + /* APPLE LOCAL end vector attribute mainline 2005-04-25 */ + /* Output "a" followed by a range type definition for the index type of the array followed by a reference to the target-type. @@ -2487,7 +2618,14 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) int tag_needed = 1; int did_output = 0; - if (DECL_NAME (decl)) + /* APPLE LOCAL begin gdb only used symbols */ + if (DECL_NAME (decl) +#ifdef DBX_ONLY_USED_SYMBOLS + /* Do not generate a tag for incomplete records */ + && (COMPLETE_TYPE_P (type) || TREE_CODE (type) == VOID_TYPE) +#endif + ) + /* APPLE LOCAL end gdb only used symbols */ { /* Nonzero means we must output a tag as well as a typedef. */ tag_needed = 0; @@ -2903,7 +3041,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) FORCE_TEXT; #ifdef DBX_STATIC_BLOCK_START - DBX_STATIC_BLOCK_START (asm_out_file, code); + /* APPLE LOCAL ss2 */ + DBX_STATIC_BLOCK_START (dbx_out_file, code); #endif dbxout_begin_complex_stabs_noforcetext (); @@ -2912,7 +3051,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) dbxout_finish_complex_stabs (decl, code, addr, 0, number); #ifdef DBX_STATIC_BLOCK_END - DBX_STATIC_BLOCK_END (asm_out_file, code); + /* APPLE LOCAL ss2 */ + DBX_STATIC_BLOCK_END (dbx_out_file, code); #endif return 1; } @@ -3225,7 +3365,8 @@ dbx_output_lbrac (const char *label, const char *begin_label ATTRIBUTE_UNUSED) { #ifdef DBX_OUTPUT_LBRAC - DBX_OUTPUT_LBRAC (asm_out_file, label); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_LBRAC (dbx_out_file, label); #else dbxout_begin_stabn (N_LBRAC); if (DBX_BLOCKS_FUNCTION_RELATIVE) @@ -3243,7 +3384,8 @@ dbx_output_rbrac (const char *label, const char *begin_label ATTRIBUTE_UNUSED) { #ifdef DBX_OUTPUT_RBRAC - DBX_OUTPUT_RBRAC (asm_out_file, label); + /* APPLE LOCAL ss2 */ + DBX_OUTPUT_RBRAC (dbx_out_file, label); #else dbxout_begin_stabn (N_RBRAC); if (DBX_BLOCKS_FUNCTION_RELATIVE) @@ -3358,7 +3500,12 @@ dbxout_block (tree block, int depth, tree args) static void dbxout_begin_function (tree decl) { - int saved_tree_used1 = TREE_USED (decl); + int saved_tree_used1; + + if (DECL_IGNORED_P (decl)) + return; + + saved_tree_used1 = TREE_USED (decl); TREE_USED (decl) = 1; if (DECL_NAME (DECL_RESULT (decl)) != 0) { |