source: trunk/src/gcc/gcc/config/dbxelf.h@ 1392

Last change on this file since 1392 was 1392, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/* Definitions needed when using stabs embedded in ELF sections.
2 Copyright (C) 1999 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21/* This file may be included by any ELF target which wishes to
22 support -gstabs generating stabs in sections, as produced by gas
23 and understood by gdb. */
24
25#ifndef GCC_DBX_ELF_H
26#define GCC_DBX_ELF_H
27
28/* Output DBX (stabs) debugging information if doing -gstabs. */
29
30#define DBX_DEBUGGING_INFO 1
31
32/* Make LBRAC and RBRAC addresses relative to the start of the
33 function. The native Solaris stabs debugging format works this
34 way, gdb expects it, and it reduces the number of relocation
35 entries... */
36
37#undef DBX_BLOCKS_FUNCTION_RELATIVE
38#define DBX_BLOCKS_FUNCTION_RELATIVE 1
39
40/* ... but, to make this work, functions must appear prior to line info. */
41
42#undef DBX_FUNCTION_FIRST
43#define DBX_FUNCTION_FIRST
44
45/* When generating stabs debugging, use N_BINCL entries. */
46
47#undef DBX_USE_BINCL
48#define DBX_USE_BINCL
49
50/* There is no limit to the length of stabs strings. */
51
52#ifndef DBX_CONTIN_LENGTH
53#define DBX_CONTIN_LENGTH 0
54#endif
55
56/* Like block addresses, stabs line numbers are relative to the
57 current function. */
58
59#undef ASM_OUTPUT_SOURCE_LINE
60#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
61do \
62 { \
63 static int sym_lineno = 1; \
64 char temp[256]; \
65 ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno); \
66 fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
67 assemble_name (FILE, temp); \
68 putc ('-', FILE); \
69 assemble_name (FILE, \
70 XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
71 putc ('\n', FILE); \
72 ASM_OUTPUT_INTERNAL_LABEL (FILE, "LM", sym_lineno); \
73 sym_lineno += 1; \
74 } \
75while (0)
76
77/* Generate a blank trailing N_SO to mark the end of the .o file, since
78 we can't depend upon the linker to mark .o file boundaries with
79 embedded stabs. */
80
81#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
82#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
83 asm_fprintf (FILE, \
84 "\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO)
85
86#endif /* ! GCC_DBX_ELF_H */
Note: See TracBrowser for help on using the repository browser.