1 /* Generate SDB debugging info.
2 Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to the Free
18 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
21 /* Note that no configuration uses sdb as its preferred format. */
23 #define SDB_DEBUGGING_INFO 1
25 /* Forward references to tags are allowed. */
26 #define SDB_ALLOW_FORWARD_REFERENCES
28 /* Unknown tags are also allowed. */
29 #define SDB_ALLOW_UNKNOWN_REFERENCES
31 /* Block start/end next label #. */
32 extern int sdb_label_count
;
34 /* Starting line of current function. */
35 extern int sdb_begin_function_line
;
37 /* For block start and end, we create labels, so that
38 later we can figure out where the correct offset is.
39 The normal .ent/.end serve well enough for functions,
40 so those are just commented out. */
42 #define PUT_SDB_BLOCK_START(LINE) \
44 fprintf (asm_out_file, \
45 "%sLb%d:\n\t.begin\t%sLb%d\t%d\n", \
54 #define PUT_SDB_BLOCK_END(LINE) \
56 fprintf (asm_out_file, \
57 "%sLe%d:\n\t.bend\t%sLe%d\t%d\n", \
66 #define PUT_SDB_FUNCTION_START(LINE)
68 #define PUT_SDB_FUNCTION_END(LINE) \
70 SDB_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line); \
73 #define PUT_SDB_EPILOGUE_END(NAME)
75 /* We need to use .esize and .etype instead of .size and .type to
76 avoid conflicting with ELF directives. */
78 #define PUT_SDB_SIZE(a) \
80 fprintf (asm_out_file, "\t.esize\t" HOST_WIDE_INT_PRINT_DEC ";", \
81 (HOST_WIDE_INT) (a)); \
85 #define PUT_SDB_TYPE(a) \
87 fprintf (asm_out_file, "\t.etype\t0x%x;", (a)); \