diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-06-17 10:06:58 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-06-17 08:06:58 +0000 |
commit | a8d0467e650910986afba4b0b9ed863f9138729c (patch) | |
tree | 98d6f0492483bbcc24e337cccf53625556e15f44 /gcc/sdbout.c | |
parent | 730cf8223861736f94452b3d0047f95c29e3ad19 (diff) | |
download | gcc-a8d0467e650910986afba4b0b9ed863f9138729c.zip gcc-a8d0467e650910986afba4b0b9ed863f9138729c.tar.gz gcc-a8d0467e650910986afba4b0b9ed863f9138729c.tar.bz2 |
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
Diffstat (limited to 'gcc/sdbout.c')
-rw-r--r-- | gcc/sdbout.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/sdbout.c b/gcc/sdbout.c index 0af958c..54dcc79 100644 --- a/gcc/sdbout.c +++ b/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) |