dbxout.c (dbxout_source_line_counter): New global variable.
* dbxout.c (dbxout_source_line_counter): New global variable. Mark it with GTY(()). (dbxout_source_line): Increment dbxout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * sdbout.c (sdbout_source_line_counter): New global variable. Mark it with GTY(()). (unnamed_struct_number): Mark it with GTY(()). (sdbout_source_line): Increment sdbout_source_line_counter and pass it to ASM_OUTPUT_SOURCE_LINE. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter (xcoffout_source_line): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. (xcoffout_begin_prologue): Likewise. * config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/alpha/alpha.c (alpha_start_function): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/arm/aout.h: Remove useless comment. * config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/mips/mips.c (mips_output_function_prologue): Pass 0 as third argument to ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. * config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. Use it instead of 'sym_lineno' but without incrementing it. * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise. * doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter. From-SVN: r68072
This commit is contained in:
parent
730cf82238
commit
a8d0467e65
25 changed files with 114 additions and 78 deletions
|
@ -1,3 +1,46 @@
|
|||
2003-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* dbxout.c (dbxout_source_line_counter): New global variable.
|
||||
Mark it with GTY(()).
|
||||
(dbxout_source_line): Increment dbxout_source_line_counter
|
||||
and pass it to ASM_OUTPUT_SOURCE_LINE.
|
||||
* sdbout.c (sdbout_source_line_counter): New global variable.
|
||||
Mark it with GTY(()).
|
||||
(unnamed_struct_number): Mark it with GTY(()).
|
||||
(sdbout_source_line): Increment sdbout_source_line_counter
|
||||
and pass it to ASM_OUTPUT_SOURCE_LINE.
|
||||
* xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter
|
||||
(xcoffout_source_line): Pass 0 as third argument to
|
||||
ASM_OUTPUT_SOURCE_LINE.
|
||||
(xcoffout_begin_prologue): Likewise.
|
||||
* config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
Use it instead of 'sym_lineno' but without incrementing it.
|
||||
* config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/alpha/alpha.c (alpha_start_function): Pass 0 as third
|
||||
argument to ASM_OUTPUT_SOURCE_LINE.
|
||||
* config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
* config/arm/aout.h: Remove useless comment.
|
||||
* config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
* config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
Use it instead of 'sym_lineno' but without incrementing it.
|
||||
* config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
* config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third
|
||||
parameter. Use it instead of 'sym_lineno' but without incrementing it.
|
||||
* config/mips/mips.c (mips_output_function_prologue): Pass 0 as third
|
||||
argument to ASM_OUTPUT_SOURCE_LINE.
|
||||
* config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
* config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter.
|
||||
Use it instead of 'sym_lineno' but without incrementing it.
|
||||
* config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
|
||||
* doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter.
|
||||
|
||||
2003-06-17 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* config/mips/mips-protos.h (mips_expand_block_move): Declare.
|
||||
|
|
|
@ -7232,7 +7232,7 @@ alpha_start_function (FILE *file, const char *fnname,
|
|||
#ifdef ASM_OUTPUT_SOURCE_LINE
|
||||
if (debug_info_level != DINFO_LEVEL_TERSE)
|
||||
ASM_OUTPUT_SOURCE_LINE (file,
|
||||
DECL_SOURCE_LINE (current_function_decl));
|
||||
DECL_SOURCE_LINE (current_function_decl), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1778,7 +1778,7 @@ extern long alpha_auto_offset;
|
|||
#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + alpha_arg_offset)
|
||||
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
|
||||
alpha_output_lineno (STREAM, LINE)
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \
|
||||
|
|
|
@ -291,9 +291,6 @@
|
|||
#define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGN) \
|
||||
asm_output_aligned_bss (STREAM, DECL, NAME, SIZE, ALIGN)
|
||||
#endif
|
||||
|
||||
/* Output a source line for the debugger. */
|
||||
/* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
|
||||
|
||||
/* Output a #ident directive. */
|
||||
#ifndef ASM_OUTPUT_IDENT
|
||||
|
|
|
@ -1718,7 +1718,8 @@ progmem_section () \
|
|||
time-saving assumptions that are valid for ordinary compiler
|
||||
output. */
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) fprintf (STREAM,"/* line: %d */\n",LINE)
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
|
||||
fprintf (STREAM,"/* line: %d */\n",LINE)
|
||||
/* A C statement to output DBX or SDB debugging information before
|
||||
code for line number LINE of the current source file to the stdio
|
||||
stream STREAM.
|
||||
|
|
|
@ -55,23 +55,21 @@ Boston, MA 02111-1307, USA. */
|
|||
current function. */
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
||||
{ if (write_symbols == SDB_DEBUG) { \
|
||||
fprintf ((FILE), "\t.ln\t%d\n", \
|
||||
((sdb_begin_function_line > -1) \
|
||||
? (LINE) - sdb_begin_function_line : 1)); \
|
||||
} else if (write_symbols == DBX_DEBUG) { \
|
||||
static int sym_lineno = 1; \
|
||||
char buffer[256]; \
|
||||
ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", sym_lineno); \
|
||||
ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", COUNTER); \
|
||||
fprintf (FILE, ".stabn 68,0,%d,", LINE); \
|
||||
assemble_name (FILE, buffer); \
|
||||
putc ('-', FILE); \
|
||||
assemble_name (FILE, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
|
||||
putc ('\n', FILE); \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", sym_lineno); \
|
||||
sym_lineno++; \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
|
||||
} }
|
||||
|
||||
/* When generating stabs debugging, use N_BINCL entries. */
|
||||
|
|
|
@ -57,20 +57,18 @@ Boston, MA 02111-1307, USA. */
|
|||
current function. */
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
char temp[256]; \
|
||||
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno); \
|
||||
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER); \
|
||||
fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
|
||||
assemble_name (FILE, temp); \
|
||||
putc ('-', FILE); \
|
||||
assemble_name (FILE, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
|
||||
putc ('\n', FILE); \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
@ -1206,7 +1206,7 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1;
|
|||
/* This is how to output a note to DBX telling it the line number
|
||||
to which the following sequence of instructions corresponds. */
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
||||
{ if (write_symbols == SDB_DEBUG) { \
|
||||
fprintf ((FILE), "\t.ln %d\n", \
|
||||
(sdb_begin_function_line \
|
||||
|
|
|
@ -84,14 +84,12 @@ Boston, MA 02111-1307, USA. */
|
|||
"\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO)
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
{ static int sym_lineno = 1; \
|
||||
fprintf (file, ".stabn 68,0,%d,.LM%d-", \
|
||||
line, sym_lineno); \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
{ fprintf (file, ".stabn 68,0,%d,.LM%d-", \
|
||||
line, counter); \
|
||||
assemble_name (file, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
|
||||
fprintf (file, "\n.LM%d:\n", sym_lineno); \
|
||||
sym_lineno += 1; }
|
||||
fprintf (file, "\n.LM%d:\n", counter); }
|
||||
|
||||
/* Handle #pragma pack and sometimes #pragma weak. */
|
||||
|
||||
|
|
|
@ -1545,19 +1545,17 @@ do { \
|
|||
of a word. */
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
fprintf (file, ".stabn 68,0,%d,.LM%d-", \
|
||||
line, sym_lineno); \
|
||||
line, counter); \
|
||||
assemble_name \
|
||||
(file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
|
||||
fprintf (file, (optimize_size || TARGET_M32R) \
|
||||
? "\n\t.debugsym .LM%d\n" \
|
||||
: "\n.LM%d:\n", \
|
||||
sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
counter); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ do { \
|
|||
fprintf (FILE, "\tspace %u\n", (int)(SIZE))
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME)
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO, COUNTER)
|
||||
|
||||
/* Output a float value (represented as a C double) as an immediate operand.
|
||||
This macro is a 68k-specific macro. */
|
||||
|
|
|
@ -116,22 +116,20 @@ drectve_section () \
|
|||
while (0)
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
||||
{ \
|
||||
if (write_symbols == DBX_DEBUG) \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
char buffer[256]; \
|
||||
\
|
||||
ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", sym_lineno); \
|
||||
ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", COUNTER); \
|
||||
fprintf (FILE, ".stabn 68,0,%d,", LINE); \
|
||||
assemble_name (FILE, buffer); \
|
||||
putc ('-', FILE); \
|
||||
assemble_name (FILE, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
|
||||
putc ('\n', FILE); \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", sym_lineno); \
|
||||
sym_lineno ++; \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
@ -6884,7 +6884,7 @@ mips_output_function_prologue (file, size)
|
|||
|
||||
#ifdef SDB_DEBUGGING_INFO
|
||||
if (debug_info_level != DINFO_LEVEL_TERSE && write_symbols == SDB_DEBUG)
|
||||
ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl));
|
||||
ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl), 0);
|
||||
#endif
|
||||
|
||||
/* In mips16 mode, we may need to generate a 32 bit to handle
|
||||
|
|
|
@ -3704,7 +3704,7 @@ while (0)
|
|||
#endif
|
||||
|
||||
#ifndef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
|
||||
mips_output_lineno (STREAM, LINE)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -939,7 +939,7 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
|
|||
#define OUTPUT_QUOTED_STRING(STREAM, STRING) \
|
||||
mmix_output_quoted_string (STREAM, STRING, strlen (STRING))
|
||||
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
|
||||
mmix_asm_output_source_line (STREAM, LINE)
|
||||
|
||||
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
|
||||
|
|
|
@ -30,18 +30,17 @@ Boston, MA 02111-1307, USA. */
|
|||
/* We make the first line stab special to avoid adding several
|
||||
gross hacks to GAS. */
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
{ static int sym_lineno = 1; \
|
||||
static tree last_function_decl = NULL; \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
{ static tree last_function_decl = NULL; \
|
||||
if (current_function_decl == last_function_decl) \
|
||||
fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n", \
|
||||
line, sym_lineno, \
|
||||
line, counter, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0) + 1, \
|
||||
sym_lineno); \
|
||||
counter); \
|
||||
else \
|
||||
fprintf (file, "\t.stabn 68,0,%d,0\n", line); \
|
||||
last_function_decl = current_function_decl; \
|
||||
sym_lineno += 1; }
|
||||
}
|
||||
|
||||
/* gdb needs a null N_SO at the end of each file for scattered loading. */
|
||||
|
||||
|
|
|
@ -184,16 +184,14 @@ Boston, MA 02111-1307, USA.
|
|||
current function. */
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
fprintf (file, ".stabn 68,0,%d,.LM%d-", \
|
||||
line, sym_lineno); \
|
||||
line, counter); \
|
||||
assemble_name (file, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
|
||||
fprintf (file, "\n.LM%d:\n", sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
fprintf (file, "\n.LM%d:\n", counter); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
@ -443,12 +443,11 @@
|
|||
/* This is the same as the dbxelf.h version, except that we need to
|
||||
use the function code label, not the function descriptor. */
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
char temp[256]; \
|
||||
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno); \
|
||||
ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER); \
|
||||
fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
|
||||
assemble_name (FILE, temp); \
|
||||
putc ('-', FILE); \
|
||||
|
@ -457,8 +456,7 @@ do \
|
|||
assemble_name (FILE, \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
|
||||
putc ('\n', FILE); \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
@ -91,16 +91,14 @@ Boston, MA 02111-1307, USA. */
|
|||
sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
|
||||
(line), sym_lineno); \
|
||||
(line), (counter)); \
|
||||
assemble_name ((file), \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
|
||||
asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
asm_fprintf ((file), "\n%LLM%d:\n", (counter)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
|
@ -59,8 +59,6 @@ do { \
|
|||
|
||||
This is needed for SunOS 4.0, and should not hurt for 3.2
|
||||
versions either. */
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
{ static int sym_lineno = 1; \
|
||||
fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
|
||||
line, sym_lineno, sym_lineno); \
|
||||
sym_lineno += 1; }
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
|
||||
line, counter, counter)
|
||||
|
|
|
@ -140,10 +140,8 @@ Boston, MA 02111-1307, USA. */
|
|||
/* This is needed for SunOS 4.0, and should not hurt for 3.2
|
||||
versions either. */
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
{ static int sym_lineno = 1; \
|
||||
fprintf (file, ".stabn 68,0,%d,.LM%d\n.LM%d:\n", \
|
||||
line, sym_lineno, sym_lineno); \
|
||||
sym_lineno += 1; }
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
||||
fprintf (file, ".stabn 68,0,%d,.LM%d\n.LM%d:\n", \
|
||||
line, counter, counter)
|
||||
|
||||
#define ASM_INT_OP "\t.long "
|
||||
|
|
|
@ -193,6 +193,10 @@ static GTY(()) int next_file_number;
|
|||
|
||||
static GTY(()) int scope_labelno;
|
||||
|
||||
/* A counter for dbxout_source_line. */
|
||||
|
||||
static GTY(()) int dbxout_source_line_counter;
|
||||
|
||||
/* Nonzero if we have actually used any of the GDB extensions
|
||||
to the debugging format. The idea is that we use them for the
|
||||
first time only if there's a strong reason, but once we have done that,
|
||||
|
@ -638,7 +642,8 @@ dbxout_source_line (lineno, filename)
|
|||
dbxout_source_file (asmfile, filename);
|
||||
|
||||
#ifdef ASM_OUTPUT_SOURCE_LINE
|
||||
ASM_OUTPUT_SOURCE_LINE (asmfile, lineno);
|
||||
dbxout_source_line_counter += 1;
|
||||
ASM_OUTPUT_SOURCE_LINE (asmfile, lineno, dbxout_source_line_counter);
|
||||
#else
|
||||
fprintf (asmfile, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
|
||||
#endif
|
||||
|
|
|
@ -6242,10 +6242,12 @@ the assembler source. So you can use it to canonicalize the format
|
|||
of the filename using this macro.
|
||||
|
||||
@findex ASM_OUTPUT_SOURCE_LINE
|
||||
@item ASM_OUTPUT_SOURCE_LINE (@var{stream}, @var{line})
|
||||
@item ASM_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
|
||||
A C statement to output DBX or SDB debugging information before code
|
||||
for line number @var{line} of the current source file to the
|
||||
stdio stream @var{stream}.
|
||||
stdio stream @var{stream}. @var{counter} is the number of time the
|
||||
macro was invoked, including the current invocation; it is intended
|
||||
to generate unique labels in the assembly output.
|
||||
|
||||
This macro need not be defined if the standard form of debugging
|
||||
information for the debugger in use is appropriate.
|
||||
|
|
17
gcc/sdbout.c
17
gcc/sdbout.c
|
@ -51,6 +51,14 @@ AT&T C compiler. From the example below I would conclude the following:
|
|||
|
||||
static GTY(()) tree anonymous_types;
|
||||
|
||||
/* Counter for sdbout_source_line. */
|
||||
|
||||
static GTY(()) int sdbout_source_line_counter;
|
||||
|
||||
/* Counter to generate unique "names" for nameless struct members. */
|
||||
|
||||
static GTY(()) int unnamed_struct_number;
|
||||
|
||||
#ifdef SDB_DEBUGGING_INFO
|
||||
|
||||
#include "rtl.h"
|
||||
|
@ -88,9 +96,6 @@ static GTY(()) tree anonymous_types;
|
|||
|
||||
int sdb_begin_function_line = -1;
|
||||
|
||||
/* Counter to generate unique "names" for nameless struct members. */
|
||||
|
||||
static int unnamed_struct_number = 0;
|
||||
|
||||
extern FILE *asm_out_file;
|
||||
|
||||
|
@ -1527,6 +1532,9 @@ sdbout_end_block (unsigned int line, unsigned int n ATTRIBUTE_UNUSED)
|
|||
PUT_SDB_BLOCK_END (line - sdb_begin_function_line);
|
||||
}
|
||||
|
||||
/* Output a line number symbol entry for source file FILENAME and line
|
||||
number LINE. */
|
||||
|
||||
static void
|
||||
sdbout_source_line (line, filename)
|
||||
unsigned int line;
|
||||
|
@ -1536,7 +1544,8 @@ sdbout_source_line (line, filename)
|
|||
if ((int) line > sdb_begin_function_line)
|
||||
{
|
||||
#ifdef ASM_OUTPUT_SOURCE_LINE
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
|
||||
sdbout_source_line_counter += 1;
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, sdbout_source_line_counter);
|
||||
#else
|
||||
fprintf (asm_out_file, "\t.ln\t%d\n",
|
||||
((sdb_begin_function_line > -1)
|
||||
|
|
|
@ -78,7 +78,7 @@ const char *xcoff_lastfile;
|
|||
((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
|
||||
|
||||
/* Output source line numbers via ".line" rather than ".stabd". */
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM) \
|
||||
#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM,COUNTER) \
|
||||
do \
|
||||
{ \
|
||||
if (xcoff_begin_function_line >= 0) \
|
||||
|
@ -323,7 +323,7 @@ xcoffout_source_line (line, filename)
|
|||
|
||||
xcoffout_source_file (asm_out_file, filename, inline_p);
|
||||
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
|
||||
}
|
||||
|
||||
/* Output the symbols defined in block number DO_BLOCK.
|
||||
|
@ -461,7 +461,7 @@ xcoffout_begin_prologue (line, file)
|
|||
xcoffout_block (DECL_INITIAL (current_function_decl), 0,
|
||||
DECL_ARGUMENTS (current_function_decl));
|
||||
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
|
||||
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
|
||||
}
|
||||
|
||||
/* Called at end of function (before epilogue).
|
||||
|
|
Loading…
Add table
Reference in a new issue