OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [mips/] [sdb.h] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Generate SDB debugging info.
2
   Copyright (C) 2003, 2004, 2007 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 3, 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 COPYING3.  If not see
18
<http://www.gnu.org/licenses/>.  */
19
 
20
/* Note that no configuration uses sdb as its preferred format.  */
21
 
22
#define SDB_DEBUGGING_INFO 1
23
 
24
/* Forward references to tags are allowed.  */
25
#define SDB_ALLOW_FORWARD_REFERENCES
26
 
27
/* Unknown tags are also allowed.  */
28
#define SDB_ALLOW_UNKNOWN_REFERENCES
29
 
30
/* Block start/end next label #.  */
31
extern int sdb_label_count;
32
 
33
/* Starting line of current function.  */
34
extern int sdb_begin_function_line;
35
 
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.  */
40
 
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)
52
 
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)
64
 
65
#define PUT_SDB_FUNCTION_START(LINE)
66
 
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)
71
 
72
#define PUT_SDB_EPILOGUE_END(NAME)
73
 
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)
82
 
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)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.