2008-07-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[official-gcc.git] / gcc / config / mips / sdb.h
blob27a42df7ab2d690d3c2f9f0202069b32747b2250
1 /* Generate SDB debugging info.
2 Copyright (C) 2003, 2004, 2007 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 3, or (at your option) any later
9 version.
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
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 /* Note that no configuration uses sdb as its preferred format. */
22 #define SDB_DEBUGGING_INFO 1
24 /* Forward references to tags are allowed. */
25 #define SDB_ALLOW_FORWARD_REFERENCES
27 /* Unknown tags are also allowed. */
28 #define SDB_ALLOW_UNKNOWN_REFERENCES
30 /* Block start/end next label #. */
31 extern int sdb_label_count;
33 /* Starting line of current function. */
34 extern int sdb_begin_function_line;
36 /* For block start and end, we create labels, so that
37 later we can figure out where the correct offset is.
38 The normal .ent/.end serve well enough for functions,
39 so those are just commented out. */
41 #define PUT_SDB_BLOCK_START(LINE) \
42 do { \
43 fprintf (asm_out_file, \
44 "%sLb%d:\n\t.begin\t%sLb%d\t%d\n", \
45 LOCAL_LABEL_PREFIX, \
46 sdb_label_count, \
47 LOCAL_LABEL_PREFIX, \
48 sdb_label_count, \
49 (LINE)); \
50 sdb_label_count++; \
51 } while (0)
53 #define PUT_SDB_BLOCK_END(LINE) \
54 do { \
55 fprintf (asm_out_file, \
56 "%sLe%d:\n\t.bend\t%sLe%d\t%d\n", \
57 LOCAL_LABEL_PREFIX, \
58 sdb_label_count, \
59 LOCAL_LABEL_PREFIX, \
60 sdb_label_count, \
61 (LINE)); \
62 sdb_label_count++; \
63 } while (0)
65 #define PUT_SDB_FUNCTION_START(LINE)
67 #define PUT_SDB_FUNCTION_END(LINE) \
68 do { \
69 SDB_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line); \
70 } while (0)
72 #define PUT_SDB_EPILOGUE_END(NAME)
74 /* We need to use .esize and .etype instead of .size and .type to
75 avoid conflicting with ELF directives. */
76 #undef PUT_SDB_SIZE
77 #define PUT_SDB_SIZE(a) \
78 do { \
79 fprintf (asm_out_file, "\t.esize\t" HOST_WIDE_INT_PRINT_DEC ";", \
80 (HOST_WIDE_INT) (a)); \
81 } while (0)
83 #undef PUT_SDB_TYPE
84 #define PUT_SDB_TYPE(a) \
85 do { \
86 fprintf (asm_out_file, "\t.etype\t0x%x;", (a)); \
87 } while (0)