]>
Commit | Line | Data |
---|---|---|
89b66cde | 1 | /* dwarf2dbg.h - DWARF2 debug support |
f7e42eb4 | 2 | Copyright 1999, 2000 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 | |
18 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA | |
19 | 02111-1307, USA. */ | |
20 | ||
fac0d250 RH |
21 | #ifndef AS_DWARF2DBG_H |
22 | #define AS_DWARF2DBG_H | |
23 | ||
24 | #include "as.h" | |
25 | ||
26 | #define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */ | |
27 | #define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */ | |
28 | ||
e6c774b4 | 29 | struct dwarf2_line_info { |
e6c774b4 KH |
30 | unsigned int filenum; |
31 | unsigned int line; | |
32 | unsigned int column; | |
33 | unsigned int flags; | |
34 | }; | |
fac0d250 RH |
35 | |
36 | /* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 | |
37 | to indicate that no file number has been assigned. All real file | |
38 | number must be >0. */ | |
ecb4347a | 39 | extern char *dwarf2_directive_file PARAMS ((int dummy)); |
fac0d250 RH |
40 | |
41 | /* Implements the .loc FILENO LINENO [COLUMN] directive. FILENO is | |
42 | the file number, LINENO the line number and the (optional) COLUMN | |
43 | the column of the source code that the following instruction | |
44 | corresponds to. FILENO can be 0 to indicate that the filename | |
45 | specified by the textually most recent .file directive should be | |
46 | used. */ | |
a7cd1c22 | 47 | extern void dwarf2_directive_loc PARAMS ((int dummy)); |
fac0d250 RH |
48 | |
49 | /* Returns the current source information. If .file directives have | |
50 | been encountered, the info for the corresponding source file is | |
51 | returned. Otherwise, the info for the assembly source file is | |
52 | returned. */ | |
a7cd1c22 | 53 | extern void dwarf2_where PARAMS ((struct dwarf2_line_info *l)); |
fac0d250 RH |
54 | |
55 | /* This function generates .debug_line info based on the address and | |
56 | source information passed in the arguments. ADDR should be the | |
57 | frag-relative offset of the instruction the information is for and | |
58 | L is the source information that should be associated with that | |
a01b9fa4 | 59 | address. */ |
9e3af0e7 | 60 | extern void dwarf2_gen_line_info PARAMS ((addressT addr, |
a7cd1c22 | 61 | struct dwarf2_line_info *l)); |
fac0d250 | 62 | |
220e750f RH |
63 | /* Must be called for each generated instruction. */ |
64 | extern void dwarf2_emit_insn PARAMS ((int)); | |
65 | ||
a7cd1c22 | 66 | extern void dwarf2_finish PARAMS ((void)); |
fac0d250 | 67 | |
220e750f RH |
68 | extern int dwarf2dbg_estimate_size_before_relax PARAMS ((fragS *)); |
69 | extern int dwarf2dbg_relax_frag PARAMS ((fragS *)); | |
70 | extern void dwarf2dbg_convert_frag PARAMS ((fragS *)); | |
85a39694 | 71 | |
14e777e0 KB |
72 | /* An enumeration which describes the sizes of offsets (to DWARF sections) |
73 | and the mechanism by which the size is indicated. */ | |
74 | enum dwarf2_format { | |
75 | /* 32-bit format: the initial length field is 4 bytes long. */ | |
76 | dwarf2_format_32bit, | |
77 | /* DWARF3 64-bit format: the representation of the initial length | |
78 | (of a DWARF section) is 0xffffffff (4 bytes) followed by eight | |
79 | bytes indicating the actual length. */ | |
80 | dwarf2_format_64bit, | |
81 | /* SGI extension to DWARF2: The initial length is eight bytes. */ | |
82 | dwarf2_format_64bit_irix | |
83 | }; | |
84 | ||
fac0d250 | 85 | #endif /* AS_DWARF2DBG_H */ |