xref: /dflybsd-src/contrib/gcc-4.7/gcc/config/dbxelf.h (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino /* Definitions needed when using stabs embedded in ELF sections.
2*e4b17023SJohn Marino    Copyright (C) 1999, 2004, 2007, 2009 Free Software Foundation, Inc.
3*e4b17023SJohn Marino 
4*e4b17023SJohn Marino This file is part of GCC.
5*e4b17023SJohn Marino 
6*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify
7*e4b17023SJohn Marino it under the terms of the GNU General Public License as published by
8*e4b17023SJohn Marino the Free Software Foundation; either version 3, or (at your option)
9*e4b17023SJohn Marino any later version.
10*e4b17023SJohn Marino 
11*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful,
12*e4b17023SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of
13*e4b17023SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*e4b17023SJohn Marino GNU General Public License for more details.
15*e4b17023SJohn Marino 
16*e4b17023SJohn Marino Under Section 7 of GPL version 3, you are granted additional
17*e4b17023SJohn Marino permissions described in the GCC Runtime Library Exception, version
18*e4b17023SJohn Marino 3.1, as published by the Free Software Foundation.
19*e4b17023SJohn Marino 
20*e4b17023SJohn Marino You should have received a copy of the GNU General Public License and
21*e4b17023SJohn Marino a copy of the GCC Runtime Library Exception along with this program;
22*e4b17023SJohn Marino see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23*e4b17023SJohn Marino <http://www.gnu.org/licenses/>.  */
24*e4b17023SJohn Marino 
25*e4b17023SJohn Marino /* This file may be included by any ELF target which wishes to
26*e4b17023SJohn Marino    support -gstabs generating stabs in sections, as produced by gas
27*e4b17023SJohn Marino    and understood by gdb.  */
28*e4b17023SJohn Marino 
29*e4b17023SJohn Marino #ifndef GCC_DBX_ELF_H
30*e4b17023SJohn Marino #define GCC_DBX_ELF_H
31*e4b17023SJohn Marino 
32*e4b17023SJohn Marino /* Output DBX (stabs) debugging information if doing -gstabs.  */
33*e4b17023SJohn Marino 
34*e4b17023SJohn Marino #define DBX_DEBUGGING_INFO 1
35*e4b17023SJohn Marino 
36*e4b17023SJohn Marino /* Make LBRAC and RBRAC addresses relative to the start of the
37*e4b17023SJohn Marino    function.  The native Solaris stabs debugging format works this
38*e4b17023SJohn Marino    way, gdb expects it, and it reduces the number of relocation
39*e4b17023SJohn Marino    entries...  */
40*e4b17023SJohn Marino 
41*e4b17023SJohn Marino #define DBX_BLOCKS_FUNCTION_RELATIVE 1
42*e4b17023SJohn Marino 
43*e4b17023SJohn Marino /* ... but, to make this work, functions must appear prior to line info.  */
44*e4b17023SJohn Marino 
45*e4b17023SJohn Marino #define DBX_FUNCTION_FIRST
46*e4b17023SJohn Marino 
47*e4b17023SJohn Marino /* When generating stabs debugging, use N_BINCL entries.  */
48*e4b17023SJohn Marino 
49*e4b17023SJohn Marino #define DBX_USE_BINCL
50*e4b17023SJohn Marino 
51*e4b17023SJohn Marino /* There is no limit to the length of stabs strings.  */
52*e4b17023SJohn Marino 
53*e4b17023SJohn Marino #ifndef DBX_CONTIN_LENGTH
54*e4b17023SJohn Marino #define DBX_CONTIN_LENGTH 0
55*e4b17023SJohn Marino #endif
56*e4b17023SJohn Marino 
57*e4b17023SJohn Marino /* Like block addresses, stabs line numbers are relative to the
58*e4b17023SJohn Marino    current function.  */
59*e4b17023SJohn Marino 
60*e4b17023SJohn Marino #define DBX_LINES_FUNCTION_RELATIVE 1
61*e4b17023SJohn Marino 
62*e4b17023SJohn Marino /* Generate a blank trailing N_SO to mark the end of the .o file, since
63*e4b17023SJohn Marino    we can't depend upon the linker to mark .o file boundaries with
64*e4b17023SJohn Marino    embedded stabs.  */
65*e4b17023SJohn Marino 
66*e4b17023SJohn Marino #define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
67*e4b17023SJohn Marino 
68*e4b17023SJohn Marino #endif /* ! GCC_DBX_ELF_H */
69