1 /* dwwrf.h - DWARF support header file
3 Free Software Foundation, Inc.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
22 #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
23 /* We can't use any bfd types here since readelf may define BFD64 and
25 typedef unsigned long long dwarf_vma
;
26 typedef unsigned long long dwarf_size_type
;
28 typedef unsigned long dwarf_vma
;
29 typedef unsigned long dwarf_size_type
;
40 /* A structure containing the name of a debug section
41 and a pointer to a function that can decode it. */
42 struct dwarf_section_display
44 struct dwarf_section section
;
45 int (*display
) (struct dwarf_section
*, void *);
46 unsigned int relocate
: 1;
47 unsigned int eh_frame
: 1;
50 enum dwarf_section_display_enum
{
70 extern struct dwarf_section_display debug_displays
[];
72 /* This structure records the information that
73 we extract from the.debug_info section. */
76 unsigned int pointer_size
;
77 unsigned long cu_offset
;
78 unsigned long base_address
;
79 /* This is an array of offsets to the location list table. */
80 unsigned long *loc_offsets
;
82 unsigned int num_loc_offsets
;
83 unsigned int max_loc_offsets
;
84 unsigned long *range_lists
;
85 unsigned int num_range_lists
;
86 unsigned int max_range_lists
;
90 extern dwarf_vma (*byte_get
) (unsigned char *, int);
91 extern dwarf_vma
byte_get_little_endian (unsigned char *, int);
92 extern dwarf_vma
byte_get_big_endian (unsigned char *, int);
94 extern int eh_addr_size
;
96 extern int do_debug_info
;
97 extern int do_debug_abbrevs
;
98 extern int do_debug_lines
;
99 extern int do_debug_pubnames
;
100 extern int do_debug_aranges
;
101 extern int do_debug_ranges
;
102 extern int do_debug_frames
;
103 extern int do_debug_frames_interp
;
104 extern int do_debug_macinfo
;
105 extern int do_debug_str
;
106 extern int do_debug_loc
;
108 extern void init_dwarf_regnames (unsigned int);
110 extern int load_debug_section (enum dwarf_section_display_enum
,
112 extern void free_debug_section (enum dwarf_section_display_enum
);
114 extern void free_debug_memory (void);
116 void *cmalloc (size_t, size_t);
117 void *xcmalloc (size_t, size_t);
118 void *xcrealloc (void *, size_t, size_t);
120 void error (const char *, ...) ATTRIBUTE_PRINTF_1
;
121 void warn (const char *, ...) ATTRIBUTE_PRINTF_1
;