]>
Commit | Line | Data |
---|---|---|
89b66cde | 1 | /* dwarf2dbg.h - DWARF2 debug support |
2da5c037 | 2 | Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc. |
89b66cde ILT |
3 | |
4 | This file is part of GAS, the GNU Assembler. | |
5 | ||
6 | GAS is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GAS is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GAS; see the file COPYING. If not, write to the Free | |
4b4da160 NC |
18 | Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA |
19 | 02110-1301, USA. */ | |
89b66cde | 20 | |
fac0d250 RH |
21 | #ifndef AS_DWARF2DBG_H |
22 | #define AS_DWARF2DBG_H | |
23 | ||
24 | #include "as.h" | |
25 | ||
bd0eb99b RH |
26 | #define DWARF2_FLAG_IS_STMT (1 << 0) |
27 | #define DWARF2_FLAG_BASIC_BLOCK (1 << 1) | |
28 | #define DWARF2_FLAG_PROLOGUE_END (1 << 2) | |
29 | #define DWARF2_FLAG_EPILOGUE_BEGIN (1 << 3) | |
fac0d250 | 30 | |
e6c774b4 | 31 | struct dwarf2_line_info { |
e6c774b4 KH |
32 | unsigned int filenum; |
33 | unsigned int line; | |
34 | unsigned int column; | |
bd0eb99b | 35 | unsigned int isa; |
e6c774b4 KH |
36 | unsigned int flags; |
37 | }; | |
fac0d250 RH |
38 | |
39 | /* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 | |
40 | to indicate that no file number has been assigned. All real file | |
41 | number must be >0. */ | |
a2e22468 | 42 | extern char *dwarf2_directive_file (int dummy); |
fac0d250 RH |
43 | |
44 | /* Implements the .loc FILENO LINENO [COLUMN] directive. FILENO is | |
45 | the file number, LINENO the line number and the (optional) COLUMN | |
46 | the column of the source code that the following instruction | |
47 | corresponds to. FILENO can be 0 to indicate that the filename | |
48 | specified by the textually most recent .file directive should be | |
49 | used. */ | |
a2e22468 | 50 | extern void dwarf2_directive_loc (int dummy); |
fac0d250 RH |
51 | |
52 | /* Returns the current source information. If .file directives have | |
53 | been encountered, the info for the corresponding source file is | |
54 | returned. Otherwise, the info for the assembly source file is | |
55 | returned. */ | |
a2e22468 | 56 | extern void dwarf2_where (struct dwarf2_line_info *l); |
fac0d250 RH |
57 | |
58 | /* This function generates .debug_line info based on the address and | |
59 | source information passed in the arguments. ADDR should be the | |
60 | frag-relative offset of the instruction the information is for and | |
61 | L is the source information that should be associated with that | |
a01b9fa4 | 62 | address. */ |
a2e22468 | 63 | extern void dwarf2_gen_line_info (addressT addr, struct dwarf2_line_info *l); |
fac0d250 | 64 | |
220e750f | 65 | /* Must be called for each generated instruction. */ |
a2e22468 | 66 | extern void dwarf2_emit_insn (int); |
220e750f | 67 | |
a2e22468 | 68 | extern void dwarf2_finish (void); |
fac0d250 | 69 | |
a2e22468 KH |
70 | extern int dwarf2dbg_estimate_size_before_relax (fragS *); |
71 | extern int dwarf2dbg_relax_frag (fragS *); | |
72 | extern void dwarf2dbg_convert_frag (fragS *); | |
85a39694 | 73 | |
14e777e0 KB |
74 | /* An enumeration which describes the sizes of offsets (to DWARF sections) |
75 | and the mechanism by which the size is indicated. */ | |
76 | enum dwarf2_format { | |
77 | /* 32-bit format: the initial length field is 4 bytes long. */ | |
78 | dwarf2_format_32bit, | |
79 | /* DWARF3 64-bit format: the representation of the initial length | |
80 | (of a DWARF section) is 0xffffffff (4 bytes) followed by eight | |
81 | bytes indicating the actual length. */ | |
82 | dwarf2_format_64bit, | |
83 | /* SGI extension to DWARF2: The initial length is eight bytes. */ | |
84 | dwarf2_format_64bit_irix | |
85 | }; | |
86 | ||
fac0d250 | 87 | #endif /* AS_DWARF2DBG_H */ |