gcc/gcc/config/dbxcoff.h

85 lines
2.8 KiB
C
Raw Normal View History

1996-01-16 17:39:57 +01:00
/* Definitions needed when using stabs embedded in COFF sections.
Copyright (C) 1996 Free Software Foundation, Inc.
2003-09-27 06:48:30 +02:00
This file is part of GCC.
1996-01-16 17:39:57 +01:00
2003-09-27 06:48:30 +02:00
GCC is free software; you can redistribute it and/or modify
1996-01-16 17:39:57 +01:00
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
2003-09-27 06:48:30 +02:00
GCC is distributed in the hope that it will be useful,
1996-01-16 17:39:57 +01:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
2003-09-27 06:48:30 +02:00
along with GCC; see the file COPYING. If not, write to
1996-01-16 17:39:57 +01:00
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file may be included by any COFF target which wishes to
support -gstabs generating stabs in sections, as produced by gas
and understood by gdb. */
/* Output DBX (stabs) debugging information if doing -gstabs. */
chorus.h: Consistently define *_DEBUGGING_INFO with the value 1. * config/chorus.h: Consistently define *_DEBUGGING_INFO with the value 1. Do not undef before defining. * config/darwin.h: Likewise. * config/dbx.h: Likewise. * config/dbxcoff.h: Likewise. * config/dbxelf.h: Likewise. * config/elfos.h: Likewise. * config/interix.h: Likewise. * config/lynx-ng.h: Likewise. * config/lynx.h: Likewise. * config/netware.h: Likewise. * config/psos.h: Likewise. * config/svr3.h: Likewise. * config/alpha/alpha.h: Likewise. * config/alpha/elf.h: Likewise. * config/alpha/vms.h: Likewise. * config/arc/arc.h: Likewise. * config/arm/aout.h: Likewise. * config/arm/coff.h: Likewise. * config/c4x/c4x.h: Likewise. * config/h8300/h8300.h: Likewise. * config/i386/cygwin.h: Likewise. * config/i386/djgpp.h: Likewise. * config/i386/gas.h: Likewise. * config/i386/gstabs.h: Likewise. * config/i386/i386-coff.h: Likewise. * config/i386/i386-interix.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3dbx.h: Likewise. * config/i386/sysv3.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/x86-64.h: Likewise. * config/i960/i960.h: Likewise. * config/ia64/ia64.h: Likewise. * config/ip2k/ip2k.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/3b1.h: Likewise. * config/m68k/3b1g.h: Likewise. * config/m68k/ccur-GAS.h: Likewise. * config/m68k/coff.h: Likewise. * config/m68k/hp2bsd.h: Likewise. * config/m68k/hp310g.h: Likewise. * config/m68k/hp320g.h: Likewise. * config/m68k/hp3bsd.h: Likewise. * config/m68k/hp3bsd44.h: Likewise. * config/m68k/linux-aout.h: Likewise. * config/m68k/m68k-aout.h: Likewise. * config/m68k/mot3300.h: Likewise. * config/m68k/netbsd.h: Likewise. * config/m68k/openbsd.h: Likewise. * config/m68k/pbb.h: Likewise. * config/m68k/plexus.h: Likewise. * config/m68k/sun2.h: Likewise. * config/m68k/sun3.h: Likewise. * config/m68k/tower-as.h: Likewise. * config/m68k/vxm68k.h: Likewise. * config/m88k/aout-dbx.h: Likewise. * config/m88k/m88k-aout.h: Likewise. * config/mcore/mcore-elf.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h: Likewise. * config/mips/elf64.h: Likewise. * config/mips/iris5gas.h: Likewise. * config/mips/iris6.h: Likewise. * config/mips/mips.h: Likewise. * config/mips/sni-gas.h: Likewise. * config/mmix/mmix.h: Likewise. * config/ns32k/netbsd.h: Likewise. * config/pa/pa64-hpux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/sh/coff.h: Likewise. * config/sh/elf.h: Likewise. * config/sparc/linux64.h: Likewise. * config/sparc/liteelf.h: Likewise. * config/sparc/netbsd.h: Likewise. * config/sparc/openbsd.h: Likewise. * config/sparc/pbd.h: Likewise. * config/sparc/sp64-elf.h: Likewise. * config/sparc/sp86x-elf.h: Likewise. * config/sparc/sparc.h: Likewise. * config/vax/vax.h: Likewise. * config/vax/vaxv.h: Likewise. From-SVN: r56667
2002-08-29 23:40:18 +02:00
#define DBX_DEBUGGING_INFO 1
1996-01-16 17:39:57 +01:00
/* Generate SDB debugging information by default. */
1996-01-16 17:39:57 +01:00
#ifndef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
#endif
/* Be function-relative for block and source line stab directives. */
1996-01-28 20:43:58 +01:00
#undef DBX_BLOCKS_FUNCTION_RELATIVE
1996-01-16 17:39:57 +01:00
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
/* but, to make this work, functions must appear prior to line info. */
1996-01-28 20:43:58 +01:00
#undef DBX_FUNCTION_FIRST
1996-01-16 17:39:57 +01:00
#define DBX_FUNCTION_FIRST
/* Generate a blank trailing N_SO to mark the end of the .o file, since
we can't depend upon the linker to mark .o file boundaries with
embedded stabs. */
1996-01-28 20:43:58 +01:00
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
1996-01-16 17:39:57 +01:00
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
asm_fprintf (FILE, \
"\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO)
1996-01-16 17:39:57 +01:00
/* Like block addresses, stabs line numbers are relative to the
current function. */
#undef ASM_OUTPUT_SOURCE_LINE
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
2003-06-17 10:06:58 +02:00
#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
1996-01-16 17:39:57 +01:00
{ 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) { \
char buffer[256]; \
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
2003-06-17 10:06:58 +02:00
ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", COUNTER); \
fprintf (FILE, ".stabn 68,0,%d,", LINE); \
assemble_name (FILE, buffer); \
putc ('-', FILE); \
1996-01-16 17:39:57 +01:00
assemble_name (FILE, \
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
putc ('\n', FILE); \
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
2003-06-17 10:06:58 +02:00
(*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
1996-01-16 17:39:57 +01:00
} }
/* When generating stabs debugging, use N_BINCL entries. */
1996-01-28 20:43:58 +01:00
#undef DBX_USE_BINCL
#define DBX_USE_BINCL
/* There is no limit to the length of stabs strings. */
#ifndef DBX_CONTIN_LENGTH
#define DBX_CONTIN_LENGTH 0
#endif