#endif
#ifndef ASM_STABS_OP
-#define ASM_STABS_OP ".stabs"
+#define ASM_STABS_OP "\t.stabs\t"
#endif
#ifndef ASM_STABN_OP
-#define ASM_STABN_OP ".stabn"
+#define ASM_STABN_OP "\t.stabn\t"
#endif
#ifndef DBX_TYPE_DECL_STABS_CODE
#define CONTIN \
do {if (current_sym_nchars > DBX_CONTIN_LENGTH) dbxout_continue ();} while (0)
#else
-#define CONTIN
+#define CONTIN do { } while (0)
#endif
#if defined(ASM_OUTPUT_SECTION_NAME)
/* By convention, GCC will mark the end of a function with an N_FUN
symbol and an empty string. */
- fprintf (asmfile, "%s \"\",%d,0,0,", ASM_STABS_OP, N_FUN);
+ fprintf (asmfile, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN);
assemble_name (asmfile, lscope_label_name);
fputc ('-', asmfile);
assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd);
#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- fprintf (asmfile, "%s ", ASM_STABS_OP);
+ fprintf (asmfile, "%s", ASM_STABS_OP);
output_quoted_string (asmfile, cwd);
fprintf (asmfile, ",%d,0,0,%s\n", N_SO, <ext_label_name[1]);
#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
/* We include outputting `Ltext:' here,
because that gives you a way to override it. */
/* Used to put `Ltext:' before the reference, but that loses on sun 4. */
- fprintf (asmfile, "%s ", ASM_STABS_OP);
+ fprintf (asmfile, "%s", ASM_STABS_OP);
output_quoted_string (asmfile, input_file_name);
fprintf (asmfile, ",%d,0,0,%s\n",
N_SO, <ext_label_name[1]);
and output them all, except for those already output. */
dbxout_typedefs (syms);
-
- ggc_add_string_root ((char **) &lastfile, 1);
}
/* Output any typedef names for types described by TYPE_DECLs in SYMS,
tree type = TREE_TYPE (syms);
if (TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
- && TYPE_SIZE (type) != NULL_TREE
+ && COMPLETE_TYPE_P (type)
&& ! TREE_ASM_WRITTEN (TYPE_NAME (type)))
dbxout_symbol (TYPE_NAME (type), 0);
}
n->file_number = next_file_number++;
n->next_type_number = 1;
current_file = n;
- fprintf (asmfile, "%s ", ASM_STABS_OP);
+ fprintf (asmfile, "%s", ASM_STABS_OP);
output_quoted_string (asmfile, filename);
fprintf (asmfile, ",%d,0,0,0\n", N_BINCL);
#endif
#ifdef DBX_USE_BINCL
struct dbx_file *next;
- fprintf (asmfile, "%s %d,0,0,0\n", ASM_STABN_OP, N_EINCL);
+ fprintf (asmfile, "%s%d,0,0,0\n", ASM_STABN_OP, N_EINCL);
next = current_file->next;
free (current_file);
current_file = next;
#else
ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext",
source_label_number);
- fprintf (file, "%s ", ASM_STABS_OP);
+ fprintf (file, "%s", ASM_STABS_OP);
output_quoted_string (file, filename);
fprintf (file, ",%d,0,0,%s\n", N_SOL, <ext_label_name[1]);
if (current_function_decl != NULL_TREE
#ifdef ASM_OUTPUT_SOURCE_LINE
ASM_OUTPUT_SOURCE_LINE (file, lineno);
#else
- fprintf (file, "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
+ fprintf (file, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
#endif
}
fprintf (asmfile, "\\\\");
#endif
dbxout_finish_symbol (NULL_TREE);
- fprintf (asmfile, "%s \"", ASM_STABS_OP);
+ fprintf (asmfile, "%s\"", ASM_STABS_OP);
current_sym_nchars = 0;
}
#endif /* DBX_CONTIN_LENGTH > 0 */
tree type;
{
tree tem;
+
/* Output the name, type, position (in bits), size (in bits) of each
- field. */
+ field that we can support. */
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
{
/* Omit here local type decls until we know how to support them. */
- if (TREE_CODE (tem) == TYPE_DECL)
- continue;
- /* Omit fields whose position or size are variable. */
- else if (TREE_CODE (tem) == FIELD_DECL
- && (TREE_CODE (DECL_FIELD_BITPOS (tem)) != INTEGER_CST
- || TREE_CODE (DECL_SIZE (tem)) != INTEGER_CST))
- continue;
- /* Omit here the nameless fields that are used to skip bits. */
- else if (DECL_IGNORED_P (tem))
+ if (TREE_CODE (tem) == TYPE_DECL
+ /* 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))
continue;
+
else if (TREE_CODE (tem) != CONST_DECL)
{
/* Continue the line if necessary,
but not before the first field. */
if (tem != TYPE_FIELDS (type))
- {
- CONTIN;
- }
+ CONTIN;
if (use_gnu_debug_info_extensions
&& flag_minimal_debug
dbxout_type (TREE_TYPE (tem), 0, 0);
fputc (',', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (DECL_FIELD_BITPOS (tem)));
+ int_bit_position (tem));
fputc (';', asmfile);
continue;
}
dbxout_type ((TREE_CODE (tem) == FIELD_DECL
&& DECL_BIT_FIELD_TYPE (tem))
- ? DECL_BIT_FIELD_TYPE (tem)
- : TREE_TYPE (tem), 0, 0);
+ ? DECL_BIT_FIELD_TYPE (tem) : TREE_TYPE (tem), 0, 0);
if (TREE_CODE (tem) == VAR_DECL)
{
CHARS (strlen (name));
}
else
- {
- /* If TEM is non-static, GDB won't understand it. */
- fprintf (asmfile, ",0,0;");
- }
+ /* If TEM is non-static, GDB won't understand it. */
+ fprintf (asmfile, ",0,0;");
}
- else if (TREE_CODE (DECL_FIELD_BITPOS (tem)) == INTEGER_CST)
+ else
{
fputc (',', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (DECL_FIELD_BITPOS (tem)));
+ int_bit_position (tem));
fputc (',', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (DECL_SIZE (tem)));
+ tree_low_cst (DECL_SIZE (tem), 1));
fputc (';', asmfile);
+ CHARS (23);
}
- CHARS (23);
}
}
}
}
fprintf (asmfile, ":%s;%c%c%c", debug_name,
- TREE_PRIVATE (decl) ? '0' : TREE_PROTECTED (decl) ? '1' : '2', c1, c2);
+ TREE_PRIVATE (decl) ? '0'
+ : TREE_PROTECTED (decl) ? '1' : '2', c1, c2);
CHARS (IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (decl)) + 6
- (debug_name - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))));
- if (DECL_VINDEX (decl))
+
+ if (DECL_VINDEX (decl) && host_integerp (DECL_VINDEX (decl), 0))
{
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (DECL_VINDEX (decl)));
+ tree_low_cst (DECL_VINDEX (decl), 0));
fputc (';', asmfile);
dbxout_type (DECL_CONTEXT (decl), 0, 0);
fprintf (asmfile, ";");
else
dbxout_type_index (integer_type_node);
}
- if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST)
+
+ if (TYPE_MIN_VALUE (type) != 0
+ && host_integerp (TYPE_MIN_VALUE (type), 0))
{
fputc (';', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (TYPE_MIN_VALUE (type)));
+ tree_low_cst (TYPE_MIN_VALUE (type), 0));
}
else
fprintf (asmfile, ";0");
- if (TYPE_MAX_VALUE (type)
- && TREE_CODE (TYPE_MAX_VALUE (type)) == INTEGER_CST)
+
+ if (TYPE_MAX_VALUE (type) != 0
+ && host_integerp (TYPE_MAX_VALUE (type), 0))
{
fputc (';', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (TYPE_MAX_VALUE (type)));
+ tree_low_cst (TYPE_MAX_VALUE (type), 0));
fputc (';', asmfile);
}
else
register tree tem;
static int anonymous_type_number = 0;
+ if (TREE_CODE (type) == VECTOR_TYPE)
+ type = TYPE_DEBUG_REPRESENTATION_TYPE (type);
+
/* If there was an input error and we don't really have a type,
avoid crashing and write something that is at least valid
by assuming `int'. */
typevec
= (struct typeinfo *) xrealloc (typevec,
typevec_len * 2 * sizeof typevec[0]);
- bzero ((char *) (typevec + typevec_len),
+ memset ((char *) (typevec + typevec_len), 0,
typevec_len * sizeof typevec[0]);
typevec_len *= 2;
}
and either that's all we want or that's the best we could do,
don't repeat the cross reference.
Sun dbx crashes if we do. */
- if (! full || TYPE_SIZE (type) == 0
+ if (! full || !COMPLETE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return;
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || TYPE_SIZE (type) == 0
+ || !COMPLETE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
{
and hence they can't span same size unsigned types. */
if (use_gnu_debug_info_extensions
+ && TYPE_MIN_VALUE (type) != 0
+ && TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
+ && TYPE_MAX_VALUE (type) != 0
+ && TREE_CODE (TYPE_MAX_VALUE (type)) == INTEGER_CST
&& (TYPE_PRECISION (type) > TYPE_PRECISION (integer_type_node)
|| (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)
&& TREE_UNSIGNED (type))
dbxout_type_index (type);
fputc (';', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- int_size_in_bytes (TREE_TYPE (type)));
+ 2 * int_size_in_bytes (TREE_TYPE (type)));
fputs (";0;", asmfile);
CHARS (12); /* The number is probably incorrect here. */
}
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || TYPE_SIZE (type) == 0
+ || !COMPLETE_TYPE_P (type)
/* No way in DBX fmt to describe a variable size. */
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
{
for (i = 0; i < n_baseclasses; i++)
{
tree child = TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (type)), i);
+
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- putc (TREE_VIA_VIRTUAL (child) ? '1'
- : '0',
- asmfile);
- putc (TREE_VIA_PUBLIC (child) ? '2'
- : '0',
- asmfile);
+ putc (TREE_VIA_VIRTUAL (child) ? '1' : '0', asmfile);
+ putc (TREE_VIA_PUBLIC (child) ? '2' : '0', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (BINFO_OFFSET (child)) * BITS_PER_UNIT);
+ (tree_low_cst (BINFO_OFFSET (child), 0)
+ * BITS_PER_UNIT));
fputc (',', asmfile);
CHARS (15);
dbxout_type (BINFO_TYPE (child), 0, 0);
dbxout_type (BINFO_TYPE (child), full, 0);
fputc (',', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (BINFO_OFFSET (child)) * BITS_PER_UNIT);
+ tree_low_cst (BINFO_OFFSET (child), 0)
+ * BITS_PER_UNIT);
fputc (',', asmfile);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC,
- TREE_INT_CST_LOW (DECL_SIZE (TYPE_NAME (BINFO_TYPE (child)))) * BITS_PER_UNIT);
+ (tree_low_cst (DECL_SIZE (TYPE_NAME
+ (BINFO_TYPE (child))), 0)
+ * BITS_PER_UNIT));
fputc (';', asmfile);
CHARS (20);
}
have_used_extensions = 1;
dbxout_type_methods (type);
}
+
putc (';', asmfile);
if (use_gnu_debug_info_extensions && TREE_CODE (type) == RECORD_TYPE
&& ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& !full)
- || TYPE_SIZE (type) == 0)
+ || !COMPLETE_TYPE_P (type))
{
fprintf (asmfile, "xe");
CHARS (3);
unsigned HOST_WIDE_INT high = TREE_INT_CST_HIGH (c);
unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (c);
int excess = (3 - (HOST_BITS_PER_WIDE_INT % 3));
- int width = TYPE_PRECISION (TREE_TYPE (c));
+ unsigned int width = TYPE_PRECISION (TREE_TYPE (c));
/* GDB wants constants with no extra leading "1" bits, so
we need to remove any sign-extension that might be
<< (HOST_BITS_PER_WIDE_INT / 3 * 3))
- 1);
- fprintf (asmfile, "%o%01o", (int)beg, (int)middle);
+ fprintf (asmfile, "%o%01o", (int) beg, (int) middle);
print_octal (end, HOST_BITS_PER_WIDE_INT / 3);
}
}
int i;
for (i = digits - 1; i >= 0; i--)
- fprintf (asmfile, "%01o", (int)((value >> (3 * i)) & 7));
+ fprintf (asmfile, "%01o", (int) ((value >> (3 * i)) & 7));
}
/* Output the name of type TYPE, with no punctuation.
break;
FORCE_TEXT;
- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
TREE_PUBLIC (decl) ? 'F' : 'f');
result = 1;
current_sym_addr = 0;
current_sym_nchars = 2 + IDENTIFIER_LENGTH (name);
- fprintf (asmfile, "%s \"%s:T", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:T", ASM_STABS_OP,
IDENTIFIER_POINTER (name));
dbxout_type (type, 1, 0);
dbxout_finish_symbol (NULL_TREE);
}
/* Output typedef name. */
- fprintf (asmfile, "%s \"%s:", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (decl)));
/* Short cut way to output a tag also. */
if (tag_needed && TYPE_NAME (type) != 0
&& (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE
|| (DECL_NAME (TYPE_NAME (type)) != 0))
- && TYPE_SIZE (type) != 0
+ && COMPLETE_TYPE_P (type)
&& !TREE_ASM_WRITTEN (TYPE_NAME (type)))
{
/* For a TYPE_DECL with no name, but the type has a name,
current_sym_addr = 0;
current_sym_nchars = 2 + IDENTIFIER_LENGTH (name);
- fprintf (asmfile, "%s \"%s:T", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:T", ASM_STABS_OP,
IDENTIFIER_POINTER (name));
dbxout_type (type, 1, 0);
dbxout_finish_symbol (NULL_TREE);
/* Some debuggers fail when given NULL names, so give this a
harmless name of ` '. */
- fprintf (asmfile, "%s \" :T", ASM_STABS_OP);
+ fprintf (asmfile, "%s\" :T", ASM_STABS_OP);
dbxout_type (type, 1, 0);
dbxout_finish_symbol (NULL_TREE);
}
and not written in memory, inform the debugger. */
if (TREE_STATIC (decl) && TREE_READONLY (decl)
&& DECL_INITIAL (decl) != 0
+ && host_integerp (DECL_INITIAL (decl), 0)
&& ! TREE_ASM_WRITTEN (decl)
- && (DECL_FIELD_CONTEXT (decl) == NULL_TREE
- || TREE_CODE (DECL_FIELD_CONTEXT (decl)) == BLOCK))
+ && (DECL_CONTEXT (decl) == NULL_TREE
+ || TREE_CODE (DECL_CONTEXT (decl)) == BLOCK))
{
if (TREE_PUBLIC (decl) == 0)
{
/* The sun4 assembler does not grok this. */
const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
+
if (TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
{
- HOST_WIDE_INT ival = TREE_INT_CST_LOW (DECL_INITIAL (decl));
+ HOST_WIDE_INT ival = tree_low_cst (DECL_INITIAL (decl), 0);
#ifdef DBX_OUTPUT_CONSTANT_SYMBOL
DBX_OUTPUT_CONSTANT_SYMBOL (asmfile, name, ival);
#else
- fprintf (asmfile, "%s \"%s:c=i", ASM_STABS_OP, name);
+ fprintf (asmfile, "%s\"%s:c=i", ASM_STABS_OP, name);
fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC, ival);
fprintf (asmfile, "\",0x%x,0,0,0\n", N_LSYM);
const char *suffix;
int letter;
{
- /* One slight hitch: if this is a VAR_DECL which is a static
- class member, we must put out the mangled name instead of the
- DECL_NAME. Note also that static member (variable) names DO NOT begin
- with underscores in .stabs directives. */
- const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+ const char *name;
+
+ if (DECL_CONTEXT (decl) && TYPE_P (DECL_CONTEXT (decl)))
+ /* One slight hitch: if this is a VAR_DECL which is a static
+ class member, we must put out the mangled name instead of the
+ DECL_NAME. Note also that static member (variable) names DO NOT begin
+ with underscores in .stabs directives. */
+ name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+ else
+ /* ...but if we're function-local, we don't want to include the junk
+ added by ASM_FORMAT_PRIVATE_NAME. */
+ name = IDENTIFIER_POINTER (DECL_NAME (decl));
+
if (name == 0)
name = "(anon)";
- fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,
+ fprintf (asmfile, "%s\"%s%s:", ASM_STABS_OP, name,
(suffix ? suffix : ""));
if (letter) putc (letter, asmfile);
{
current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms));
- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
DBX_MEMPARM_STABS_LETTER);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
DBX_MEMPARM_STABS_LETTER);
}
If we use DECL_RTL, then we must use the declared type of
the variable, not the type that it arrived in. */
- if (REGNO (DECL_RTL (parms)) >= 0
- && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
+ if (REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
{
best_rtl = DECL_RTL (parms);
parm_type = TREE_TYPE (parms);
if (DECL_NAME (parms))
{
current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms));
- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
regparm_letter);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
regparm_letter);
}
/* DECL_RTL looks like (MEM (REG...). Get the register number.
If it is an unallocated pseudo-reg, then use the register where
it was passed instead. */
- if (REGNO (XEXP (DECL_RTL (parms), 0)) >= 0
- && REGNO (XEXP (DECL_RTL (parms), 0)) < FIRST_PSEUDO_REGISTER)
+ if (REGNO (XEXP (DECL_RTL (parms), 0)) < FIRST_PSEUDO_REGISTER)
current_sym_value = REGNO (XEXP (DECL_RTL (parms), 0));
else
current_sym_value = REGNO (DECL_INCOMING_RTL (parms));
{
current_sym_nchars = 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
regparm_letter);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
regparm_letter);
}
dbxout_finish_symbol (parms);
}
else if (GET_CODE (DECL_RTL (parms)) == MEM
+ && GET_CODE (XEXP (DECL_RTL (parms), 0)) == MEM)
+ {
+ /* Parm was passed via invisible reference, with the reference
+ living on the stack. DECL_RTL looks like
+ (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))). */
+ const char *decl_name = (DECL_NAME (parms)
+ ? IDENTIFIER_POINTER (DECL_NAME (parms))
+ : "(anon)");
+ current_sym_value
+ = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
+ current_sym_addr = 0;
+
+ FORCE_TEXT;
+ fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name);
+ dbxout_type (TREE_TYPE (parms), 0, 0);
+ dbxout_finish_symbol (parms);
+ }
+ else if (GET_CODE (DECL_RTL (parms)) == MEM
&& XEXP (DECL_RTL (parms), 0) != const0_rtx
/* ??? A constant address for a parm can happen
when the reg it lives in is equiv to a constant in memory.
&& ! CONSTANT_P (XEXP (DECL_RTL (parms), 0)))
{
/* Parm was passed in registers but lives on the stack. */
- int aux_sym_value = 0;
current_sym_code = N_PSYM;
/* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))),
in which case we want the value of that CONST_INT,
- or (MEM (REG ...)) or (MEM (MEM ...)),
+ or (MEM (REG ...)),
in which case we use a value of zero. */
if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG)
current_sym_value = 0;
- else if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == MEM)
- {
- /* Remember the location on the stack the parm is moved to */
- aux_sym_value
- = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
- current_sym_value = 0;
- }
else
current_sym_value
= INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
&& TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms))
&& GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD)
{
- current_sym_value += UNITS_PER_WORD - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms)));
+ current_sym_value +=
+ GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))
+ - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms)));
}
FORCE_TEXT;
current_sym_nchars
= 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
- fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
DBX_MEMPARM_STABS_LETTER);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
DBX_MEMPARM_STABS_LETTER);
}
XEXP (DECL_RTL (parms), 0));
dbxout_type (TREE_TYPE (parms), 0, 0);
dbxout_finish_symbol (parms);
- if (aux_sym_value != 0)
- {
- /* Generate an entry for the stack location */
-
- fprintf (asmfile, "%s \"%s:", ASM_STABS_OP,
- IDENTIFIER_POINTER (DECL_NAME (parms)));
- current_sym_value = aux_sym_value;
- current_sym_code = N_LSYM;
- dbxout_type (build_reference_type (TREE_TYPE (parms)), 0, 0);
- dbxout_finish_symbol (parms);
- }
}
}
}
/* Report parms that live in registers during the function
but were passed in memory. */
if (GET_CODE (DECL_RTL (parms)) == REG
- && REGNO (DECL_RTL (parms)) >= 0
&& REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER)
dbxout_symbol_location (parms, TREE_TYPE (parms),
0, DECL_RTL (parms));
tree args;
{
int blocknum = -1;
- int ignored;
#if DBX_BLOCKS_FUNCTION_RELATIVE
const char *begin_label;
/* Ignore blocks never expanded or otherwise marked as real. */
if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
{
-#ifndef DBX_LBRAC_FIRST
+ int did_output;
+
+#ifdef DBX_LBRAC_FIRST
+ did_output = 1;
+#else
/* In dbx format, the syms of a block come before the N_LBRAC.
If nothing is output, we don't need the N_LBRAC, either. */
- ignored = 1;
+ did_output = 0;
if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
- ignored = dbxout_syms (BLOCK_VARS (block));
+ did_output = dbxout_syms (BLOCK_VARS (block));
if (args)
dbxout_reg_parms (args);
#endif
the block. Use the block's tree-walk order to generate
the assembler symbols LBBn and LBEn
that final will define around the code in this block. */
- if (depth > 0 && !ignored)
+ if (depth > 0 && did_output)
{
char buf[20];
blocknum = BLOCK_NUMBER (block);
#ifdef DBX_OUTPUT_CATCH
DBX_OUTPUT_CATCH (asmfile, decl, buf);
#else
- fprintf (asmfile, "%s \"%s:C1\",%d,0,0,", ASM_STABS_OP,
+ fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
assemble_name (asmfile, buf);
fprintf (asmfile, "\n");
#ifdef DBX_OUTPUT_LBRAC
DBX_OUTPUT_LBRAC (asmfile, buf);
#else
- fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC);
+ fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
assemble_name (asmfile, buf);
#if DBX_BLOCKS_FUNCTION_RELATIVE
fputc ('-', asmfile);
dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
/* Refer to the marker for the end of the block. */
- if (depth > 0 && !ignored)
+ if (depth > 0 && did_output)
{
char buf[20];
ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
#ifdef DBX_OUTPUT_RBRAC
DBX_OUTPUT_RBRAC (asmfile, buf);
#else
- fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC);
+ fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
assemble_name (asmfile, buf);
#if DBX_BLOCKS_FUNCTION_RELATIVE
fputc ('-', asmfile);