/* Output dbx-format symbol table information from GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
static const char *base_input_file;
#ifdef DEBUG_SYMS_TEXT
-#define FORCE_TEXT function_section (current_function_decl);
+#define FORCE_TEXT current_function_section (current_function_decl);
#else
#define FORCE_TEXT
#endif
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);
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 */
+ debug_nothing_void, /* switch_text_section */
+ 0 /* start_end_main_source_file */
};
#endif /* DBX_DEBUGGING_INFO */
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 */
+ debug_nothing_void, /* switch_text_section */
+ 0 /* start_end_main_source_file */
};
#endif /* XCOFF_DEBUGGING_INFO */
\f
#if defined (DBX_DEBUGGING_INFO)
static void
-dbxout_function_end (void)
+dbxout_function_end (tree decl)
{
char lscope_label_name[100];
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
#ifdef DBX_OUTPUT_NFUN
DBX_OUTPUT_NFUN (asm_out_file, lscope_label_name, current_function_decl);
#else
- dbxout_begin_empty_stabs (N_FUN);
- dbxout_stab_value_label_diff (lscope_label_name,
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
+ if (flag_reorder_blocks_and_partition)
+ {
+ dbxout_begin_empty_stabs (N_FUN);
+ dbxout_stab_value_label_diff (hot_section_end_label, hot_section_label);
+ dbxout_begin_empty_stabs (N_FUN);
+ dbxout_stab_value_label_diff (cold_section_end_label,
+ unlikely_section_label);
+ }
+ else
+ {
+ dbxout_begin_empty_stabs (N_FUN);
+ dbxout_stab_value_label_diff (lscope_label_name,
+ XSTR (XEXP (DECL_RTL (current_function_decl),
+ 0), 0));
+ }
#endif
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 */
/* Omit here local type decls until we know how to support them. */
if (TREE_CODE (tem) == TYPE_DECL
+ /* Omit here the nameless fields that are used to skip bits. */
+ || DECL_IGNORED_P (tem)
/* Omit fields whose position or size are variable or too large to
represent. */
|| (TREE_CODE (tem) == FIELD_DECL
&& (! host_integerp (bit_position (tem), 0)
|| ! DECL_SIZE (tem)
- || ! host_integerp (DECL_SIZE (tem), 1)))
- /* Omit here the nameless fields that are used to skip bits. */
- || DECL_IGNORED_P (tem))
+ || ! host_integerp (DECL_SIZE (tem), 1))))
continue;
else if (TREE_CODE (tem) != CONST_DECL)
stabstr_S ("eFalse:0,True:1,;");
break;
- case FILE_TYPE:
- stabstr_C ('d');
- dbxout_type (TREE_TYPE (type), 0);
- break;
-
case COMPLEX_TYPE:
/* Differs from the REAL_TYPE by its new data type number.
R3 is NF_COMPLEX. We don't try to use any of the other NF_*
}
break;
- case SET_TYPE:
- if (use_gnu_debug_info_extensions)
- {
- have_used_extensions = 1;
- stabstr_S ("@s");
- stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
- stabstr_C (';');
-
- /* Check if a bitstring type, which in Chill is
- different from a [power]set. */
- if (TYPE_STRING_FLAG (type))
- stabstr_S ("@S;");
- }
- stabstr_C ('S');
- dbxout_type (TYPE_DOMAIN (type), 0);
- break;
-
case ARRAY_TYPE:
/* Make arrays of packed bits look like bitstrings for chill. */
if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
DBXOUT_DECR_NESTING_AND_RETURN (0);
/* If we are to generate only the symbols actually used then such
- symbol nodees are flagged with TREE_USED. Ignore any that
+ symbol nodes are flagged with TREE_USED. Ignore any that
aren't flaged as TREE_USED. */
if (flag_debug_only_used_symbols
context = decl_function_context (decl);
if (context == current_function_decl)
break;
+ /* Don't mention an inline instance of a nested function. */
+ if (context && DECL_FROM_INLINE (decl))
+ break;
if (!MEM_P (DECL_RTL (decl))
|| GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF)
break;
letter = decl_function_context (decl) ? 'V' : 'S';
+ /* Some ports can transform a symbol ref into a label ref,
+ because the symbol ref is too far away and has to be
+ dumped into a constant pool. Alternatively, the symbol
+ in the constant pool might be referenced by a different
+ symbol. */
+ if (GET_CODE (addr) == SYMBOL_REF
+ && CONSTANT_POOL_ADDRESS_P (addr))
+ {
+ bool marked;
+ rtx tmp = get_pool_constant_mark (addr, &marked);
+
+ if (GET_CODE (tmp) == SYMBOL_REF)
+ {
+ addr = tmp;
+ if (CONSTANT_POOL_ADDRESS_P (addr))
+ get_pool_constant_mark (addr, &marked);
+ else
+ marked = true;
+ }
+ else if (GET_CODE (tmp) == LABEL_REF)
+ {
+ addr = tmp;
+ marked = true;
+ }
+
+ /* If all references to the constant pool were optimized
+ out, we just ignore the symbol. */
+ if (!marked)
+ return 0;
+ }
+
/* This should be the same condition as in assemble_variable, but
we don't have access to dont_output_data here. So, instead,
we rely on the fact that error_mark_node initializers always
code = DBX_STATIC_CONST_VAR_CODE;
else
{
- /* Some ports can transform a symbol ref into a label ref,
- because the symbol ref is too far away and has to be
- dumped into a constant pool. Alternatively, the symbol
- in the constant pool might be referenced by a different
- symbol. */
- if (GET_CODE (addr) == SYMBOL_REF
- && CONSTANT_POOL_ADDRESS_P (addr))
- {
- bool marked;
- rtx tmp = get_pool_constant_mark (addr, &marked);
-
- if (GET_CODE (tmp) == SYMBOL_REF)
- {
- addr = tmp;
- if (CONSTANT_POOL_ADDRESS_P (addr))
- get_pool_constant_mark (addr, &marked);
- else
- marked = true;
- }
- else if (GET_CODE (tmp) == LABEL_REF)
- {
- addr = tmp;
- marked = true;
- }
-
- /* If all references to the constant pool were optimized
- out, we just ignore the symbol. */
- if (!marked)
- return 0;
- }
-
/* Ultrix `as' seems to need this. */
#ifdef DBX_STATIC_STAB_DATA_SECTION
data_section ();
That is, its address was passed in a register.
Output it as if it lived in that register.
The debugger will know from the type
- that it was actually passed by invisible reference. */
+ that it was actually passed by invisible reference. */
code = DBX_REGPARM_STABS_CODE;
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)
{