OSDN Git Service

GNU CC -> GCC
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / sdb.h
1 /* Generate SDB debugging info.
2    Copyright (C) 2003 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
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
9 version.
10
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.
15
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
19 02111-1307, USA.  */
20
21 /* Note that no configuration uses sdb as its preferred format.  */
22
23 #define SDB_DEBUGGING_INFO 1
24
25 /* Forward references to tags are allowed.  */
26 #define SDB_ALLOW_FORWARD_REFERENCES
27
28 /* Unknown tags are also allowed.  */
29 #define SDB_ALLOW_UNKNOWN_REFERENCES
30
31 /* Block start/end next label #.  */
32 extern int sdb_label_count;
33
34 /* Starting line of current function.  */
35 extern int sdb_begin_function_line;
36
37 #define PUT_SDB_DEF(a)                                  \
38 do {                                                    \
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);                            \
43 } while (0)
44
45 #define PUT_SDB_PLAIN_DEF(a)                            \
46 do {                                                    \
47   fprintf (asm_out_file, "\t%s.def\t.%s;",              \
48            (TARGET_GAS) ? "" : "#", (a));               \
49 } while (0)
50
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.  */
55
56 #define PUT_SDB_BLOCK_START(LINE)                       \
57 do {                                                    \
58   fprintf (asm_out_file,                                \
59            "%sLb%d:\n\t%s.begin\t%sLb%d\t%d\n",         \
60            LOCAL_LABEL_PREFIX,                          \
61            sdb_label_count,                             \
62            (TARGET_GAS) ? "" : "#",                     \
63            LOCAL_LABEL_PREFIX,                          \
64            sdb_label_count,                             \
65            (LINE));                                     \
66   sdb_label_count++;                                    \
67 } while (0)
68
69 #define PUT_SDB_BLOCK_END(LINE)                         \
70 do {                                                    \
71   fprintf (asm_out_file,                                \
72            "%sLe%d:\n\t%s.bend\t%sLe%d\t%d\n",          \
73            LOCAL_LABEL_PREFIX,                          \
74            sdb_label_count,                             \
75            (TARGET_GAS) ? "" : "#",                     \
76            LOCAL_LABEL_PREFIX,                          \
77            sdb_label_count,                             \
78            (LINE));                                     \
79   sdb_label_count++;                                    \
80 } while (0)
81
82 #define PUT_SDB_FUNCTION_START(LINE)
83
84 #define PUT_SDB_FUNCTION_END(LINE)                      \
85 do {                                                    \
86   ASM_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line, 0); \
87 } while (0)
88
89 #define PUT_SDB_EPILOGUE_END(NAME)