1 /* Generate SDB debugging info.
2 Copyright (C) 2003 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, 59 Temple Place - Suite 330, 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 #define PUT_SDB_DEF(a) \
39 fprintf (asm_out_file, "\t%s.def\t", \
40 (TARGET_GAS) ? "" : "#"); \
41 ASM_OUTPUT_LABELREF (asm_out_file, a); \
42 fputc (';', asm_out_file); \
45 #define PUT_SDB_PLAIN_DEF(a) \
47 fprintf (asm_out_file, "\t%s.def\t.%s;", \
48 (TARGET_GAS) ? "" : "#", (a)); \
51 /* For block start and end, we create labels, so that
52 later we can figure out where the correct offset is.
53 The normal .ent/.end serve well enough for functions,
54 so those are just commented out. */
56 #define PUT_SDB_BLOCK_START(LINE) \
58 fprintf (asm_out_file, \
59 "%sLb%d:\n\t%s.begin\t%sLb%d\t%d\n", \
62 (TARGET_GAS) ? "" : "#", \
69 #define PUT_SDB_BLOCK_END(LINE) \
71 fprintf (asm_out_file, \
72 "%sLe%d:\n\t%s.bend\t%sLe%d\t%d\n", \
75 (TARGET_GAS) ? "" : "#", \
82 #define PUT_SDB_FUNCTION_START(LINE)
84 #define PUT_SDB_FUNCTION_END(LINE) \
86 ASM_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line, 0); \
89 #define PUT_SDB_EPILOGUE_END(NAME)