* inflow.c (terminal_ours_1): Remove useless line.
[deliverable/binutils-gdb.git] / binutils / dwarf.h
CommitLineData
19e6b90e 1/* dwwrf.h - DWARF support header file
3db64b00 2 Copyright 2005, 2007
19e6b90e
L
3 Free Software Foundation, Inc.
4
32866df7 5 This file is part of GNU Binutils.
19e6b90e 6
32866df7
NC
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.
19e6b90e 11
32866df7
NC
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.
19e6b90e 16
32866df7
NC
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. */
19e6b90e 21
19e6b90e
L
22#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
23/* We can't use any bfd types here since readelf may define BFD64 and
24 objdump may not. */
25typedef unsigned long long dwarf_vma;
26typedef unsigned long long dwarf_size_type;
27#else
28typedef unsigned long dwarf_vma;
29typedef unsigned long dwarf_size_type;
30#endif
31
32struct dwarf_section
33{
34 const char *name;
35 unsigned char *start;
36 dwarf_vma address;
37 dwarf_size_type size;
38};
39
40/* A structure containing the name of a debug section
41 and a pointer to a function that can decode it. */
42struct dwarf_section_display
43{
44 struct dwarf_section section;
45 int (*display) (struct dwarf_section *, void *);
46 unsigned int relocate : 1;
47 unsigned int eh_frame : 1;
48};
49
50enum dwarf_section_display_enum {
51 abbrev = 0,
52 aranges,
53 frame,
54 info,
55 line,
56 pubnames,
57 eh_frame,
58 macinfo,
59 str,
60 loc,
61 pubtypes,
62 ranges,
63 static_func,
64 static_vars,
65 types,
66 weaknames,
67 max
68};
69
70extern struct dwarf_section_display debug_displays [];
71
72/* This structure records the information that
73 we extract from the.debug_info section. */
74typedef struct
75{
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;
81 int *have_frame_base;
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;
87}
88debug_info;
89
90extern dwarf_vma (*byte_get) (unsigned char *, int);
91extern dwarf_vma byte_get_little_endian (unsigned char *, int);
92extern dwarf_vma byte_get_big_endian (unsigned char *, int);
93
94extern dwarf_vma eh_addr_size;
95extern int is_relocatable;
96
97extern int do_debug_info;
98extern int do_debug_abbrevs;
99extern int do_debug_lines;
100extern int do_debug_pubnames;
101extern int do_debug_aranges;
102extern int do_debug_ranges;
103extern int do_debug_frames;
104extern int do_debug_frames_interp;
105extern int do_debug_macinfo;
106extern int do_debug_str;
107extern int do_debug_loc;
108
109extern int load_debug_section (enum dwarf_section_display_enum,
110 void *);
111extern void free_debug_section (enum dwarf_section_display_enum);
112
113extern void free_debug_memory (void);
114
115void *cmalloc (size_t, size_t);
116void *xcmalloc (size_t, size_t);
117void *xcrealloc (void *, size_t, size_t);
118
119void error (const char *, ...) ATTRIBUTE_PRINTF_1;
120void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
This page took 0.077033 seconds and 4 git commands to generate.