aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c63
1 files changed, 52 insertions, 11 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index e7a7738816d..fcf01072351 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -343,7 +343,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 +378,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 +409,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 */
@@ -903,7 +905,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];
@@ -923,7 +925,8 @@ 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
@@ -960,6 +963,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 Objective-C++ */
+ else if (strcmp (language_string, "GNU Objective-C++") == 0)
+ return N_SO_OBJCPLUS;
+ /* APPLE LOCAL end Objective-C++ */
else
return 0;
@@ -1045,6 +1052,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;
@@ -1296,7 +1310,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 */
@@ -1636,10 +1650,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 +2000,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 +2516,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;
@@ -3358,7 +3394,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)
{