rdwarf 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +28 -0
- data/README.md +39 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/ext/rdwarf/depend +5 -0
- data/ext/rdwarf/extconf.rb +29 -0
- data/ext/rdwarf/libdwarf/CHANGES +102 -0
- data/ext/rdwarf/libdwarf/CODINGSTYLE +71 -0
- data/ext/rdwarf/libdwarf/COPYING +28 -0
- data/ext/rdwarf/libdwarf/ChangeLog +619 -0
- data/ext/rdwarf/libdwarf/ChangeLog2006 +835 -0
- data/ext/rdwarf/libdwarf/ChangeLog2007 +217 -0
- data/ext/rdwarf/libdwarf/ChangeLog2008 +263 -0
- data/ext/rdwarf/libdwarf/ChangeLog2009 +348 -0
- data/ext/rdwarf/libdwarf/ChangeLog2010 +175 -0
- data/ext/rdwarf/libdwarf/ChangeLog2011 +297 -0
- data/ext/rdwarf/libdwarf/ChangeLog2012 +131 -0
- data/ext/rdwarf/libdwarf/ChangeLog2013 +238 -0
- data/ext/rdwarf/libdwarf/ChangeLog2014 +399 -0
- data/ext/rdwarf/libdwarf/LGPL.txt +504 -0
- data/ext/rdwarf/libdwarf/LIBDWARFCOPYRIGHT +40 -0
- data/ext/rdwarf/libdwarf/Makefile.in +220 -0
- data/ext/rdwarf/libdwarf/NEWS +535 -0
- data/ext/rdwarf/libdwarf/README +235 -0
- data/ext/rdwarf/libdwarf/checkexamples.c +1179 -0
- data/ext/rdwarf/libdwarf/cmplrs/dwarf_addr_finder.h +55 -0
- data/ext/rdwarf/libdwarf/common.c +62 -0
- data/ext/rdwarf/libdwarf/common.h +38 -0
- data/ext/rdwarf/libdwarf/config.h.in +146 -0
- data/ext/rdwarf/libdwarf/configure +5581 -0
- data/ext/rdwarf/libdwarf/configure.in +167 -0
- data/ext/rdwarf/libdwarf/dw-linetableheader.txt +39 -0
- data/ext/rdwarf/libdwarf/dwarf.h +1342 -0
- data/ext/rdwarf/libdwarf/dwarf_abbrev.c +291 -0
- data/ext/rdwarf/libdwarf/dwarf_abbrev.h +45 -0
- data/ext/rdwarf/libdwarf/dwarf_addr_finder.c +676 -0
- data/ext/rdwarf/libdwarf/dwarf_alloc.c +685 -0
- data/ext/rdwarf/libdwarf/dwarf_alloc.h +38 -0
- data/ext/rdwarf/libdwarf/dwarf_arange.c +595 -0
- data/ext/rdwarf/libdwarf/dwarf_arange.h +62 -0
- data/ext/rdwarf/libdwarf/dwarf_base_types.h +157 -0
- data/ext/rdwarf/libdwarf/dwarf_die_deliv.c +1802 -0
- data/ext/rdwarf/libdwarf/dwarf_die_deliv.h +46 -0
- data/ext/rdwarf/libdwarf/dwarf_elf_access.c +1348 -0
- data/ext/rdwarf/libdwarf/dwarf_elf_access.h +46 -0
- data/ext/rdwarf/libdwarf/dwarf_error.c +492 -0
- data/ext/rdwarf/libdwarf/dwarf_error.h +53 -0
- data/ext/rdwarf/libdwarf/dwarf_form.c +1302 -0
- data/ext/rdwarf/libdwarf/dwarf_frame.c +2454 -0
- data/ext/rdwarf/libdwarf/dwarf_frame.h +418 -0
- data/ext/rdwarf/libdwarf/dwarf_frame2.c +1533 -0
- data/ext/rdwarf/libdwarf/dwarf_frame3.c +282 -0
- data/ext/rdwarf/libdwarf/dwarf_funcs.c +123 -0
- data/ext/rdwarf/libdwarf/dwarf_funcs.h +33 -0
- data/ext/rdwarf/libdwarf/dwarf_gdbindex.c +520 -0
- data/ext/rdwarf/libdwarf/dwarf_gdbindex.h +97 -0
- data/ext/rdwarf/libdwarf/dwarf_global.c +612 -0
- data/ext/rdwarf/libdwarf/dwarf_global.h +117 -0
- data/ext/rdwarf/libdwarf/dwarf_harmless.c +228 -0
- data/ext/rdwarf/libdwarf/dwarf_harmless.h +31 -0
- data/ext/rdwarf/libdwarf/dwarf_incl.h +61 -0
- data/ext/rdwarf/libdwarf/dwarf_init_finish.c +1263 -0
- data/ext/rdwarf/libdwarf/dwarf_leb.c +159 -0
- data/ext/rdwarf/libdwarf/dwarf_line.c +1822 -0
- data/ext/rdwarf/libdwarf/dwarf_line.h +446 -0
- data/ext/rdwarf/libdwarf/dwarf_line2.c +98 -0
- data/ext/rdwarf/libdwarf/dwarf_line_table_reader_common.c +1583 -0
- data/ext/rdwarf/libdwarf/dwarf_loc.c +1525 -0
- data/ext/rdwarf/libdwarf/dwarf_loc.h +149 -0
- data/ext/rdwarf/libdwarf/dwarf_loc2.c +833 -0
- data/ext/rdwarf/libdwarf/dwarf_macro.c +479 -0
- data/ext/rdwarf/libdwarf/dwarf_macro.h +35 -0
- data/ext/rdwarf/libdwarf/dwarf_opaque.h +778 -0
- data/ext/rdwarf/libdwarf/dwarf_original_elf_init.c +219 -0
- data/ext/rdwarf/libdwarf/dwarf_print_lines.c +631 -0
- data/ext/rdwarf/libdwarf/dwarf_pubtypes.c +132 -0
- data/ext/rdwarf/libdwarf/dwarf_query.c +1594 -0
- data/ext/rdwarf/libdwarf/dwarf_ranges.c +194 -0
- data/ext/rdwarf/libdwarf/dwarf_reloc_arm.h +308 -0
- data/ext/rdwarf/libdwarf/dwarf_reloc_mips.h +117 -0
- data/ext/rdwarf/libdwarf/dwarf_reloc_ppc.h +242 -0
- data/ext/rdwarf/libdwarf/dwarf_reloc_ppc64.h +272 -0
- data/ext/rdwarf/libdwarf/dwarf_reloc_x86_64.h +127 -0
- data/ext/rdwarf/libdwarf/dwarf_sort_line.c +665 -0
- data/ext/rdwarf/libdwarf/dwarf_string.c +82 -0
- data/ext/rdwarf/libdwarf/dwarf_stubs.c +38 -0
- data/ext/rdwarf/libdwarf/dwarf_tied.c +423 -0
- data/ext/rdwarf/libdwarf/dwarf_tsearch.h +125 -0
- data/ext/rdwarf/libdwarf/dwarf_tsearchhash.c +675 -0
- data/ext/rdwarf/libdwarf/dwarf_types.c +121 -0
- data/ext/rdwarf/libdwarf/dwarf_types.h +32 -0
- data/ext/rdwarf/libdwarf/dwarf_util.c +913 -0
- data/ext/rdwarf/libdwarf/dwarf_util.h +324 -0
- data/ext/rdwarf/libdwarf/dwarf_vars.c +125 -0
- data/ext/rdwarf/libdwarf/dwarf_vars.h +29 -0
- data/ext/rdwarf/libdwarf/dwarf_weaks.c +123 -0
- data/ext/rdwarf/libdwarf/dwarf_weaks.h +29 -0
- data/ext/rdwarf/libdwarf/dwarf_xu_index.c +579 -0
- data/ext/rdwarf/libdwarf/dwarf_xu_index.h +68 -0
- data/ext/rdwarf/libdwarf/dwgetopt.c +181 -0
- data/ext/rdwarf/libdwarf/dwgetopt.h +51 -0
- data/ext/rdwarf/libdwarf/gennames.c +531 -0
- data/ext/rdwarf/libdwarf/install.sh +119 -0
- data/ext/rdwarf/libdwarf/libdwarf.h.in +3746 -0
- data/ext/rdwarf/libdwarf/libdwarf2.1.mm +9805 -0
- data/ext/rdwarf/libdwarf/libdwarf2.1.pdf +0 -0
- data/ext/rdwarf/libdwarf/libdwarf2p.1.mm +2807 -0
- data/ext/rdwarf/libdwarf/libdwarf2p.1.pdf +0 -0
- data/ext/rdwarf/libdwarf/libdwarfdefs.h +81 -0
- data/ext/rdwarf/libdwarf/malloc_check.c +327 -0
- data/ext/rdwarf/libdwarf/malloc_check.h +52 -0
- data/ext/rdwarf/libdwarf/mips_extensions.mm +1266 -0
- data/ext/rdwarf/libdwarf/mips_extensions.pdf +0 -0
- data/ext/rdwarf/libdwarf/pro_alloc.c +179 -0
- data/ext/rdwarf/libdwarf/pro_alloc.h +33 -0
- data/ext/rdwarf/libdwarf/pro_arange.c +310 -0
- data/ext/rdwarf/libdwarf/pro_arange.h +51 -0
- data/ext/rdwarf/libdwarf/pro_die.c +431 -0
- data/ext/rdwarf/libdwarf/pro_die.h +59 -0
- data/ext/rdwarf/libdwarf/pro_encode_nm.c +108 -0
- data/ext/rdwarf/libdwarf/pro_encode_nm.h +39 -0
- data/ext/rdwarf/libdwarf/pro_error.c +96 -0
- data/ext/rdwarf/libdwarf/pro_error.h +43 -0
- data/ext/rdwarf/libdwarf/pro_expr.c +575 -0
- data/ext/rdwarf/libdwarf/pro_expr.h +36 -0
- data/ext/rdwarf/libdwarf/pro_finish.c +45 -0
- data/ext/rdwarf/libdwarf/pro_forms.c +1271 -0
- data/ext/rdwarf/libdwarf/pro_frame.c +572 -0
- data/ext/rdwarf/libdwarf/pro_frame.h +120 -0
- data/ext/rdwarf/libdwarf/pro_funcs.c +50 -0
- data/ext/rdwarf/libdwarf/pro_incl.h +91 -0
- data/ext/rdwarf/libdwarf/pro_init.c +327 -0
- data/ext/rdwarf/libdwarf/pro_line.c +373 -0
- data/ext/rdwarf/libdwarf/pro_line.h +112 -0
- data/ext/rdwarf/libdwarf/pro_macinfo.c +457 -0
- data/ext/rdwarf/libdwarf/pro_macinfo.h +31 -0
- data/ext/rdwarf/libdwarf/pro_opaque.h +513 -0
- data/ext/rdwarf/libdwarf/pro_pubnames.c +60 -0
- data/ext/rdwarf/libdwarf/pro_reloc.c +253 -0
- data/ext/rdwarf/libdwarf/pro_reloc.h +38 -0
- data/ext/rdwarf/libdwarf/pro_reloc_stream.c +256 -0
- data/ext/rdwarf/libdwarf/pro_reloc_stream.h +52 -0
- data/ext/rdwarf/libdwarf/pro_reloc_symbolic.c +245 -0
- data/ext/rdwarf/libdwarf/pro_reloc_symbolic.h +45 -0
- data/ext/rdwarf/libdwarf/pro_section.c +2233 -0
- data/ext/rdwarf/libdwarf/pro_section.h +100 -0
- data/ext/rdwarf/libdwarf/pro_types.c +274 -0
- data/ext/rdwarf/libdwarf/pro_types.h +34 -0
- data/ext/rdwarf/libdwarf/pro_util.h +38 -0
- data/ext/rdwarf/libdwarf/pro_vars.c +52 -0
- data/ext/rdwarf/libdwarf/pro_weaks.c +51 -0
- data/ext/rdwarf/rdwarf.c +765 -0
- data/ext/rdwarf/rdwarf.h +52 -0
- data/ext/rdwarf/rdwarf_names_gen.rb +109 -0
- data/lib/rdwarf.rb +181 -0
- data/lib/rdwarf/version.rb +3 -0
- data/rdwarf.gemspec +30 -0
- metadata +251 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
#
|
4
|
+
# install - install a program, script, or datafile
|
5
|
+
# This comes from X11R5; it is not part of GNU.
|
6
|
+
#
|
7
|
+
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
|
8
|
+
#
|
9
|
+
# This script is compatible with the BSD install script, but was written
|
10
|
+
# from scratch.
|
11
|
+
#
|
12
|
+
|
13
|
+
|
14
|
+
# set DOITPROG to echo to test this script
|
15
|
+
|
16
|
+
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
17
|
+
doit="${DOITPROG-}"
|
18
|
+
|
19
|
+
|
20
|
+
# put in absolute paths if you don't have them in your path; or use env. vars.
|
21
|
+
|
22
|
+
mvprog="${MVPROG-mv}"
|
23
|
+
cpprog="${CPPROG-cp}"
|
24
|
+
chmodprog="${CHMODPROG-chmod}"
|
25
|
+
chownprog="${CHOWNPROG-chown}"
|
26
|
+
chgrpprog="${CHGRPPROG-chgrp}"
|
27
|
+
stripprog="${STRIPPROG-strip}"
|
28
|
+
rmprog="${RMPROG-rm}"
|
29
|
+
|
30
|
+
instcmd="$mvprog"
|
31
|
+
chmodcmd=""
|
32
|
+
chowncmd=""
|
33
|
+
chgrpcmd=""
|
34
|
+
stripcmd=""
|
35
|
+
rmcmd="$rmprog -f"
|
36
|
+
mvcmd="$mvprog"
|
37
|
+
src=""
|
38
|
+
dst=""
|
39
|
+
|
40
|
+
while [ x"$1" != x ]; do
|
41
|
+
case $1 in
|
42
|
+
-c) instcmd="$cpprog"
|
43
|
+
shift
|
44
|
+
continue;;
|
45
|
+
|
46
|
+
-m) chmodcmd="$chmodprog $2"
|
47
|
+
shift
|
48
|
+
shift
|
49
|
+
continue;;
|
50
|
+
|
51
|
+
-o) chowncmd="$chownprog $2"
|
52
|
+
shift
|
53
|
+
shift
|
54
|
+
continue;;
|
55
|
+
|
56
|
+
-g) chgrpcmd="$chgrpprog $2"
|
57
|
+
shift
|
58
|
+
shift
|
59
|
+
continue;;
|
60
|
+
|
61
|
+
-s) stripcmd="$stripprog"
|
62
|
+
shift
|
63
|
+
continue;;
|
64
|
+
|
65
|
+
*) if [ x"$src" = x ]
|
66
|
+
then
|
67
|
+
src=$1
|
68
|
+
else
|
69
|
+
dst=$1
|
70
|
+
fi
|
71
|
+
shift
|
72
|
+
continue;;
|
73
|
+
esac
|
74
|
+
done
|
75
|
+
|
76
|
+
if [ x"$src" = x ]
|
77
|
+
then
|
78
|
+
echo "install: no input file specified"
|
79
|
+
exit 1
|
80
|
+
fi
|
81
|
+
|
82
|
+
if [ x"$dst" = x ]
|
83
|
+
then
|
84
|
+
echo "install: no destination specified"
|
85
|
+
exit 1
|
86
|
+
fi
|
87
|
+
|
88
|
+
|
89
|
+
# If destination is a directory, append the input filename; if your system
|
90
|
+
# does not like double slashes in filenames, you may need to add some logic
|
91
|
+
|
92
|
+
if [ -d $dst ]
|
93
|
+
then
|
94
|
+
dst="$dst"/`basename $src`
|
95
|
+
fi
|
96
|
+
|
97
|
+
# Make a temp file name in the proper directory.
|
98
|
+
|
99
|
+
dstdir=`dirname $dst`
|
100
|
+
dsttmp=$dstdir/#inst.$$#
|
101
|
+
|
102
|
+
# Move or copy the file name to the temp name
|
103
|
+
|
104
|
+
$doit $instcmd $src $dsttmp
|
105
|
+
|
106
|
+
# and set any options; do chmod last to preserve setuid bits
|
107
|
+
|
108
|
+
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
|
109
|
+
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
|
110
|
+
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
|
111
|
+
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
|
112
|
+
|
113
|
+
# Now rename the file to the real destination.
|
114
|
+
|
115
|
+
$doit $rmcmd $dst
|
116
|
+
$doit $mvcmd $dsttmp $dst
|
117
|
+
|
118
|
+
|
119
|
+
exit 0
|
@@ -0,0 +1,3746 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Copyright (C) 2000-2010 Silicon Graphics, Inc. All Rights Reserved.
|
4
|
+
Portions Copyright 2007-2010 Sun Microsystems, Inc. All rights reserved.
|
5
|
+
Portions Copyright 2008-2013 David Anderson. All rights reserved.
|
6
|
+
Portions Copyright 2008-2010 Arxan Technologies, Inc. All rights reserved.
|
7
|
+
Portions Copyright 2010-2012 SN Systems Ltd. All rights reserved.
|
8
|
+
|
9
|
+
This program is free software; you can redistribute it and/or modify it
|
10
|
+
under the terms of version 2.1 of the GNU Lesser General Public License
|
11
|
+
as published by the Free Software Foundation.
|
12
|
+
|
13
|
+
This program is distributed in the hope that it would be useful, but
|
14
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
16
|
+
|
17
|
+
Further, this software is distributed without any warranty that it is
|
18
|
+
free of the rightful claim of any third person regarding infringement
|
19
|
+
or the like. Any license provided herein, whether implied or
|
20
|
+
otherwise, applies only to this software file. Patent licenses, if
|
21
|
+
any, provided herein do not apply to combinations of this program with
|
22
|
+
other software, or any other product whatsoever.
|
23
|
+
|
24
|
+
You should have received a copy of the GNU Lesser General Public
|
25
|
+
License along with this program; if not, write the Free Software
|
26
|
+
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
|
27
|
+
USA.
|
28
|
+
|
29
|
+
*/
|
30
|
+
|
31
|
+
|
32
|
+
#ifndef _LIBDWARF_H
|
33
|
+
#define _LIBDWARF_H
|
34
|
+
#ifdef __cplusplus
|
35
|
+
extern "C" {
|
36
|
+
#endif
|
37
|
+
/*
|
38
|
+
libdwarf.h
|
39
|
+
$Revision: #9 $ $Date: 2008/01/17 $
|
40
|
+
|
41
|
+
For libdwarf producers and consumers
|
42
|
+
|
43
|
+
The interface is defined as having 8-byte signed and unsigned
|
44
|
+
values so it can handle 64-or-32bit target on 64-or-32bit host.
|
45
|
+
Dwarf_Ptr is the native size: it represents pointers on
|
46
|
+
the host machine (not the target!).
|
47
|
+
|
48
|
+
This contains declarations for types and all producer
|
49
|
+
and consumer functions.
|
50
|
+
|
51
|
+
Function declarations are written on a single line each here
|
52
|
+
so one can use grep to each declaration in its entirety.
|
53
|
+
The declarations are a little harder to read this way, but...
|
54
|
+
|
55
|
+
The seeming duplication of the Elf typedef allows
|
56
|
+
both verification we have the right struct name (when
|
57
|
+
libelf.h included before this) and
|
58
|
+
creation of a local handle so we have the struct pointer
|
59
|
+
here (if libelf.h is not included before this file).
|
60
|
+
|
61
|
+
*/
|
62
|
+
|
63
|
+
typedef struct Elf Elf;
|
64
|
+
typedef struct Elf* dwarf_elf_handle;
|
65
|
+
|
66
|
+
/* To enable printing with printf regardless of the
|
67
|
+
actual underlying data type, we define the DW_PR_xxx macros.
|
68
|
+
To ensure uses of DW_PR_DUx or DW_PR_DSx look the way you want
|
69
|
+
ensure the right DW_PR_XZEROS define is uncommented.
|
70
|
+
*/
|
71
|
+
/*#define DW_PR_XZEROS "" */
|
72
|
+
#define DW_PR_XZEROS "08"
|
73
|
+
#if (_MIPS_SZLONG == 64)
|
74
|
+
/* Special case for MIPS, so -64 (LP64) build gets simple -long-.
|
75
|
+
Non-MIPS LP64 or ILP64 environments should probably ensure
|
76
|
+
_MIPS_SZLONG set to 64 everywhere this header is #included.
|
77
|
+
*/
|
78
|
+
typedef int Dwarf_Bool; /* boolean type */
|
79
|
+
typedef unsigned long Dwarf_Off; /* 4 or 8 byte file offset */
|
80
|
+
typedef unsigned long Dwarf_Unsigned; /* 4 or 8 byte unsigned value */
|
81
|
+
typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */
|
82
|
+
typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */
|
83
|
+
typedef signed long Dwarf_Signed; /* 4 or 8 byte signed value */
|
84
|
+
typedef unsigned long Dwarf_Addr; /* target memory address */
|
85
|
+
#define DW_PR_DUx "lx"
|
86
|
+
#define DW_PR_DSx "lx"
|
87
|
+
#define DW_PR_DUu "lu"
|
88
|
+
#define DW_PR_DSd "ld"
|
89
|
+
|
90
|
+
#else /* 32-bit */
|
91
|
+
/* This is for ILP32, allowing i/o of 64bit dwarf info.
|
92
|
+
Also should be fine for LP64 and ILP64 cases.
|
93
|
+
*/
|
94
|
+
typedef int Dwarf_Bool; /* boolean type */
|
95
|
+
typedef unsigned long long Dwarf_Off; /* 8 byte file offset */
|
96
|
+
typedef unsigned long long Dwarf_Unsigned; /* 8 byte unsigned value*/
|
97
|
+
typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */
|
98
|
+
typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */
|
99
|
+
typedef signed long long Dwarf_Signed; /* 8 byte signed value */
|
100
|
+
typedef unsigned long long Dwarf_Addr; /* target memory address */
|
101
|
+
#define DW_PR_DUx "llx"
|
102
|
+
#define DW_PR_DSx "llx"
|
103
|
+
#define DW_PR_DUu "llu"
|
104
|
+
#define DW_PR_DSd "lld"
|
105
|
+
#endif
|
106
|
+
#ifdef HAVE_NONSTANDARD_PRINTF_64_FORMAT
|
107
|
+
/* Windows does not use std C formatting, so allow it. */
|
108
|
+
#undef DW_PR_DUx
|
109
|
+
#undef DW_PR_DSx
|
110
|
+
#undef DW_PR_DUu
|
111
|
+
#undef DW_PR_DSd
|
112
|
+
#define DW_PR_DUx "I64x"
|
113
|
+
#define DW_PR_DSx "I64x"
|
114
|
+
#define DW_PR_DUu "I64u"
|
115
|
+
#define DW_PR_DSd "I64d"
|
116
|
+
#endif /* HAVE_NONSTANDARD_FORMAT */
|
117
|
+
|
118
|
+
typedef void* Dwarf_Ptr; /* host machine pointer */
|
119
|
+
|
120
|
+
/* Used for DW_FORM_ref_sig8 and DW_AT_dwo_id.
|
121
|
+
It is not a string, it
|
122
|
+
is 8 bytes of a signature one would use to find
|
123
|
+
a type unit. See dwarf_formsig8()
|
124
|
+
|
125
|
+
Sometimes it is used in calculations as
|
126
|
+
Dwarf_Unsigned, but that is hidden in libdwarf.
|
127
|
+
*/
|
128
|
+
struct Dwarf_Sig8_s {
|
129
|
+
char signature[8];
|
130
|
+
};
|
131
|
+
typedef struct Dwarf_Sig8_s Dwarf_Sig8;
|
132
|
+
|
133
|
+
/* Contains info on an uninterpreted block of data
|
134
|
+
Used with certain frame information functions.
|
135
|
+
*/
|
136
|
+
typedef struct {
|
137
|
+
Dwarf_Unsigned bl_len; /* length of block bl_data points at */
|
138
|
+
Dwarf_Ptr bl_data; /* uninterpreted data */
|
139
|
+
|
140
|
+
/* 0 if location description,
|
141
|
+
1 if .debug_info loclist,
|
142
|
+
2 if .debug_info.dwo split dwarf loclist. */
|
143
|
+
Dwarf_Small bl_from_loclist;
|
144
|
+
|
145
|
+
/* Section (not CU) offset which 'data' comes from. */
|
146
|
+
Dwarf_Unsigned bl_section_offset;
|
147
|
+
} Dwarf_Block;
|
148
|
+
|
149
|
+
|
150
|
+
/* NEW October 2015. */
|
151
|
+
/* Dwarf_Loc_c_s,Dwarf_Locdesc_c_s, and Dwarf_Loc_Head_c_s
|
152
|
+
are not defined publically. */
|
153
|
+
struct Dwarf_Loc_c_s;
|
154
|
+
typedef struct Dwarf_Loc_c_s * Dwarf_Loc_c;
|
155
|
+
|
156
|
+
/* NEW October 2015. */
|
157
|
+
/* This provides access to Dwarf_Loc_c, a single location operator */
|
158
|
+
struct Dwarf_Locdesc_c_s;
|
159
|
+
typedef struct Dwarf_Locdesc_c_s * Dwarf_Locdesc_c;
|
160
|
+
|
161
|
+
/* NEW October 2015. */
|
162
|
+
/* This provides access to Dwarf_Locdesc_c, a single
|
163
|
+
location list entry (or for a locexpr, the fake
|
164
|
+
Loc_Head for the locexpr) */
|
165
|
+
struct Dwarf_Loc_Head_c_s;
|
166
|
+
typedef struct Dwarf_Loc_Head_c_s * Dwarf_Loc_Head_c;
|
167
|
+
|
168
|
+
|
169
|
+
/* Location record. Records up to 2 operand values.
|
170
|
+
Not usable with DWARF5 or DWARF4 with location
|
171
|
+
operator extensions. */
|
172
|
+
typedef struct {
|
173
|
+
Dwarf_Small lr_atom; /* location operation */
|
174
|
+
Dwarf_Unsigned lr_number; /* operand */
|
175
|
+
Dwarf_Unsigned lr_number2; /* for OP_BREGx and DW_OP_GNU_const_type*/
|
176
|
+
Dwarf_Unsigned lr_offset; /* offset in locexpr for OP_BRA etc */
|
177
|
+
} Dwarf_Loc;
|
178
|
+
|
179
|
+
|
180
|
+
/* Location description. DWARF 2,3,4.
|
181
|
+
When this is from a split-dwarf loclist (.debug_loc.dwo)
|
182
|
+
and no tied object is present
|
183
|
+
then ld_lowpc and ld_highpc are actually indices in
|
184
|
+
the .debug_addr section of the tied object).
|
185
|
+
If there is a tied object then these fields are actuall
|
186
|
+
addresses and DW_AT_addr_base in the skeleton CU DIE applies to
|
187
|
+
that .debug_addr.
|
188
|
+
|
189
|
+
Location record. Records up to 2 operand values.
|
190
|
+
Not usable with DWARF5 or DWARF4 with extensions.
|
191
|
+
|
192
|
+
If from DWARF2,3,4 non-split dwarf then things operate as
|
193
|
+
in DWARF2.
|
194
|
+
See dwarf_get_loclist_b() and the other related
|
195
|
+
new functions that
|
196
|
+
avoid using public structures Dwarf_Loc and Dwarf_Locdesc.
|
197
|
+
*/
|
198
|
+
typedef struct {
|
199
|
+
/* Beginning of active range. This is actually an offset
|
200
|
+
of an applicable base address, not a pc value. */
|
201
|
+
Dwarf_Addr ld_lopc;
|
202
|
+
|
203
|
+
/* End of active range. This is actually an offset
|
204
|
+
of an applicable base address, not a pc value. */
|
205
|
+
Dwarf_Addr ld_hipc;
|
206
|
+
|
207
|
+
Dwarf_Half ld_cents; /* count of location records */
|
208
|
+
Dwarf_Loc* ld_s; /* pointer to list of same */
|
209
|
+
|
210
|
+
/* non-0 if loclist, 1 if non-split (dwarf 2,3,4) */
|
211
|
+
Dwarf_Small ld_from_loclist;
|
212
|
+
|
213
|
+
Dwarf_Unsigned ld_section_offset; /* Section (not CU) offset
|
214
|
+
where loc-expr begins*/
|
215
|
+
} Dwarf_Locdesc;
|
216
|
+
|
217
|
+
/* First appears in DWARF3.
|
218
|
+
The dwr_addr1/addr2 data is either an offset (DW_RANGES_ENTRY)
|
219
|
+
or an address (dwr_addr2 in DW_RANGES_ADDRESS_SELECTION) or
|
220
|
+
both are zero (DW_RANGES_END).
|
221
|
+
*/
|
222
|
+
enum Dwarf_Ranges_Entry_Type { DW_RANGES_ENTRY,
|
223
|
+
DW_RANGES_ADDRESS_SELECTION,
|
224
|
+
DW_RANGES_END
|
225
|
+
};
|
226
|
+
typedef struct {
|
227
|
+
Dwarf_Addr dwr_addr1;
|
228
|
+
Dwarf_Addr dwr_addr2;
|
229
|
+
enum Dwarf_Ranges_Entry_Type dwr_type;
|
230
|
+
} Dwarf_Ranges;
|
231
|
+
|
232
|
+
/* Frame description instructions expanded.
|
233
|
+
*/
|
234
|
+
typedef struct {
|
235
|
+
Dwarf_Small fp_base_op;
|
236
|
+
Dwarf_Small fp_extended_op;
|
237
|
+
Dwarf_Half fp_register;
|
238
|
+
|
239
|
+
/* Value may be signed, depends on op.
|
240
|
+
Any applicable data_alignment_factor has
|
241
|
+
not been applied, this is the raw offset. */
|
242
|
+
Dwarf_Unsigned fp_offset;
|
243
|
+
Dwarf_Off fp_instr_offset;
|
244
|
+
} Dwarf_Frame_Op; /* DWARF2 */
|
245
|
+
|
246
|
+
typedef struct {
|
247
|
+
Dwarf_Small fp_base_op;
|
248
|
+
Dwarf_Small fp_extended_op;
|
249
|
+
Dwarf_Half fp_register;
|
250
|
+
|
251
|
+
/* Value may be signed, depends on op.
|
252
|
+
Any applicable data_alignment_factor has
|
253
|
+
not been applied, this is the raw offset. */
|
254
|
+
Dwarf_Unsigned fp_offset_or_block_len;
|
255
|
+
Dwarf_Small *fp_expr_block;
|
256
|
+
|
257
|
+
Dwarf_Off fp_instr_offset;
|
258
|
+
} Dwarf_Frame_Op3; /* DWARF3 and DWARF2 compatible */
|
259
|
+
|
260
|
+
/* ***IMPORTANT NOTE, TARGET DEPENDENCY ****
|
261
|
+
DW_REG_TABLE_SIZE must be at least as large as
|
262
|
+
the number of registers
|
263
|
+
(DW_FRAME_LAST_REG_NUM) as defined in dwarf.h
|
264
|
+
Preferably identical to DW_FRAME_LAST_REG_NUM.
|
265
|
+
Ensure [0-DW_REG_TABLE_SIZE] does not overlap
|
266
|
+
DW_FRAME_UNDEFINED_VAL or DW_FRAME_SAME_VAL.
|
267
|
+
Also ensure DW_FRAME_REG_INITIAL_VALUE is set to what
|
268
|
+
is appropriate to your cpu.
|
269
|
+
For various CPUs DW_FRAME_UNDEFINED_VAL is correct
|
270
|
+
as the value for DW_FRAME_REG_INITIAL_VALUE.
|
271
|
+
|
272
|
+
For consumer apps, this can be set dynamically: see
|
273
|
+
dwarf_set_frame_rule_table_size(); */
|
274
|
+
#ifndef DW_REG_TABLE_SIZE
|
275
|
+
#define DW_REG_TABLE_SIZE 66
|
276
|
+
#endif
|
277
|
+
|
278
|
+
/* For MIPS, DW_FRAME_SAME_VAL is the correct default value
|
279
|
+
for a frame register value. For other CPUS another value
|
280
|
+
may be better, such as DW_FRAME_UNDEFINED_VAL.
|
281
|
+
See dwarf_set_frame_rule_table_size
|
282
|
+
*/
|
283
|
+
#ifndef DW_FRAME_REG_INITIAL_VALUE
|
284
|
+
#define DW_FRAME_REG_INITIAL_VALUE DW_FRAME_SAME_VAL
|
285
|
+
#endif
|
286
|
+
|
287
|
+
/* Taken as meaning 'undefined value', this is not
|
288
|
+
a column or register number.
|
289
|
+
Only present at libdwarf runtime in the consumer
|
290
|
+
interfaces. Never on disk.
|
291
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
292
|
+
Ensure this is > DW_REG_TABLE_SIZE (the reg table
|
293
|
+
size is changeable at runtime with the *reg3() interfaces,
|
294
|
+
and this value must be greater than the reg table size).
|
295
|
+
*/
|
296
|
+
#define DW_FRAME_UNDEFINED_VAL 1034
|
297
|
+
|
298
|
+
/* Taken as meaning 'same value' as caller had, not a column
|
299
|
+
or register number.
|
300
|
+
Only present at libdwarf runtime in the consumer
|
301
|
+
interfaces. Never on disk.
|
302
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
303
|
+
Ensure this is > DW_REG_TABLE_SIZE (the reg table
|
304
|
+
size is changeable at runtime with the *reg3() interfaces,
|
305
|
+
and this value must be greater than the reg table size).
|
306
|
+
*/
|
307
|
+
#define DW_FRAME_SAME_VAL 1035
|
308
|
+
|
309
|
+
/* For DWARF3 consumer interfaces, make the CFA a column with no
|
310
|
+
real table number. This is what should have been done
|
311
|
+
for the DWARF2 interfaces. This actually works for
|
312
|
+
both DWARF2 and DWARF3, but see the libdwarf documentation
|
313
|
+
on Dwarf_Regtable3 and dwarf_get_fde_info_for_reg3()
|
314
|
+
and dwarf_get_fde_info_for_all_regs3()
|
315
|
+
Do NOT use this with the older dwarf_get_fde_info_for_reg()
|
316
|
+
or dwarf_get_fde_info_for_all_regs() consumer interfaces.
|
317
|
+
Must be higher than any register count for *any* ABI
|
318
|
+
(ensures maximum applicability with minimum effort).
|
319
|
+
Ensure this is > DW_REG_TABLE_SIZE (the reg table
|
320
|
+
size is changeable at runtime with the *reg3() interfaces,
|
321
|
+
and this value must be greater than the reg table size).
|
322
|
+
Only present at libdwarf runtime in the consumer
|
323
|
+
interfaces. Never on disk.
|
324
|
+
*/
|
325
|
+
#define DW_FRAME_CFA_COL3 1436
|
326
|
+
|
327
|
+
/* The following are all needed to evaluate DWARF3 register rules.
|
328
|
+
*/
|
329
|
+
#define DW_EXPR_OFFSET 0 /* DWARF2 only sees this. */
|
330
|
+
#define DW_EXPR_VAL_OFFSET 1
|
331
|
+
#define DW_EXPR_EXPRESSION 2
|
332
|
+
#define DW_EXPR_VAL_EXPRESSION 3
|
333
|
+
|
334
|
+
typedef struct Dwarf_Regtable_Entry_s {
|
335
|
+
/* For each index i (naming a hardware register with dwarf number
|
336
|
+
i) the following is true and defines the value of that register:
|
337
|
+
|
338
|
+
If dw_regnum is Register DW_FRAME_UNDEFINED_VAL
|
339
|
+
it is not DWARF register number but
|
340
|
+
a place holder indicating the register has no defined value.
|
341
|
+
If dw_regnum is Register DW_FRAME_SAME_VAL
|
342
|
+
it is not DWARF register number but
|
343
|
+
a place holder indicating the register has the same
|
344
|
+
value in the previous frame.
|
345
|
+
|
346
|
+
DW_FRAME_UNDEFINED_VAL, DW_FRAME_SAME_VAL are
|
347
|
+
only present at libdwarf runtime. Never on disk.
|
348
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
349
|
+
|
350
|
+
Otherwise: the register number is a DWARF register number
|
351
|
+
(see ABI documents for how this translates to hardware/
|
352
|
+
software register numbers in the machine hardware)
|
353
|
+
and the following applies:
|
354
|
+
|
355
|
+
if dw_value_type == DW_EXPR_OFFSET (the only case for dwarf2):
|
356
|
+
If dw_offset_relevant is non-zero, then
|
357
|
+
the value is stored at at the address CFA+N where
|
358
|
+
N is a signed offset.
|
359
|
+
Rule: Offset(N)
|
360
|
+
If dw_offset_relevant is zero, then the value of the register
|
361
|
+
is the value of (DWARF) register number dw_regnum.
|
362
|
+
Rule: register(F)
|
363
|
+
Other values of dw_value_type are an error.
|
364
|
+
*/
|
365
|
+
Dwarf_Small dw_offset_relevant;
|
366
|
+
|
367
|
+
/* For DWARF2, always 0 */
|
368
|
+
Dwarf_Small dw_value_type;
|
369
|
+
|
370
|
+
Dwarf_Half dw_regnum;
|
371
|
+
|
372
|
+
/* The data type here should the larger of Dwarf_Addr
|
373
|
+
and Dwarf_Unsigned and Dwarf_Signed. */
|
374
|
+
Dwarf_Addr dw_offset;
|
375
|
+
} Dwarf_Regtable_Entry;
|
376
|
+
|
377
|
+
typedef struct Dwarf_Regtable_s {
|
378
|
+
struct Dwarf_Regtable_Entry_s rules[DW_REG_TABLE_SIZE];
|
379
|
+
} Dwarf_Regtable;
|
380
|
+
|
381
|
+
/* opaque type. Functional interface shown later. */
|
382
|
+
struct Dwarf_Reg_value3_s;
|
383
|
+
typedef struct Dwarf_Reg_value3_s Dwarf_Reg_Value3;
|
384
|
+
|
385
|
+
typedef struct Dwarf_Regtable_Entry3_s {
|
386
|
+
/* For each index i (naming a hardware register with dwarf number
|
387
|
+
i) the following is true and defines the value of that register:
|
388
|
+
|
389
|
+
If dw_regnum is Register DW_FRAME_UNDEFINED_VAL
|
390
|
+
it is not DWARF register number but
|
391
|
+
a place holder indicating the register has no defined value.
|
392
|
+
If dw_regnum is Register DW_FRAME_SAME_VAL
|
393
|
+
it is not DWARF register number but
|
394
|
+
a place holder indicating the register has the same
|
395
|
+
value in the previous frame.
|
396
|
+
|
397
|
+
DW_FRAME_UNDEFINED_VAL, DW_FRAME_SAME_VAL and
|
398
|
+
DW_FRAME_CFA_COL3 are only present at libdwarf runtime.
|
399
|
+
Never on disk.
|
400
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
401
|
+
Because DW_FRAME_SAME_VAL and DW_FRAME_UNDEFINED_VAL
|
402
|
+
and DW_FRAME_CFA_COL3 are definable at runtime
|
403
|
+
consider the names symbolic in this comment, not absolute.
|
404
|
+
|
405
|
+
Otherwise: the register number is a DWARF register number
|
406
|
+
(see ABI documents for how this translates to hardware/
|
407
|
+
software register numbers in the machine hardware)
|
408
|
+
and the following applies:
|
409
|
+
|
410
|
+
In a cfa-defining entry (rt3_cfa_rule) the regnum is the
|
411
|
+
CFA 'register number'. Which is some 'normal' register,
|
412
|
+
not DW_FRAME_CFA_COL3, nor DW_FRAME_SAME_VAL, nor
|
413
|
+
DW_FRAME_UNDEFINED_VAL.
|
414
|
+
|
415
|
+
If dw_value_type == DW_EXPR_OFFSET (the only possible case for
|
416
|
+
dwarf2):
|
417
|
+
If dw_offset_relevant is non-zero, then
|
418
|
+
the value is stored at at the address
|
419
|
+
CFA+N where N is a signed offset.
|
420
|
+
dw_regnum is the cfa register rule which means
|
421
|
+
one ignores dw_regnum and uses the CFA appropriately.
|
422
|
+
So dw_offset_or_block_len is a signed value, really,
|
423
|
+
and must be printed/evaluated as such.
|
424
|
+
Rule: Offset(N)
|
425
|
+
If dw_offset_relevant is zero, then the value of the register
|
426
|
+
is the value of (DWARF) register number dw_regnum.
|
427
|
+
Rule: register(R)
|
428
|
+
If dw_value_type == DW_EXPR_VAL_OFFSET
|
429
|
+
the value of this register is CFA +N where N is a signed offset.
|
430
|
+
dw_regnum is the cfa register rule which means
|
431
|
+
one ignores dw_regnum and uses the CFA appropriately.
|
432
|
+
Rule: val_offset(N)
|
433
|
+
If dw_value_type == DW_EXPR_EXPRESSION
|
434
|
+
The value of the register is the value at the address
|
435
|
+
computed by evaluating the DWARF expression E.
|
436
|
+
Rule: expression(E)
|
437
|
+
The expression E byte stream is pointed to by dw_block_ptr.
|
438
|
+
The expression length in bytes is given by
|
439
|
+
dw_offset_or_block_len.
|
440
|
+
If dw_value_type == DW_EXPR_VAL_EXPRESSION
|
441
|
+
The value of the register is the value
|
442
|
+
computed by evaluating the DWARF expression E.
|
443
|
+
Rule: val_expression(E)
|
444
|
+
The expression E byte stream is pointed to by dw_block_ptr.
|
445
|
+
The expression length in bytes is given by
|
446
|
+
dw_offset_or_block_len.
|
447
|
+
Other values of dw_value_type are an error.
|
448
|
+
*/
|
449
|
+
Dwarf_Small dw_offset_relevant;
|
450
|
+
Dwarf_Small dw_value_type;
|
451
|
+
Dwarf_Half dw_regnum;
|
452
|
+
Dwarf_Unsigned dw_offset_or_block_len;
|
453
|
+
Dwarf_Ptr dw_block_ptr;
|
454
|
+
|
455
|
+
}Dwarf_Regtable_Entry3;
|
456
|
+
|
457
|
+
/* For the DWARF3 version, moved the DW_FRAME_CFA_COL
|
458
|
+
out of the array and into its own struct.
|
459
|
+
Having it part of the array is not very easy to work
|
460
|
+
with from a portability point of view: changing
|
461
|
+
the number for every architecture is a pain (if one fails
|
462
|
+
to set it correctly a register rule gets clobbered when
|
463
|
+
setting CFA). With MIPS it just happened to be easy to use
|
464
|
+
DW_FRAME_CFA_COL (it was wrong conceptually but it was easy...).
|
465
|
+
|
466
|
+
rt3_rules and rt3_reg_table_size must be filled in before
|
467
|
+
calling libdwarf. Filled in with a pointer to an array
|
468
|
+
(pointer and array set up by the calling application)
|
469
|
+
of rt3_reg_table_size Dwarf_Regtable_Entry3_s structs.
|
470
|
+
libdwarf does not allocate or deallocate space for the
|
471
|
+
rules, you must do so. libdwarf will initialize the
|
472
|
+
contents rules array, you do not need to do so (though
|
473
|
+
if you choose to initialize the array somehow that is ok:
|
474
|
+
libdwarf will overwrite your initializations with its own).
|
475
|
+
|
476
|
+
*/
|
477
|
+
typedef struct Dwarf_Regtable3_s {
|
478
|
+
struct Dwarf_Regtable_Entry3_s rt3_cfa_rule;
|
479
|
+
|
480
|
+
Dwarf_Half rt3_reg_table_size;
|
481
|
+
struct Dwarf_Regtable_Entry3_s * rt3_rules;
|
482
|
+
} Dwarf_Regtable3;
|
483
|
+
|
484
|
+
|
485
|
+
/* Use for DW_EPXR_STANDARD., DW_EXPR_VAL_OFFSET.
|
486
|
+
Returns DW_DLV_OK if the value is available.
|
487
|
+
If DW_DLV_OK returns the regnum and offset thru the pointers
|
488
|
+
(which the consumer must use appropriately).
|
489
|
+
*/
|
490
|
+
int dwarf_frame_get_reg_register(struct Dwarf_Regtable_Entry3_s *reg_in,
|
491
|
+
Dwarf_Small *offset_relevant,
|
492
|
+
Dwarf_Half *regnum_out,
|
493
|
+
Dwarf_Signed *offset_out);
|
494
|
+
|
495
|
+
/* Use for DW_EXPR_EXPRESSION, DW_EXPR_VAL_EXPRESSION.
|
496
|
+
Returns DW_DLV_OK if the value is available.
|
497
|
+
The caller must pass in the address of a valid
|
498
|
+
Dwarf_Block (the caller need not initialize it).
|
499
|
+
*/
|
500
|
+
int dwarf_frame_get_reg_expression(struct Dwarf_Regtable_Entry3_s *reg_in,
|
501
|
+
Dwarf_Block *block_out);
|
502
|
+
|
503
|
+
|
504
|
+
/* For DW_DLC_SYMBOLIC_RELOCATIONS output to caller
|
505
|
+
v2, adding drd_length: some relocations are 4 and
|
506
|
+
some 8 bytes (pointers are 8, section offsets 4) in
|
507
|
+
some dwarf environments. (MIPS relocations are all one
|
508
|
+
size in any given ABI.) Changing drd_type to an unsigned char
|
509
|
+
to keep struct size down.
|
510
|
+
*/
|
511
|
+
enum Dwarf_Rel_Type {
|
512
|
+
dwarf_drt_none, /* Should not get to caller */
|
513
|
+
dwarf_drt_data_reloc, /* Simple normal relocation. */
|
514
|
+
dwarf_drt_segment_rel, /* Special reloc, exceptions. */
|
515
|
+
/* dwarf_drt_first_of_length_pair and drt_second
|
516
|
+
are for for the .word end - begin case. */
|
517
|
+
dwarf_drt_first_of_length_pair,
|
518
|
+
dwarf_drt_second_of_length_pair
|
519
|
+
};
|
520
|
+
|
521
|
+
typedef struct Dwarf_P_Marker_s * Dwarf_P_Marker;
|
522
|
+
struct Dwarf_P_Marker_s {
|
523
|
+
Dwarf_Unsigned ma_marker;
|
524
|
+
Dwarf_Unsigned ma_offset;
|
525
|
+
};
|
526
|
+
|
527
|
+
typedef struct Dwarf_Relocation_Data_s * Dwarf_Relocation_Data;
|
528
|
+
struct Dwarf_Relocation_Data_s {
|
529
|
+
unsigned char drd_type; /* Cast to/from Dwarf_Rel_Type
|
530
|
+
to keep size small in struct. */
|
531
|
+
unsigned char drd_length; /* Length in bytes of data being
|
532
|
+
relocated. 4 for 32bit data,
|
533
|
+
8 for 64bit data. */
|
534
|
+
Dwarf_Unsigned drd_offset; /* Where the data to reloc is. */
|
535
|
+
Dwarf_Unsigned drd_symbol_index;
|
536
|
+
};
|
537
|
+
|
538
|
+
typedef struct Dwarf_P_String_Attr_s * Dwarf_P_String_Attr;
|
539
|
+
struct Dwarf_P_String_Attr_s {
|
540
|
+
Dwarf_Unsigned sa_offset; /* Offset of string attribute data */
|
541
|
+
Dwarf_Unsigned sa_nbytes;
|
542
|
+
};
|
543
|
+
|
544
|
+
|
545
|
+
/* Opaque types for Consumer Library. */
|
546
|
+
typedef struct Dwarf_Debug_s* Dwarf_Debug;
|
547
|
+
typedef struct Dwarf_Die_s* Dwarf_Die;
|
548
|
+
typedef struct Dwarf_Line_s* Dwarf_Line;
|
549
|
+
typedef struct Dwarf_Global_s* Dwarf_Global;
|
550
|
+
typedef struct Dwarf_Func_s* Dwarf_Func;
|
551
|
+
typedef struct Dwarf_Type_s* Dwarf_Type;
|
552
|
+
typedef struct Dwarf_Var_s* Dwarf_Var;
|
553
|
+
typedef struct Dwarf_Weak_s* Dwarf_Weak;
|
554
|
+
typedef struct Dwarf_Error_s* Dwarf_Error;
|
555
|
+
typedef struct Dwarf_Attribute_s* Dwarf_Attribute;
|
556
|
+
typedef struct Dwarf_Abbrev_s* Dwarf_Abbrev;
|
557
|
+
typedef struct Dwarf_Fde_s* Dwarf_Fde;
|
558
|
+
typedef struct Dwarf_Cie_s* Dwarf_Cie;
|
559
|
+
typedef struct Dwarf_Arange_s* Dwarf_Arange;
|
560
|
+
typedef struct Dwarf_Gdbindex_s* Dwarf_Gdbindex;
|
561
|
+
struct Dwarf_Xu_Index_Header_s;
|
562
|
+
typedef struct Dwarf_Xu_Index_Header_s* Dwarf_Xu_Index_Header;
|
563
|
+
struct Dwarf_Line_Context_s;
|
564
|
+
typedef struct Dwarf_Line_Context_s *Dwarf_Line_Context;
|
565
|
+
|
566
|
+
|
567
|
+
/* Opaque types for Producer Library. */
|
568
|
+
typedef struct Dwarf_P_Debug_s* Dwarf_P_Debug;
|
569
|
+
typedef struct Dwarf_P_Die_s* Dwarf_P_Die;
|
570
|
+
typedef struct Dwarf_P_Attribute_s* Dwarf_P_Attribute;
|
571
|
+
typedef struct Dwarf_P_Fde_s* Dwarf_P_Fde;
|
572
|
+
typedef struct Dwarf_P_Expr_s* Dwarf_P_Expr;
|
573
|
+
typedef Dwarf_Unsigned Dwarf_Tag;
|
574
|
+
|
575
|
+
|
576
|
+
/* error handler function
|
577
|
+
*/
|
578
|
+
typedef void (*Dwarf_Handler)(Dwarf_Error /*error*/, Dwarf_Ptr /*errarg*/);
|
579
|
+
|
580
|
+
|
581
|
+
/* Begin libdwarf Object File Interface declarations.
|
582
|
+
|
583
|
+
As of February 2008 there are multiple dwarf_reader object access
|
584
|
+
initialization methods available:
|
585
|
+
The traditional dwarf_elf_init() and dwarf_init() and dwarf_finish()
|
586
|
+
which assume libelf and POSIX file access.
|
587
|
+
An object-file and library agnostic dwarf_object_init() and dwarf_object_finish()
|
588
|
+
which allow the coder to provide object access routines
|
589
|
+
abstracting away the elf interface. So there is no dependence in the
|
590
|
+
reader code on the object format and no dependence on libelf.
|
591
|
+
See the code in dwarf_elf_access.c and dwarf_original_elf_init.c
|
592
|
+
to see an example of initializing the structures mentioned below.
|
593
|
+
|
594
|
+
Projects using dwarf_elf_init() or dwarf_init() can ignore
|
595
|
+
the Dwarf_Obj_Access* structures entirely as all these details
|
596
|
+
are completed for you.
|
597
|
+
|
598
|
+
*/
|
599
|
+
|
600
|
+
typedef struct Dwarf_Obj_Access_Interface_s Dwarf_Obj_Access_Interface;
|
601
|
+
typedef struct Dwarf_Obj_Access_Methods_s Dwarf_Obj_Access_Methods;
|
602
|
+
typedef struct Dwarf_Obj_Access_Section_s Dwarf_Obj_Access_Section;
|
603
|
+
|
604
|
+
|
605
|
+
/* Used in the get_section interface function
|
606
|
+
in Dwarf_Obj_Access_Section_s. Since libdwarf
|
607
|
+
depends on standard DWARF section names an object
|
608
|
+
format that has no such names (but has some
|
609
|
+
method of setting up 'sections equivalents')
|
610
|
+
must arrange to return standard DWARF section
|
611
|
+
names in the 'name' field. libdwarf does
|
612
|
+
not free the strings in 'name'. */
|
613
|
+
struct Dwarf_Obj_Access_Section_s {
|
614
|
+
/* addr is the virtual address of the first byte of
|
615
|
+
the section data. Usually zero when the address
|
616
|
+
makes no sense for a given section. */
|
617
|
+
Dwarf_Addr addr;
|
618
|
+
|
619
|
+
/* Section type. */
|
620
|
+
Dwarf_Unsigned type;
|
621
|
+
|
622
|
+
/* Size in bytes of the section. */
|
623
|
+
Dwarf_Unsigned size;
|
624
|
+
|
625
|
+
/* Having an accurate section name makes debugging of libdwarf easier.
|
626
|
+
and is essential to find the .debug_ sections. */
|
627
|
+
const char* name;
|
628
|
+
/* Set link to zero if it is meaningless. If non-zero
|
629
|
+
it should be a link to a rela section or from symtab
|
630
|
+
to strtab. In Elf it is sh_link. */
|
631
|
+
Dwarf_Unsigned link;
|
632
|
+
|
633
|
+
/* The section header index of the section to which the
|
634
|
+
relocation applies. In Elf it is sh_info. */
|
635
|
+
Dwarf_Unsigned info;
|
636
|
+
|
637
|
+
/* Elf sections that are tables have a non-zero entrysize so
|
638
|
+
the count of entries can be calculated even without
|
639
|
+
the right structure definition. If your object format
|
640
|
+
does not have this data leave this zero. */
|
641
|
+
Dwarf_Unsigned entrysize;
|
642
|
+
};
|
643
|
+
|
644
|
+
/* Returned by the get_endianness function in
|
645
|
+
Dwarf_Obj_Access_Methods_s. */
|
646
|
+
typedef enum {
|
647
|
+
DW_OBJECT_MSB,
|
648
|
+
DW_OBJECT_LSB
|
649
|
+
} Dwarf_Endianness;
|
650
|
+
|
651
|
+
/* The functions we need to access object data from libdwarf are declared here.
|
652
|
+
|
653
|
+
In these function pointer declarations
|
654
|
+
'void *obj' is intended to be a pointer (the object field in
|
655
|
+
Dwarf_Obj_Access_Interface_s)
|
656
|
+
that hides the library-specific and object-specific data that makes
|
657
|
+
it possible to handle multiple object formats and multiple libraries.
|
658
|
+
It's not required that one handles multiple such in a single libdwarf
|
659
|
+
archive/shared-library (but not ruled out either).
|
660
|
+
See dwarf_elf_object_access_internals_t and dwarf_elf_access.c
|
661
|
+
for an example.
|
662
|
+
|
663
|
+
*/
|
664
|
+
struct Dwarf_Obj_Access_Methods_s {
|
665
|
+
/*
|
666
|
+
get_section_info
|
667
|
+
|
668
|
+
Get address, size, and name info about a section.
|
669
|
+
|
670
|
+
Parameters
|
671
|
+
section_index - Zero-based index.
|
672
|
+
return_section - Pointer to a structure in which section info
|
673
|
+
will be placed. Caller must provide a valid pointer to a
|
674
|
+
structure area. The structure's contents will be overwritten
|
675
|
+
by the call to get_section_info.
|
676
|
+
error - A pointer to an integer in which an error code may be stored.
|
677
|
+
|
678
|
+
Return
|
679
|
+
DW_DLV_OK - Everything ok.
|
680
|
+
DW_DLV_ERROR - Error occurred. Use 'error' to determine the
|
681
|
+
libdwarf defined error.
|
682
|
+
DW_DLV_NO_ENTRY - No such section. */
|
683
|
+
int (*get_section_info)(void* obj, Dwarf_Half section_index,
|
684
|
+
Dwarf_Obj_Access_Section* return_section, int* error);
|
685
|
+
/*
|
686
|
+
get_byte_order
|
687
|
+
|
688
|
+
Get whether the object file represented by this interface is big-endian
|
689
|
+
(DW_OBJECT_MSB) or little endian (DW_OBJECT_LSB).
|
690
|
+
|
691
|
+
Parameters
|
692
|
+
obj - Equivalent to 'this' in OO languages.
|
693
|
+
|
694
|
+
Return
|
695
|
+
Endianness of object. Cannot fail. */
|
696
|
+
Dwarf_Endianness (*get_byte_order)(void* obj);
|
697
|
+
/*
|
698
|
+
get_length_size
|
699
|
+
|
700
|
+
Get the size of a length field in the underlying object file.
|
701
|
+
libdwarf currently supports * 4 and 8 byte sizes, but may
|
702
|
+
support larger in the future.
|
703
|
+
Perhaps the return type should be an enumeration?
|
704
|
+
|
705
|
+
Parameters
|
706
|
+
obj - Equivalent to 'this' in OO languages.
|
707
|
+
|
708
|
+
Return
|
709
|
+
Size of length. Cannot fail. */
|
710
|
+
Dwarf_Small (*get_length_size)(void* obj);
|
711
|
+
/*
|
712
|
+
get_pointer_size
|
713
|
+
|
714
|
+
Get the size of a pointer field in the underlying object file.
|
715
|
+
libdwarf currently supports 4 and 8 byte sizes.
|
716
|
+
Perhaps the return type should be an enumeration?
|
717
|
+
|
718
|
+
Return
|
719
|
+
Size of pointer. Cannot fail. */
|
720
|
+
Dwarf_Small (*get_pointer_size)(void* obj);
|
721
|
+
/*
|
722
|
+
get_section_count
|
723
|
+
|
724
|
+
Get the number of sections in the object file.
|
725
|
+
|
726
|
+
Parameters
|
727
|
+
|
728
|
+
Return
|
729
|
+
Number of sections */
|
730
|
+
Dwarf_Unsigned (*get_section_count)(void* obj);
|
731
|
+
/*
|
732
|
+
load_section
|
733
|
+
|
734
|
+
Get a pointer to an array of bytes that represent the section.
|
735
|
+
|
736
|
+
Parameters
|
737
|
+
section_index - Zero-based index.
|
738
|
+
return_data - The address of a pointer to which the section data block
|
739
|
+
will be assigned.
|
740
|
+
error - Pointer to an integer for returning libdwarf-defined
|
741
|
+
error numbers.
|
742
|
+
|
743
|
+
Return
|
744
|
+
DW_DLV_OK - No error.
|
745
|
+
DW_DLV_ERROR - Error. Use 'error' to indicate a libdwarf-defined
|
746
|
+
error number.
|
747
|
+
DW_DLV_NO_ENTRY - No such section. */
|
748
|
+
int (*load_section)(void* obj, Dwarf_Half section_index,
|
749
|
+
Dwarf_Small** return_data, int* error);
|
750
|
+
|
751
|
+
/**
|
752
|
+
relocate_a_section
|
753
|
+
If relocations are not supported leave this pointer NULL.
|
754
|
+
|
755
|
+
Get a pointer to an array of bytes that represent the section.
|
756
|
+
|
757
|
+
Parameters
|
758
|
+
section_index - Zero-based index of the section to be relocated.
|
759
|
+
error - Pointer to an integer for returning libdwarf-defined
|
760
|
+
error numbers.
|
761
|
+
|
762
|
+
Return
|
763
|
+
DW_DLV_OK - No error.
|
764
|
+
DW_DLV_ERROR - Error. Use 'error' to indicate a libdwarf-defined
|
765
|
+
error number.
|
766
|
+
DW_DLV_NO_ENTRY - No such section. */
|
767
|
+
int (*relocate_a_section)(void* obj, Dwarf_Half section_index,
|
768
|
+
Dwarf_Debug dbg,
|
769
|
+
int* error);
|
770
|
+
|
771
|
+
};
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
/* These structures are allocated and deallocated by your code
|
776
|
+
when you are using the libdwarf Object File Interface
|
777
|
+
[dwarf_object_init() and dwarf_object_finish()] directly.
|
778
|
+
dwarf_object_finish() does not free
|
779
|
+
struct Dwarf_Obj_Access_Interface_s or its content.
|
780
|
+
(libdwarf does record a pointer to this struct: you must
|
781
|
+
ensure that pointer remains valid for as long as
|
782
|
+
a libdwarf instance is open (meaning
|
783
|
+
after dwarf_init() and before dwarf_finish()).
|
784
|
+
|
785
|
+
If you are reading Elf objects and libelf use dwarf_init()
|
786
|
+
or dwarf_elf_init() which take care of these details.
|
787
|
+
*/
|
788
|
+
struct Dwarf_Obj_Access_Interface_s {
|
789
|
+
/* object is a void* as it hides the data the object access routines
|
790
|
+
need (which varies by library in use and object format).
|
791
|
+
*/
|
792
|
+
void* object;
|
793
|
+
const Dwarf_Obj_Access_Methods * methods;
|
794
|
+
};
|
795
|
+
|
796
|
+
/* End libdwarf Object File Interface */
|
797
|
+
|
798
|
+
/*
|
799
|
+
Dwarf_dealloc() alloc_type arguments.
|
800
|
+
Argument points to:
|
801
|
+
*/
|
802
|
+
#define DW_DLA_STRING 0x01 /* char* */
|
803
|
+
#define DW_DLA_LOC 0x02 /* Dwarf_Loc */
|
804
|
+
#define DW_DLA_LOCDESC 0x03 /* Dwarf_Locdesc */
|
805
|
+
#define DW_DLA_ELLIST 0x04 /* Dwarf_Ellist (not used)*/
|
806
|
+
#define DW_DLA_BOUNDS 0x05 /* Dwarf_Bounds (not used) */
|
807
|
+
#define DW_DLA_BLOCK 0x06 /* Dwarf_Block */
|
808
|
+
#define DW_DLA_DEBUG 0x07 /* Dwarf_Debug */
|
809
|
+
#define DW_DLA_DIE 0x08 /* Dwarf_Die */
|
810
|
+
#define DW_DLA_LINE 0x09 /* Dwarf_Line */
|
811
|
+
#define DW_DLA_ATTR 0x0a /* Dwarf_Attribute */
|
812
|
+
#define DW_DLA_TYPE 0x0b /* Dwarf_Type (not used) */
|
813
|
+
#define DW_DLA_SUBSCR 0x0c /* Dwarf_Subscr (not used) */
|
814
|
+
#define DW_DLA_GLOBAL 0x0d /* Dwarf_Global */
|
815
|
+
#define DW_DLA_ERROR 0x0e /* Dwarf_Error */
|
816
|
+
#define DW_DLA_LIST 0x0f /* a list */
|
817
|
+
#define DW_DLA_LINEBUF 0x10 /* Dwarf_Line* (not used) */
|
818
|
+
#define DW_DLA_ARANGE 0x11 /* Dwarf_Arange */
|
819
|
+
#define DW_DLA_ABBREV 0x12 /* Dwarf_Abbrev */
|
820
|
+
#define DW_DLA_FRAME_OP 0x13 /* Dwarf_Frame_Op */
|
821
|
+
#define DW_DLA_CIE 0x14 /* Dwarf_Cie */
|
822
|
+
#define DW_DLA_FDE 0x15 /* Dwarf_Fde */
|
823
|
+
#define DW_DLA_LOC_BLOCK 0x16 /* Dwarf_Loc */
|
824
|
+
#define DW_DLA_FRAME_BLOCK 0x17 /* Dwarf_Frame Block (not used) */
|
825
|
+
#define DW_DLA_FUNC 0x18 /* Dwarf_Func */
|
826
|
+
#define DW_DLA_TYPENAME 0x19 /* Dwarf_Type */
|
827
|
+
#define DW_DLA_VAR 0x1a /* Dwarf_Var */
|
828
|
+
#define DW_DLA_WEAK 0x1b /* Dwarf_Weak */
|
829
|
+
#define DW_DLA_ADDR 0x1c /* Dwarf_Addr sized entries */
|
830
|
+
#define DW_DLA_RANGES 0x1d /* Dwarf_Ranges */
|
831
|
+
|
832
|
+
/* 0x1e (30) to 0x36 (54) reserved for internal to libdwarf types. */
|
833
|
+
|
834
|
+
#define DW_DLA_GDBINDEX 0x37 /* Dwarf_Gdbindex */
|
835
|
+
#define DW_DLA_XU_INDEX 0x38 /* Dwarf_Xu_Index_Header */
|
836
|
+
#define DW_DLA_LOC_BLOCK_C 0x39 /* Dwarf_Loc_c*/
|
837
|
+
#define DW_DLA_LOCDESC_C 0x3a /* Dwarf_Locdesc_c */
|
838
|
+
#define DW_DLA_LOC_HEAD_C 0x3b /* Dwarf_Loc_Head_c */
|
839
|
+
|
840
|
+
/* The augmenter string for CIE */
|
841
|
+
#define DW_CIE_AUGMENTER_STRING_V0 "z"
|
842
|
+
|
843
|
+
/* dwarf_init() access arguments
|
844
|
+
*/
|
845
|
+
#define DW_DLC_READ 0 /* read only access */
|
846
|
+
#define DW_DLC_WRITE 1 /* write only access */
|
847
|
+
#define DW_DLC_RDWR 2 /* read/write access NOT SUPPORTED*/
|
848
|
+
|
849
|
+
/* dwarf_producer_init*() access flag modifiers
|
850
|
+
No longer depends on compile-time settings for
|
851
|
+
how to produce 64bit offset. See DW_DLC_IRIX_OFFSET64.
|
852
|
+
Historic versions. One of
|
853
|
+
If DW_DLC_POINTER64 is not set DW_DLC_POINTER32 is assumed.
|
854
|
+
If DW_DLC_OFFSET64 or DW_DLC_IRIX_OFFSET64 is not
|
855
|
+
set 32bit offset DWARF is assumed.
|
856
|
+
Non-MIPS Non IA64 should use DW_DLC_SYMBOLIC_RELOCATIONS
|
857
|
+
and handle the relocation creation for the target
|
858
|
+
itself using the symbolic relocations to do so, those
|
859
|
+
use the Dwarf_Rel_Type enum relocation indicators.
|
860
|
+
|
861
|
+
*/
|
862
|
+
/* The first three are traditional dwarf producer names.
|
863
|
+
These names still work.
|
864
|
+
Newer names below.
|
865
|
+
*/
|
866
|
+
#define DW_DLC_SIZE_64 0x40000000 /* 64-bit address-size target */
|
867
|
+
#define DW_DLC_SIZE_32 0x20000000 /* 32-bit address-size target */
|
868
|
+
#define DW_DLC_OFFSET_SIZE_64 0x10000000 /* 64-bit offset-size DWARF */
|
869
|
+
|
870
|
+
/* dwarf_producer_init*() access flag modifiers
|
871
|
+
Some new April 2014.
|
872
|
+
If DW_DLC_STREAM_RELOCATIONS is set the
|
873
|
+
DW_DLC_ISA_* flags are ignored. See the Dwarf_Rel_Type enum.
|
874
|
+
*/
|
875
|
+
|
876
|
+
/* Old style Elf binary relocation (.rel) records. The default. */
|
877
|
+
#define DW_DLC_STREAM_RELOCATIONS 0x02000000
|
878
|
+
|
879
|
+
#define DW_DLC_OFFSET32 0x00010000 /* use 32-bit sec offsets */
|
880
|
+
/* The following 3 are new sensible names. Old names above with same values. */
|
881
|
+
#define DW_DLC_OFFSET64 0x10000000 /* use 64-bit sec offsets */
|
882
|
+
#define DW_DLC_POINTER32 0x20000000 /* use 4 for address_size */
|
883
|
+
#define DW_DLC_POINTER64 0x40000000 /* use 8 for address_size */
|
884
|
+
/* Special for IRIX only */
|
885
|
+
#define DW_DLC_IRIX_OFFSET64 0x00200000 /* use non-std IRIX 64bitoffset headers */
|
886
|
+
|
887
|
+
/* Usable with assembly output because it is up to the producer to
|
888
|
+
deal with locations in whatever manner the calling producer
|
889
|
+
code wishes. For example, when the libdwarf caller wishes
|
890
|
+
to produce relocations differently than the binary
|
891
|
+
relocation bits that libdwarf Stream Relocations generate.
|
892
|
+
*/
|
893
|
+
#define DW_DLC_SYMBOLIC_RELOCATIONS 0x04000000
|
894
|
+
|
895
|
+
|
896
|
+
#define DW_DLC_TARGET_BIGENDIAN 0x08000000 /* Big endian target */
|
897
|
+
#define DW_DLC_TARGET_LITTLEENDIAN 0x00100000 /* Little endian target */
|
898
|
+
|
899
|
+
|
900
|
+
/* dwarf_pcline() slide arguments
|
901
|
+
*/
|
902
|
+
#define DW_DLS_BACKWARD -1 /* slide backward to find line */
|
903
|
+
#define DW_DLS_NOSLIDE 0 /* match exactly without sliding */
|
904
|
+
#define DW_DLS_FORWARD 1 /* slide forward to find line */
|
905
|
+
|
906
|
+
/* libdwarf error numbers
|
907
|
+
*/
|
908
|
+
#define DW_DLE_NE 0 /* no error */
|
909
|
+
#define DW_DLE_VMM 1 /* dwarf format/library version mismatch */
|
910
|
+
#define DW_DLE_MAP 2 /* memory map failure */
|
911
|
+
#define DW_DLE_LEE 3 /* libelf error */
|
912
|
+
#define DW_DLE_NDS 4 /* no debug section */
|
913
|
+
#define DW_DLE_NLS 5 /* no line section */
|
914
|
+
#define DW_DLE_ID 6 /* invalid descriptor for query */
|
915
|
+
#define DW_DLE_IOF 7 /* I/O failure */
|
916
|
+
#define DW_DLE_MAF 8 /* memory allocation failure */
|
917
|
+
#define DW_DLE_IA 9 /* invalid argument */
|
918
|
+
#define DW_DLE_MDE 10 /* mangled debugging entry */
|
919
|
+
#define DW_DLE_MLE 11 /* mangled line number entry */
|
920
|
+
#define DW_DLE_FNO 12 /* file not open */
|
921
|
+
#define DW_DLE_FNR 13 /* file not a regular file */
|
922
|
+
#define DW_DLE_FWA 14 /* file open with wrong access */
|
923
|
+
#define DW_DLE_NOB 15 /* not an object file */
|
924
|
+
#define DW_DLE_MOF 16 /* mangled object file header */
|
925
|
+
#define DW_DLE_EOLL 17 /* end of location list entries */
|
926
|
+
#define DW_DLE_NOLL 18 /* no location list section */
|
927
|
+
#define DW_DLE_BADOFF 19 /* Invalid offset */
|
928
|
+
#define DW_DLE_EOS 20 /* end of section */
|
929
|
+
#define DW_DLE_ATRUNC 21 /* abbreviations section appears truncated*/
|
930
|
+
#define DW_DLE_BADBITC 22 /* Address size passed to dwarf bad*/
|
931
|
+
/* It is not an allowed size (64 or 32) */
|
932
|
+
/* Error codes defined by the current Libdwarf Implementation. */
|
933
|
+
#define DW_DLE_DBG_ALLOC 23
|
934
|
+
#define DW_DLE_FSTAT_ERROR 24
|
935
|
+
#define DW_DLE_FSTAT_MODE_ERROR 25
|
936
|
+
#define DW_DLE_INIT_ACCESS_WRONG 26
|
937
|
+
#define DW_DLE_ELF_BEGIN_ERROR 27
|
938
|
+
#define DW_DLE_ELF_GETEHDR_ERROR 28
|
939
|
+
#define DW_DLE_ELF_GETSHDR_ERROR 29
|
940
|
+
#define DW_DLE_ELF_STRPTR_ERROR 30
|
941
|
+
#define DW_DLE_DEBUG_INFO_DUPLICATE 31
|
942
|
+
#define DW_DLE_DEBUG_INFO_NULL 32
|
943
|
+
#define DW_DLE_DEBUG_ABBREV_DUPLICATE 33
|
944
|
+
#define DW_DLE_DEBUG_ABBREV_NULL 34
|
945
|
+
#define DW_DLE_DEBUG_ARANGES_DUPLICATE 35
|
946
|
+
#define DW_DLE_DEBUG_ARANGES_NULL 36
|
947
|
+
#define DW_DLE_DEBUG_LINE_DUPLICATE 37
|
948
|
+
#define DW_DLE_DEBUG_LINE_NULL 38
|
949
|
+
#define DW_DLE_DEBUG_LOC_DUPLICATE 39
|
950
|
+
#define DW_DLE_DEBUG_LOC_NULL 40
|
951
|
+
#define DW_DLE_DEBUG_MACINFO_DUPLICATE 41
|
952
|
+
#define DW_DLE_DEBUG_MACINFO_NULL 42
|
953
|
+
#define DW_DLE_DEBUG_PUBNAMES_DUPLICATE 43
|
954
|
+
#define DW_DLE_DEBUG_PUBNAMES_NULL 44
|
955
|
+
#define DW_DLE_DEBUG_STR_DUPLICATE 45
|
956
|
+
#define DW_DLE_DEBUG_STR_NULL 46
|
957
|
+
#define DW_DLE_CU_LENGTH_ERROR 47
|
958
|
+
#define DW_DLE_VERSION_STAMP_ERROR 48
|
959
|
+
#define DW_DLE_ABBREV_OFFSET_ERROR 49
|
960
|
+
#define DW_DLE_ADDRESS_SIZE_ERROR 50
|
961
|
+
#define DW_DLE_DEBUG_INFO_PTR_NULL 51
|
962
|
+
#define DW_DLE_DIE_NULL 52
|
963
|
+
#define DW_DLE_STRING_OFFSET_BAD 53
|
964
|
+
#define DW_DLE_DEBUG_LINE_LENGTH_BAD 54
|
965
|
+
#define DW_DLE_LINE_PROLOG_LENGTH_BAD 55
|
966
|
+
#define DW_DLE_LINE_NUM_OPERANDS_BAD 56
|
967
|
+
#define DW_DLE_LINE_SET_ADDR_ERROR 57 /* No longer used. */
|
968
|
+
#define DW_DLE_LINE_EXT_OPCODE_BAD 58
|
969
|
+
#define DW_DLE_DWARF_LINE_NULL 59
|
970
|
+
#define DW_DLE_INCL_DIR_NUM_BAD 60
|
971
|
+
#define DW_DLE_LINE_FILE_NUM_BAD 61
|
972
|
+
#define DW_DLE_ALLOC_FAIL 62
|
973
|
+
#define DW_DLE_NO_CALLBACK_FUNC 63
|
974
|
+
#define DW_DLE_SECT_ALLOC 64
|
975
|
+
#define DW_DLE_FILE_ENTRY_ALLOC 65
|
976
|
+
#define DW_DLE_LINE_ALLOC 66
|
977
|
+
#define DW_DLE_FPGM_ALLOC 67
|
978
|
+
#define DW_DLE_INCDIR_ALLOC 68
|
979
|
+
#define DW_DLE_STRING_ALLOC 69
|
980
|
+
#define DW_DLE_CHUNK_ALLOC 70
|
981
|
+
#define DW_DLE_BYTEOFF_ERR 71
|
982
|
+
#define DW_DLE_CIE_ALLOC 72
|
983
|
+
#define DW_DLE_FDE_ALLOC 73
|
984
|
+
#define DW_DLE_REGNO_OVFL 74
|
985
|
+
#define DW_DLE_CIE_OFFS_ALLOC 75
|
986
|
+
#define DW_DLE_WRONG_ADDRESS 76
|
987
|
+
#define DW_DLE_EXTRA_NEIGHBORS 77
|
988
|
+
#define DW_DLE_WRONG_TAG 78
|
989
|
+
#define DW_DLE_DIE_ALLOC 79
|
990
|
+
#define DW_DLE_PARENT_EXISTS 80
|
991
|
+
#define DW_DLE_DBG_NULL 81
|
992
|
+
#define DW_DLE_DEBUGLINE_ERROR 82
|
993
|
+
#define DW_DLE_DEBUGFRAME_ERROR 83
|
994
|
+
#define DW_DLE_DEBUGINFO_ERROR 84
|
995
|
+
#define DW_DLE_ATTR_ALLOC 85
|
996
|
+
#define DW_DLE_ABBREV_ALLOC 86
|
997
|
+
#define DW_DLE_OFFSET_UFLW 87
|
998
|
+
#define DW_DLE_ELF_SECT_ERR 88
|
999
|
+
#define DW_DLE_DEBUG_FRAME_LENGTH_BAD 89
|
1000
|
+
#define DW_DLE_FRAME_VERSION_BAD 90
|
1001
|
+
#define DW_DLE_CIE_RET_ADDR_REG_ERROR 91
|
1002
|
+
#define DW_DLE_FDE_NULL 92
|
1003
|
+
#define DW_DLE_FDE_DBG_NULL 93
|
1004
|
+
#define DW_DLE_CIE_NULL 94
|
1005
|
+
#define DW_DLE_CIE_DBG_NULL 95
|
1006
|
+
#define DW_DLE_FRAME_TABLE_COL_BAD 96
|
1007
|
+
#define DW_DLE_PC_NOT_IN_FDE_RANGE 97
|
1008
|
+
#define DW_DLE_CIE_INSTR_EXEC_ERROR 98
|
1009
|
+
#define DW_DLE_FRAME_INSTR_EXEC_ERROR 99
|
1010
|
+
#define DW_DLE_FDE_PTR_NULL 100
|
1011
|
+
#define DW_DLE_RET_OP_LIST_NULL 101
|
1012
|
+
#define DW_DLE_LINE_CONTEXT_NULL 102
|
1013
|
+
#define DW_DLE_DBG_NO_CU_CONTEXT 103
|
1014
|
+
#define DW_DLE_DIE_NO_CU_CONTEXT 104
|
1015
|
+
#define DW_DLE_FIRST_DIE_NOT_CU 105
|
1016
|
+
#define DW_DLE_NEXT_DIE_PTR_NULL 106
|
1017
|
+
#define DW_DLE_DEBUG_FRAME_DUPLICATE 107
|
1018
|
+
#define DW_DLE_DEBUG_FRAME_NULL 108
|
1019
|
+
#define DW_DLE_ABBREV_DECODE_ERROR 109
|
1020
|
+
#define DW_DLE_DWARF_ABBREV_NULL 110
|
1021
|
+
#define DW_DLE_ATTR_NULL 111
|
1022
|
+
#define DW_DLE_DIE_BAD 112
|
1023
|
+
#define DW_DLE_DIE_ABBREV_BAD 113
|
1024
|
+
#define DW_DLE_ATTR_FORM_BAD 114
|
1025
|
+
#define DW_DLE_ATTR_NO_CU_CONTEXT 115
|
1026
|
+
#define DW_DLE_ATTR_FORM_SIZE_BAD 116
|
1027
|
+
#define DW_DLE_ATTR_DBG_NULL 117
|
1028
|
+
#define DW_DLE_BAD_REF_FORM 118
|
1029
|
+
#define DW_DLE_ATTR_FORM_OFFSET_BAD 119
|
1030
|
+
#define DW_DLE_LINE_OFFSET_BAD 120
|
1031
|
+
#define DW_DLE_DEBUG_STR_OFFSET_BAD 121
|
1032
|
+
#define DW_DLE_STRING_PTR_NULL 122
|
1033
|
+
#define DW_DLE_PUBNAMES_VERSION_ERROR 123
|
1034
|
+
#define DW_DLE_PUBNAMES_LENGTH_BAD 124
|
1035
|
+
#define DW_DLE_GLOBAL_NULL 125
|
1036
|
+
#define DW_DLE_GLOBAL_CONTEXT_NULL 126
|
1037
|
+
#define DW_DLE_DIR_INDEX_BAD 127
|
1038
|
+
#define DW_DLE_LOC_EXPR_BAD 128
|
1039
|
+
#define DW_DLE_DIE_LOC_EXPR_BAD 129
|
1040
|
+
#define DW_DLE_ADDR_ALLOC 130
|
1041
|
+
#define DW_DLE_OFFSET_BAD 131
|
1042
|
+
#define DW_DLE_MAKE_CU_CONTEXT_FAIL 132
|
1043
|
+
#define DW_DLE_REL_ALLOC 133
|
1044
|
+
#define DW_DLE_ARANGE_OFFSET_BAD 134
|
1045
|
+
#define DW_DLE_SEGMENT_SIZE_BAD 135
|
1046
|
+
#define DW_DLE_ARANGE_LENGTH_BAD 136
|
1047
|
+
#define DW_DLE_ARANGE_DECODE_ERROR 137
|
1048
|
+
#define DW_DLE_ARANGES_NULL 138
|
1049
|
+
#define DW_DLE_ARANGE_NULL 139
|
1050
|
+
#define DW_DLE_NO_FILE_NAME 140
|
1051
|
+
#define DW_DLE_NO_COMP_DIR 141
|
1052
|
+
#define DW_DLE_CU_ADDRESS_SIZE_BAD 142
|
1053
|
+
#define DW_DLE_INPUT_ATTR_BAD 143
|
1054
|
+
#define DW_DLE_EXPR_NULL 144
|
1055
|
+
#define DW_DLE_BAD_EXPR_OPCODE 145
|
1056
|
+
#define DW_DLE_EXPR_LENGTH_BAD 146
|
1057
|
+
#define DW_DLE_MULTIPLE_RELOC_IN_EXPR 147
|
1058
|
+
#define DW_DLE_ELF_GETIDENT_ERROR 148
|
1059
|
+
#define DW_DLE_NO_AT_MIPS_FDE 149
|
1060
|
+
#define DW_DLE_NO_CIE_FOR_FDE 150
|
1061
|
+
#define DW_DLE_DIE_ABBREV_LIST_NULL 151
|
1062
|
+
#define DW_DLE_DEBUG_FUNCNAMES_DUPLICATE 152
|
1063
|
+
#define DW_DLE_DEBUG_FUNCNAMES_NULL 153
|
1064
|
+
#define DW_DLE_DEBUG_FUNCNAMES_VERSION_ERROR 154
|
1065
|
+
#define DW_DLE_DEBUG_FUNCNAMES_LENGTH_BAD 155
|
1066
|
+
#define DW_DLE_FUNC_NULL 156
|
1067
|
+
#define DW_DLE_FUNC_CONTEXT_NULL 157
|
1068
|
+
#define DW_DLE_DEBUG_TYPENAMES_DUPLICATE 158
|
1069
|
+
#define DW_DLE_DEBUG_TYPENAMES_NULL 159
|
1070
|
+
#define DW_DLE_DEBUG_TYPENAMES_VERSION_ERROR 160
|
1071
|
+
#define DW_DLE_DEBUG_TYPENAMES_LENGTH_BAD 161
|
1072
|
+
#define DW_DLE_TYPE_NULL 162
|
1073
|
+
#define DW_DLE_TYPE_CONTEXT_NULL 163
|
1074
|
+
#define DW_DLE_DEBUG_VARNAMES_DUPLICATE 164
|
1075
|
+
#define DW_DLE_DEBUG_VARNAMES_NULL 165
|
1076
|
+
#define DW_DLE_DEBUG_VARNAMES_VERSION_ERROR 166
|
1077
|
+
#define DW_DLE_DEBUG_VARNAMES_LENGTH_BAD 167
|
1078
|
+
#define DW_DLE_VAR_NULL 168
|
1079
|
+
#define DW_DLE_VAR_CONTEXT_NULL 169
|
1080
|
+
#define DW_DLE_DEBUG_WEAKNAMES_DUPLICATE 170
|
1081
|
+
#define DW_DLE_DEBUG_WEAKNAMES_NULL 171
|
1082
|
+
#define DW_DLE_DEBUG_WEAKNAMES_VERSION_ERROR 172
|
1083
|
+
#define DW_DLE_DEBUG_WEAKNAMES_LENGTH_BAD 173
|
1084
|
+
#define DW_DLE_WEAK_NULL 174
|
1085
|
+
#define DW_DLE_WEAK_CONTEXT_NULL 175
|
1086
|
+
#define DW_DLE_LOCDESC_COUNT_WRONG 176
|
1087
|
+
#define DW_DLE_MACINFO_STRING_NULL 177
|
1088
|
+
#define DW_DLE_MACINFO_STRING_EMPTY 178
|
1089
|
+
#define DW_DLE_MACINFO_INTERNAL_ERROR_SPACE 179
|
1090
|
+
#define DW_DLE_MACINFO_MALLOC_FAIL 180
|
1091
|
+
#define DW_DLE_DEBUGMACINFO_ERROR 181
|
1092
|
+
#define DW_DLE_DEBUG_MACRO_LENGTH_BAD 182
|
1093
|
+
#define DW_DLE_DEBUG_MACRO_MAX_BAD 183
|
1094
|
+
#define DW_DLE_DEBUG_MACRO_INTERNAL_ERR 184
|
1095
|
+
#define DW_DLE_DEBUG_MACRO_MALLOC_SPACE 185
|
1096
|
+
#define DW_DLE_DEBUG_MACRO_INCONSISTENT 186
|
1097
|
+
#define DW_DLE_DF_NO_CIE_AUGMENTATION 187
|
1098
|
+
#define DW_DLE_DF_REG_NUM_TOO_HIGH 188
|
1099
|
+
#define DW_DLE_DF_MAKE_INSTR_NO_INIT 189
|
1100
|
+
#define DW_DLE_DF_NEW_LOC_LESS_OLD_LOC 190
|
1101
|
+
#define DW_DLE_DF_POP_EMPTY_STACK 191
|
1102
|
+
#define DW_DLE_DF_ALLOC_FAIL 192
|
1103
|
+
#define DW_DLE_DF_FRAME_DECODING_ERROR 193
|
1104
|
+
#define DW_DLE_DEBUG_LOC_SECTION_SHORT 194
|
1105
|
+
#define DW_DLE_FRAME_AUGMENTATION_UNKNOWN 195
|
1106
|
+
#define DW_DLE_PUBTYPE_CONTEXT 196 /* Unused. */
|
1107
|
+
#define DW_DLE_DEBUG_PUBTYPES_LENGTH_BAD 197
|
1108
|
+
#define DW_DLE_DEBUG_PUBTYPES_VERSION_ERROR 198
|
1109
|
+
#define DW_DLE_DEBUG_PUBTYPES_DUPLICATE 199
|
1110
|
+
#define DW_DLE_FRAME_CIE_DECODE_ERROR 200
|
1111
|
+
#define DW_DLE_FRAME_REGISTER_UNREPRESENTABLE 201
|
1112
|
+
#define DW_DLE_FRAME_REGISTER_COUNT_MISMATCH 202
|
1113
|
+
#define DW_DLE_LINK_LOOP 203
|
1114
|
+
#define DW_DLE_STRP_OFFSET_BAD 204
|
1115
|
+
#define DW_DLE_DEBUG_RANGES_DUPLICATE 205
|
1116
|
+
#define DW_DLE_DEBUG_RANGES_OFFSET_BAD 206
|
1117
|
+
#define DW_DLE_DEBUG_RANGES_MISSING_END 207
|
1118
|
+
#define DW_DLE_DEBUG_RANGES_OUT_OF_MEM 208
|
1119
|
+
#define DW_DLE_DEBUG_SYMTAB_ERR 209
|
1120
|
+
#define DW_DLE_DEBUG_STRTAB_ERR 210
|
1121
|
+
#define DW_DLE_RELOC_MISMATCH_INDEX 211
|
1122
|
+
#define DW_DLE_RELOC_MISMATCH_RELOC_INDEX 212
|
1123
|
+
#define DW_DLE_RELOC_MISMATCH_STRTAB_INDEX 213
|
1124
|
+
#define DW_DLE_RELOC_SECTION_MISMATCH 214
|
1125
|
+
#define DW_DLE_RELOC_SECTION_MISSING_INDEX 215
|
1126
|
+
#define DW_DLE_RELOC_SECTION_LENGTH_ODD 216
|
1127
|
+
#define DW_DLE_RELOC_SECTION_PTR_NULL 217
|
1128
|
+
#define DW_DLE_RELOC_SECTION_MALLOC_FAIL 218
|
1129
|
+
#define DW_DLE_NO_ELF64_SUPPORT 219
|
1130
|
+
#define DW_DLE_MISSING_ELF64_SUPPORT 220
|
1131
|
+
#define DW_DLE_ORPHAN_FDE 221
|
1132
|
+
#define DW_DLE_DUPLICATE_INST_BLOCK 222
|
1133
|
+
#define DW_DLE_BAD_REF_SIG8_FORM 223
|
1134
|
+
#define DW_DLE_ATTR_EXPRLOC_FORM_BAD 224
|
1135
|
+
#define DW_DLE_FORM_SEC_OFFSET_LENGTH_BAD 225
|
1136
|
+
#define DW_DLE_NOT_REF_FORM 226
|
1137
|
+
#define DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE 227
|
1138
|
+
#define DW_DLE_REF_SIG8_NOT_HANDLED 228
|
1139
|
+
#define DW_DLE_DEBUG_FRAME_POSSIBLE_ADDRESS_BOTCH 229
|
1140
|
+
#define DW_DLE_LOC_BAD_TERMINATION 230
|
1141
|
+
#define DW_DLE_SYMTAB_SECTION_LENGTH_ODD 231
|
1142
|
+
#define DW_DLE_RELOC_SECTION_SYMBOL_INDEX_BAD 232
|
1143
|
+
#define DW_DLE_RELOC_SECTION_RELOC_TARGET_SIZE_UNKNOWN 233
|
1144
|
+
#define DW_DLE_SYMTAB_SECTION_ENTRYSIZE_ZERO 234
|
1145
|
+
#define DW_DLE_LINE_NUMBER_HEADER_ERROR 235
|
1146
|
+
#define DW_DLE_DEBUG_TYPES_NULL 236
|
1147
|
+
#define DW_DLE_DEBUG_TYPES_DUPLICATE 237
|
1148
|
+
#define DW_DLE_DEBUG_TYPES_ONLY_DWARF4 238
|
1149
|
+
#define DW_DLE_DEBUG_TYPEOFFSET_BAD 239
|
1150
|
+
#define DW_DLE_GNU_OPCODE_ERROR 240
|
1151
|
+
#define DW_DLE_DEBUGPUBTYPES_ERROR 241
|
1152
|
+
#define DW_DLE_AT_FIXUP_NULL 242
|
1153
|
+
#define DW_DLE_AT_FIXUP_DUP 243
|
1154
|
+
#define DW_DLE_BAD_ABINAME 244
|
1155
|
+
#define DW_DLE_TOO_MANY_DEBUG 245
|
1156
|
+
#define DW_DLE_DEBUG_STR_OFFSETS_DUPLICATE 246
|
1157
|
+
#define DW_DLE_SECTION_DUPLICATION 247
|
1158
|
+
#define DW_DLE_SECTION_ERROR 248
|
1159
|
+
#define DW_DLE_DEBUG_ADDR_DUPLICATE 249
|
1160
|
+
#define DW_DLE_DEBUG_CU_UNAVAILABLE_FOR_FORM 250
|
1161
|
+
#define DW_DLE_DEBUG_FORM_HANDLING_INCOMPLETE 251
|
1162
|
+
#define DW_DLE_NEXT_DIE_PAST_END 252
|
1163
|
+
#define DW_DLE_NEXT_DIE_WRONG_FORM 253
|
1164
|
+
#define DW_DLE_NEXT_DIE_NO_ABBREV_LIST 254
|
1165
|
+
#define DW_DLE_NESTED_FORM_INDIRECT_ERROR 255
|
1166
|
+
#define DW_DLE_CU_DIE_NO_ABBREV_LIST 256
|
1167
|
+
#define DW_DLE_MISSING_NEEDED_DEBUG_ADDR_SECTION 257
|
1168
|
+
#define DW_DLE_ATTR_FORM_NOT_ADDR_INDEX 258
|
1169
|
+
#define DW_DLE_ATTR_FORM_NOT_STR_INDEX 259
|
1170
|
+
#define DW_DLE_DUPLICATE_GDB_INDEX 260
|
1171
|
+
#define DW_DLE_ERRONEOUS_GDB_INDEX_SECTION 261
|
1172
|
+
#define DW_DLE_GDB_INDEX_COUNT_ERROR 262
|
1173
|
+
#define DW_DLE_GDB_INDEX_COUNT_ADDR_ERROR 263
|
1174
|
+
#define DW_DLE_GDB_INDEX_INDEX_ERROR 264
|
1175
|
+
#define DW_DLE_GDB_INDEX_CUVEC_ERROR 265
|
1176
|
+
#define DW_DLE_DUPLICATE_CU_INDEX 266
|
1177
|
+
#define DW_DLE_DUPLICATE_TU_INDEX 267
|
1178
|
+
#define DW_DLE_XU_TYPE_ARG_ERROR 268
|
1179
|
+
#define DW_DLE_XU_IMPOSSIBLE_ERROR 269
|
1180
|
+
#define DW_DLE_XU_NAME_COL_ERROR 270
|
1181
|
+
#define DW_DLE_XU_HASH_ROW_ERROR 271
|
1182
|
+
#define DW_DLE_XU_HASH_INDEX_ERROR 272
|
1183
|
+
|
1184
|
+
/* DW_DLE_FAILSAFE_ERRVAL is an aid when out of memory. */
|
1185
|
+
#define DW_DLE_FAILSAFE_ERRVAL 273
|
1186
|
+
#define DW_DLE_ARANGE_ERROR 274
|
1187
|
+
#define DW_DLE_PUBNAMES_ERROR 275
|
1188
|
+
#define DW_DLE_FUNCNAMES_ERROR 276
|
1189
|
+
#define DW_DLE_TYPENAMES_ERROR 277
|
1190
|
+
#define DW_DLE_VARNAMES_ERROR 278
|
1191
|
+
#define DW_DLE_WEAKNAMES_ERROR 279
|
1192
|
+
#define DW_DLE_RELOCS_ERROR 280
|
1193
|
+
#define DW_DLE_ATTR_OUTSIDE_SECTION 281
|
1194
|
+
#define DW_DLE_FISSION_INDEX_WRONG 282
|
1195
|
+
#define DW_DLE_FISSION_VERSION_ERROR 283
|
1196
|
+
#define DW_DLE_NEXT_DIE_LOW_ERROR 284
|
1197
|
+
#define DW_DLE_CU_UT_TYPE_ERROR 285
|
1198
|
+
#define DW_DLE_NO_SUCH_SIGNATURE_FOUND 286
|
1199
|
+
#define DW_DLE_SIGNATURE_SECTION_NUMBER_WRONG 287
|
1200
|
+
#define DW_DLE_ATTR_FORM_NOT_DATA8 288
|
1201
|
+
#define DW_DLE_SIG_TYPE_WRONG_STRING 289
|
1202
|
+
#define DW_DLE_MISSING_REQUIRED_TU_OFFSET_HASH 290
|
1203
|
+
#define DW_DLE_MISSING_REQUIRED_CU_OFFSET_HASH 291
|
1204
|
+
#define DW_DLE_DWP_MISSING_DWO_ID 292
|
1205
|
+
#define DW_DLE_DWP_SIBLING_ERROR 293
|
1206
|
+
#define DW_DLE_DEBUG_FISSION_INCOMPLETE 294
|
1207
|
+
#define DW_DLE_FISSION_SECNUM_ERR 295
|
1208
|
+
#define DW_DLE_DEBUG_MACRO_DUPLICATE 296
|
1209
|
+
#define DW_DLE_DEBUG_NAMES_DUPLICATE 297
|
1210
|
+
#define DW_DLE_DEBUG_LINE_STR_DUPLICATE 298
|
1211
|
+
#define DW_DLE_DEBUG_SUP_DUPLICATE 299
|
1212
|
+
#define DW_DLE_NO_SIGNATURE_TO_LOOKUP 300
|
1213
|
+
#define DW_DLE_NO_TIED_ADDR_AVAILABLE 301
|
1214
|
+
#define DW_DLE_NO_TIED_SIG_AVAILABLE 302
|
1215
|
+
#define DW_DLE_STRING_NOT_TERMINATED 303
|
1216
|
+
#define DW_DLE_BAD_LINE_TABLE_OPERATION 304
|
1217
|
+
#define DW_DLE_LINE_CONTEXT_BOTCH 305
|
1218
|
+
#define DW_DLE_LINE_CONTEXT_INDEX_WRONG 306
|
1219
|
+
#define DW_DLE_NO_TIED_STRING_AVAILABLE 307
|
1220
|
+
#define DW_DLE_NO_TIED_FILE_AVAILABLE 308
|
1221
|
+
#define DW_DLE_CU_TYPE_MISSING 309
|
1222
|
+
#define DW_DLE_LLE_CODE_UNKNOWN 310
|
1223
|
+
#define DW_DLE_LOCLIST_INTERFACE_ERROR 311
|
1224
|
+
#define DW_DLE_LOCLIST_INDEX_ERROR 312
|
1225
|
+
#define DW_DLE_INTERFACE_NOT_SUPPORTED 313
|
1226
|
+
|
1227
|
+
/* DW_DLE_LAST MUST EQUAL LAST ERROR NUMBER */
|
1228
|
+
#define DW_DLE_LAST 313
|
1229
|
+
#define DW_DLE_LO_USER 0x10000
|
1230
|
+
|
1231
|
+
/* Taken as meaning 'undefined value', this is not
|
1232
|
+
a column or register number.
|
1233
|
+
Only present at libdwarf runtime. Never on disk.
|
1234
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
1235
|
+
*/
|
1236
|
+
#define DW_FRAME_UNDEFINED_VAL 1034
|
1237
|
+
|
1238
|
+
/* Taken as meaning 'same value' as caller had, not a column
|
1239
|
+
or register number
|
1240
|
+
Only present at libdwarf runtime. Never on disk.
|
1241
|
+
DW_FRAME_* Values present on disk are in dwarf.h
|
1242
|
+
*/
|
1243
|
+
#define DW_FRAME_SAME_VAL 1035
|
1244
|
+
|
1245
|
+
|
1246
|
+
|
1247
|
+
/* error return values
|
1248
|
+
*/
|
1249
|
+
#define DW_DLV_BADADDR (~(Dwarf_Addr)0)
|
1250
|
+
/* for functions returning target address */
|
1251
|
+
|
1252
|
+
#define DW_DLV_NOCOUNT ((Dwarf_Signed)-1)
|
1253
|
+
/* for functions returning count */
|
1254
|
+
|
1255
|
+
#define DW_DLV_BADOFFSET (~(Dwarf_Off)0)
|
1256
|
+
/* for functions returning offset */
|
1257
|
+
|
1258
|
+
/* standard return values for functions */
|
1259
|
+
#define DW_DLV_NO_ENTRY -1
|
1260
|
+
#define DW_DLV_OK 0
|
1261
|
+
#define DW_DLV_ERROR 1
|
1262
|
+
|
1263
|
+
/* Special values for offset_into_exception_table field of dwarf fde's. */
|
1264
|
+
/* The following value indicates that there is no Exception table offset
|
1265
|
+
associated with a dwarf frame. */
|
1266
|
+
#define DW_DLX_NO_EH_OFFSET (-1LL)
|
1267
|
+
/* The following value indicates that the producer was unable to analyse the
|
1268
|
+
source file to generate Exception tables for this function. */
|
1269
|
+
#define DW_DLX_EH_OFFSET_UNAVAILABLE (-2LL)
|
1270
|
+
|
1271
|
+
/* The dwarf specification separates FORMs into
|
1272
|
+
different classes. To do the seperation properly
|
1273
|
+
requires 4 pieces of data as of DWARF4 (thus the
|
1274
|
+
function arguments listed here).
|
1275
|
+
The DWARF4 specification class definition suffices to
|
1276
|
+
describe all DWARF versions.
|
1277
|
+
See section 7.5.4, Attribute Encodings.
|
1278
|
+
A return of DW_FORM_CLASS_UNKNOWN means we could not properly figure
|
1279
|
+
out what form-class it is.
|
1280
|
+
|
1281
|
+
DW_FORM_CLASS_FRAMEPTR is MIPS/IRIX only, and refers
|
1282
|
+
to the DW_AT_MIPS_fde attribute (a reference to the
|
1283
|
+
.debug_frame section).
|
1284
|
+
*/
|
1285
|
+
enum Dwarf_Form_Class {
|
1286
|
+
DW_FORM_CLASS_UNKNOWN, DW_FORM_CLASS_ADDRESS,
|
1287
|
+
DW_FORM_CLASS_BLOCK, DW_FORM_CLASS_CONSTANT,
|
1288
|
+
DW_FORM_CLASS_EXPRLOC, DW_FORM_CLASS_FLAG,
|
1289
|
+
DW_FORM_CLASS_LINEPTR, DW_FORM_CLASS_LOCLISTPTR,
|
1290
|
+
DW_FORM_CLASS_MACPTR, DW_FORM_CLASS_RANGELISTPTR,
|
1291
|
+
DW_FORM_CLASS_REFERENCE, DW_FORM_CLASS_STRING,
|
1292
|
+
DW_FORM_CLASS_FRAMEPTR
|
1293
|
+
};
|
1294
|
+
|
1295
|
+
|
1296
|
+
/*===========================================================================*/
|
1297
|
+
/* Dwarf consumer interface initialization and termination operations */
|
1298
|
+
|
1299
|
+
/* Initialization based on Unix open fd (using libelf internally). */
|
1300
|
+
int dwarf_init(int /*fd*/,
|
1301
|
+
Dwarf_Unsigned /*access*/,
|
1302
|
+
Dwarf_Handler /*errhand*/,
|
1303
|
+
Dwarf_Ptr /*errarg*/,
|
1304
|
+
Dwarf_Debug* /*dbg*/,
|
1305
|
+
Dwarf_Error* /*error*/);
|
1306
|
+
|
1307
|
+
/* Initialization based on libelf/sgi-fastlibelf open pointer. */
|
1308
|
+
int dwarf_elf_init(dwarf_elf_handle /*elf*/,
|
1309
|
+
Dwarf_Unsigned /*access*/,
|
1310
|
+
Dwarf_Handler /*errhand*/,
|
1311
|
+
Dwarf_Ptr /*errarg*/,
|
1312
|
+
Dwarf_Debug* /*dbg*/,
|
1313
|
+
Dwarf_Error* /*error*/);
|
1314
|
+
|
1315
|
+
/* Undocumented function for memory allocator. */
|
1316
|
+
void dwarf_print_memory_stats(Dwarf_Debug /*dbg*/);
|
1317
|
+
|
1318
|
+
int dwarf_get_elf(Dwarf_Debug /*dbg*/,
|
1319
|
+
dwarf_elf_handle* /*return_elfptr*/,
|
1320
|
+
Dwarf_Error* /*error*/);
|
1321
|
+
|
1322
|
+
int dwarf_finish(Dwarf_Debug /*dbg*/, Dwarf_Error* /*error*/);
|
1323
|
+
|
1324
|
+
|
1325
|
+
int dwarf_object_init(Dwarf_Obj_Access_Interface* /* obj */,
|
1326
|
+
Dwarf_Handler /* errhand */,
|
1327
|
+
Dwarf_Ptr /* errarg */,
|
1328
|
+
Dwarf_Debug* /* dbg */,
|
1329
|
+
Dwarf_Error* /* error */);
|
1330
|
+
|
1331
|
+
int dwarf_set_tied_dbg(Dwarf_Debug /*basedbg*/,
|
1332
|
+
Dwarf_Debug /*tied_dbg*/,
|
1333
|
+
Dwarf_Error* /* error */);
|
1334
|
+
|
1335
|
+
int dwarf_object_finish(Dwarf_Debug /* dbg */,
|
1336
|
+
Dwarf_Error* /* error */);
|
1337
|
+
|
1338
|
+
/* Section name access. Because sections might
|
1339
|
+
now end with .dwo or might not (as of DWARF5) */
|
1340
|
+
int
|
1341
|
+
dwarf_get_die_section_name(Dwarf_Debug /*dbg*/,
|
1342
|
+
Dwarf_Bool /*is_info*/,
|
1343
|
+
const char ** /*sec_name*/,
|
1344
|
+
Dwarf_Error * /*error*/);
|
1345
|
+
|
1346
|
+
|
1347
|
+
/* dwarf_next_cu_header_d() traverses debug_types CU headers.
|
1348
|
+
New in May, 2015.
|
1349
|
+
*/
|
1350
|
+
int dwarf_next_cu_header_d(Dwarf_Debug /*dbg*/,
|
1351
|
+
Dwarf_Bool /*is_info*/,
|
1352
|
+
Dwarf_Unsigned* /*cu_header_length*/,
|
1353
|
+
Dwarf_Half* /*version_stamp*/,
|
1354
|
+
Dwarf_Off* /*abbrev_offset*/,
|
1355
|
+
Dwarf_Half* /*address_size*/,
|
1356
|
+
Dwarf_Half* /*length_size*/,
|
1357
|
+
Dwarf_Half* /*extension_size*/,
|
1358
|
+
Dwarf_Sig8* /*type signature*/,
|
1359
|
+
Dwarf_Unsigned* /*typeoffset*/,
|
1360
|
+
Dwarf_Unsigned* /*next_cu_header_offset*/,
|
1361
|
+
Dwarf_Half * /*header_cu_type*/,
|
1362
|
+
Dwarf_Error* /*error*/);
|
1363
|
+
|
1364
|
+
/* Die traversal operations.
|
1365
|
+
dwarf_next_cu_header_b() traverses debug_info CU headers.
|
1366
|
+
Obsolete but supported.
|
1367
|
+
*/
|
1368
|
+
int dwarf_next_cu_header_b(Dwarf_Debug /*dbg*/,
|
1369
|
+
Dwarf_Unsigned* /*cu_header_length*/,
|
1370
|
+
Dwarf_Half* /*version_stamp*/,
|
1371
|
+
Dwarf_Off* /*abbrev_offset*/,
|
1372
|
+
Dwarf_Half* /*address_size*/,
|
1373
|
+
Dwarf_Half* /*length_size*/,
|
1374
|
+
Dwarf_Half* /*extension_size*/,
|
1375
|
+
Dwarf_Unsigned* /*next_cu_header_offset*/,
|
1376
|
+
Dwarf_Error* /*error*/);
|
1377
|
+
|
1378
|
+
/* dwarf_next_cu_header_types() traverses debug_types CU headers.
|
1379
|
+
New in October, 2011. Obsolete but supported May 2015.
|
1380
|
+
*/
|
1381
|
+
int dwarf_next_cu_header_c(Dwarf_Debug /*dbg*/,
|
1382
|
+
Dwarf_Bool /*is_info*/,
|
1383
|
+
Dwarf_Unsigned* /*cu_header_length*/,
|
1384
|
+
Dwarf_Half* /*version_stamp*/,
|
1385
|
+
Dwarf_Off* /*abbrev_offset*/,
|
1386
|
+
Dwarf_Half* /*address_size*/,
|
1387
|
+
Dwarf_Half* /*length_size*/,
|
1388
|
+
Dwarf_Half* /*extension_size*/,
|
1389
|
+
Dwarf_Sig8* /*type signature*/,
|
1390
|
+
Dwarf_Unsigned* /*typeoffset*/,
|
1391
|
+
Dwarf_Unsigned* /*next_cu_header_offset*/,
|
1392
|
+
Dwarf_Error* /*error*/);
|
1393
|
+
/* The following is obsolete, though supported. November 2009. */
|
1394
|
+
int dwarf_next_cu_header(Dwarf_Debug /*dbg*/,
|
1395
|
+
Dwarf_Unsigned* /*cu_header_length*/,
|
1396
|
+
Dwarf_Half* /*version_stamp*/,
|
1397
|
+
Dwarf_Off* /*abbrev_offset*/,
|
1398
|
+
Dwarf_Half* /*address_size*/,
|
1399
|
+
Dwarf_Unsigned* /*next_cu_header_offset*/,
|
1400
|
+
Dwarf_Error* /*error*/);
|
1401
|
+
|
1402
|
+
int dwarf_siblingof(Dwarf_Debug /*dbg*/,
|
1403
|
+
Dwarf_Die /*die*/,
|
1404
|
+
Dwarf_Die* /*return_siblingdie*/,
|
1405
|
+
Dwarf_Error* /*error*/);
|
1406
|
+
/* dwarf_siblingof_b new October 2011. */
|
1407
|
+
int dwarf_siblingof_b(Dwarf_Debug /*dbg*/,
|
1408
|
+
Dwarf_Die /*die*/,
|
1409
|
+
Dwarf_Bool /*is_info*/,
|
1410
|
+
Dwarf_Die* /*return_siblingdie*/,
|
1411
|
+
Dwarf_Error* /*error*/);
|
1412
|
+
|
1413
|
+
/* New 27 April 2015. */
|
1414
|
+
int dwarf_die_from_hash_signature(Dwarf_Debug dbg,
|
1415
|
+
Dwarf_Sig8 * /*hash_sig*/,
|
1416
|
+
const char * /*sig_type: "tu" or "cu"*/,
|
1417
|
+
Dwarf_Die* /*returned_CU_die */,
|
1418
|
+
Dwarf_Error* /*error*/);
|
1419
|
+
|
1420
|
+
int dwarf_child(Dwarf_Die /*die*/,
|
1421
|
+
Dwarf_Die* /*return_childdie*/,
|
1422
|
+
Dwarf_Error* /*error*/);
|
1423
|
+
|
1424
|
+
/* Finding die given global (not CU-relative) offset.
|
1425
|
+
Applies only to debug_info. */
|
1426
|
+
int dwarf_offdie(Dwarf_Debug /*dbg*/,
|
1427
|
+
Dwarf_Off /*offset*/,
|
1428
|
+
Dwarf_Die* /*return_die*/,
|
1429
|
+
Dwarf_Error* /*error*/);
|
1430
|
+
|
1431
|
+
/* dwarf_offdie_b() new October 2011 */
|
1432
|
+
/* Finding die given global (not CU-relative) offset.
|
1433
|
+
Applies to debug_info (is_info true) or debug_types (is_info false). */
|
1434
|
+
int dwarf_offdie_b(Dwarf_Debug /*dbg*/,
|
1435
|
+
Dwarf_Off /*offset*/,
|
1436
|
+
Dwarf_Bool /*is_info*/,
|
1437
|
+
Dwarf_Die* /*return_die*/,
|
1438
|
+
Dwarf_Error* /*error*/);
|
1439
|
+
|
1440
|
+
/* Returns the is_info flag through the pointer if the function returns
|
1441
|
+
DW_DLV_OK. Needed so client software knows if a DIE is in debug_info
|
1442
|
+
or debug_types.
|
1443
|
+
New October 2011. */
|
1444
|
+
Dwarf_Bool dwarf_get_die_infotypes_flag(Dwarf_Die /*die*/);
|
1445
|
+
|
1446
|
+
|
1447
|
+
/* operations on DIEs */
|
1448
|
+
int dwarf_tag(Dwarf_Die /*die*/,
|
1449
|
+
Dwarf_Half* /*return_tag*/,
|
1450
|
+
Dwarf_Error* /*error*/);
|
1451
|
+
|
1452
|
+
/* dwarf_dieoffset returns the global debug_info
|
1453
|
+
section offset, not the CU relative offset. */
|
1454
|
+
int dwarf_dieoffset(Dwarf_Die /*die*/,
|
1455
|
+
Dwarf_Off* /*return_offset*/,
|
1456
|
+
Dwarf_Error* /*error*/);
|
1457
|
+
|
1458
|
+
/* NEW October 2015. DWARF5.
|
1459
|
+
The DIE here can be any DIE in the relevant CU.
|
1460
|
+
index is an index into .debug_addr.
|
1461
|
+
This will look first for .debug_addr
|
1462
|
+
in the dbg object DIE
|
1463
|
+
and if not there (because the dbg object is
|
1464
|
+
a dwo or dwp split dwarf object)
|
1465
|
+
will look in the tied object if tied is available. */
|
1466
|
+
int
|
1467
|
+
dwarf_debug_addr_index_to_addr(Dwarf_Die /*die*/,
|
1468
|
+
Dwarf_Unsigned /*index*/,
|
1469
|
+
Dwarf_Addr * /*return_addr*/,
|
1470
|
+
Dwarf_Error * /*error*/);
|
1471
|
+
|
1472
|
+
|
1473
|
+
/* dwarf_CU_dieoffset_given_die returns
|
1474
|
+
the global debug_info section offset of the CU die
|
1475
|
+
that is the CU containing the given_die
|
1476
|
+
(the passed in DIE can be any DIE).
|
1477
|
+
This information makes it possible for a consumer to
|
1478
|
+
find and print CU context information for any die.
|
1479
|
+
See also dwarf_get_cu_die_offset_given_cu_header_offset(). */
|
1480
|
+
int dwarf_CU_dieoffset_given_die(Dwarf_Die /*given_die*/,
|
1481
|
+
Dwarf_Off* /*return_offset*/,
|
1482
|
+
Dwarf_Error* /*error*/);
|
1483
|
+
|
1484
|
+
/* dwarf_die_CU_offset returns the CU relative offset
|
1485
|
+
not the global debug_info section offset, given
|
1486
|
+
any DIE in the CU. See also dwarf_CU_dieoffset_given_die().
|
1487
|
+
*/
|
1488
|
+
int dwarf_die_CU_offset(Dwarf_Die /*die*/,
|
1489
|
+
Dwarf_Off* /*return_offset*/,
|
1490
|
+
Dwarf_Error* /*error*/);
|
1491
|
+
|
1492
|
+
int dwarf_die_CU_offset_range(Dwarf_Die /*die*/,
|
1493
|
+
Dwarf_Off* /*return_CU_header_offset*/,
|
1494
|
+
Dwarf_Off* /*return_CU_length_bytes*/,
|
1495
|
+
Dwarf_Error* /*error*/);
|
1496
|
+
|
1497
|
+
int dwarf_attr (Dwarf_Die /*die*/,
|
1498
|
+
Dwarf_Half /*attr*/,
|
1499
|
+
Dwarf_Attribute * /*returned_attr*/,
|
1500
|
+
Dwarf_Error* /*error*/);
|
1501
|
+
|
1502
|
+
int dwarf_diename(Dwarf_Die /*die*/,
|
1503
|
+
char ** /*diename*/,
|
1504
|
+
Dwarf_Error* /*error*/);
|
1505
|
+
|
1506
|
+
/* Returns the abbrev code of the die. Cannot fail. */
|
1507
|
+
int dwarf_die_abbrev_code(Dwarf_Die /*die */);
|
1508
|
+
|
1509
|
+
/* Returns a flag through ab_has_child. Non-zero if
|
1510
|
+
the DIE has children, zero if it does not. */
|
1511
|
+
int dwarf_die_abbrev_children_flag(Dwarf_Die /*die*/,
|
1512
|
+
Dwarf_Half * /*ab_has_child*/);
|
1513
|
+
|
1514
|
+
/* Validate the sibling DIE. This only makes sense to call
|
1515
|
+
if the sibling's DIEs have been travsersed and
|
1516
|
+
dwarf_child() called on each,
|
1517
|
+
so that the last DIE dwarf_child saw was the last.
|
1518
|
+
Essentially ensuring that (after such traversal) that we
|
1519
|
+
are in the same place a sibling attribute would identify.
|
1520
|
+
In case we return DW_DLV_ERROR, the global offset of the last
|
1521
|
+
DIE traversed by dwarf_child is returned through *offset */
|
1522
|
+
int dwarf_validate_die_sibling(Dwarf_Die /*sibling*/,Dwarf_Off* /*offset*/);
|
1523
|
+
|
1524
|
+
/* convenience functions, alternative to using dwarf_attrlist() */
|
1525
|
+
int dwarf_hasattr(Dwarf_Die /*die*/,
|
1526
|
+
Dwarf_Half /*attr*/,
|
1527
|
+
Dwarf_Bool * /*returned_bool*/,
|
1528
|
+
Dwarf_Error* /*error*/);
|
1529
|
+
|
1530
|
+
/* BEGIN: loclist_c interfaces
|
1531
|
+
NEW October 2015.
|
1532
|
+
This works for any attribute that identifies
|
1533
|
+
a loclist or a locexpr. When the attribute is a locexpr
|
1534
|
+
a single loclist (created by libdwarf)
|
1535
|
+
is attached to loclist_head. */
|
1536
|
+
int dwarf_get_loclist_c (Dwarf_Attribute /*attr*/,
|
1537
|
+
Dwarf_Loc_Head_c * /*loclist_head*/,
|
1538
|
+
Dwarf_Unsigned * /*locCount*/,
|
1539
|
+
Dwarf_Error * /*error*/);
|
1540
|
+
|
1541
|
+
int dwarf_get_locdesc_entry_c(Dwarf_Loc_Head_c /*loclist_head*/,
|
1542
|
+
Dwarf_Unsigned /*index*/,
|
1543
|
+
|
1544
|
+
/* identifies type of locdesc entry*/
|
1545
|
+
Dwarf_Small * /*lle_value_out*/,
|
1546
|
+
Dwarf_Addr * /*lowpc_out*/,
|
1547
|
+
Dwarf_Addr * /*hipc_out*/,
|
1548
|
+
Dwarf_Unsigned * /*loclist_count_out*/,
|
1549
|
+
Dwarf_Locdesc_c * /*locentry_out*/,
|
1550
|
+
Dwarf_Small * /*loclist_source_out*/, /* 0,1, or 2 */
|
1551
|
+
Dwarf_Unsigned * /*expression_offset_out*/,
|
1552
|
+
Dwarf_Unsigned * /*locdesc_offset_out*/,
|
1553
|
+
Dwarf_Error * /*error*/);
|
1554
|
+
|
1555
|
+
int dwarf_get_location_op_value_c(Dwarf_Locdesc_c /*locdesc*/,
|
1556
|
+
Dwarf_Unsigned /*index*/,
|
1557
|
+
Dwarf_Small * /*atom_out*/,
|
1558
|
+
Dwarf_Unsigned * /*operand1*/,
|
1559
|
+
Dwarf_Unsigned * /*operand2*/,
|
1560
|
+
Dwarf_Unsigned * /*operand3*/,
|
1561
|
+
Dwarf_Unsigned * /*offset_for_branch*/,
|
1562
|
+
Dwarf_Error* /*error*/);
|
1563
|
+
|
1564
|
+
int dwarf_loclist_from_expr_c(Dwarf_Debug dbg,
|
1565
|
+
Dwarf_Ptr expression_in,
|
1566
|
+
Dwarf_Unsigned expression_length,
|
1567
|
+
Dwarf_Half address_size,
|
1568
|
+
Dwarf_Half offset_size,
|
1569
|
+
Dwarf_Small dwarf_version,
|
1570
|
+
Dwarf_Loc_Head_c* loc_head,
|
1571
|
+
Dwarf_Unsigned * listlen,
|
1572
|
+
Dwarf_Error * error);
|
1573
|
+
|
1574
|
+
/* This frees all memory allocated by the applicable
|
1575
|
+
dwarf_get_loclist_c() */
|
1576
|
+
void dwarf_loc_head_c_dealloc(Dwarf_Loc_Head_c /*loclist_head*/);
|
1577
|
+
|
1578
|
+
/* END: loclist_c interfaces */
|
1579
|
+
|
1580
|
+
|
1581
|
+
/* As of 2015 the preferred interface
|
1582
|
+
is dwarf_get_loclist_c()
|
1583
|
+
and only dwarf_get_loclist_c() will work
|
1584
|
+
for DWARF5 (and also all earlier versions). */
|
1585
|
+
int dwarf_loclist_n(Dwarf_Attribute /*attr*/,
|
1586
|
+
Dwarf_Locdesc*** /*llbuf*/,
|
1587
|
+
Dwarf_Signed * /*locCount*/,
|
1588
|
+
Dwarf_Error* /*error*/);
|
1589
|
+
|
1590
|
+
/* The original interfaces. Please do not use this. */
|
1591
|
+
int dwarf_loclist(Dwarf_Attribute /*attr*/, /* inflexible! */
|
1592
|
+
Dwarf_Locdesc** /*llbuf*/,
|
1593
|
+
Dwarf_Signed * /*locCount*/,
|
1594
|
+
Dwarf_Error* /*error*/);
|
1595
|
+
|
1596
|
+
/* Extracts a dwarf expression from an expression byte stream.
|
1597
|
+
Useful to get expressions from DW_CFA_def_cfa_expression
|
1598
|
+
DW_CFA_expression DW_CFA_val_expression expression bytes.
|
1599
|
+
27 April 2009: dwarf_loclist_from_expr() interface with
|
1600
|
+
no addr_size is obsolete but supported,
|
1601
|
+
use dwarf_loclist_from_expr_a() instead.
|
1602
|
+
*/
|
1603
|
+
int dwarf_loclist_from_expr(Dwarf_Debug /*dbg*/,
|
1604
|
+
Dwarf_Ptr /* expression_in*/,
|
1605
|
+
Dwarf_Unsigned /* expression_length*/,
|
1606
|
+
Dwarf_Locdesc ** /* llbuf*/,
|
1607
|
+
Dwarf_Signed * /*listlen*/,
|
1608
|
+
Dwarf_Error * /* error*/ );
|
1609
|
+
|
1610
|
+
/* dwarf_loclist_from_expr_a() new 27 Apr 2009:
|
1611
|
+
added addr_size argument. */
|
1612
|
+
int dwarf_loclist_from_expr_a(Dwarf_Debug /*dbg*/,
|
1613
|
+
Dwarf_Ptr /*expression_in*/,
|
1614
|
+
Dwarf_Unsigned /*expression_length*/,
|
1615
|
+
Dwarf_Half /*addr_size*/,
|
1616
|
+
Dwarf_Locdesc ** /*llbuf*/,
|
1617
|
+
Dwarf_Signed * /*listlen*/,
|
1618
|
+
Dwarf_Error * /*error*/);
|
1619
|
+
|
1620
|
+
/* dwarf_loclist_from_expr_b() new 13 Nov 2012:
|
1621
|
+
added dwarf_version (DWARF version number
|
1622
|
+
of the applicable compilation unit)
|
1623
|
+
and offset_size arguments. Added for
|
1624
|
+
DW_OP_GNU_implicit_pointer. */
|
1625
|
+
int dwarf_loclist_from_expr_b(Dwarf_Debug /*dbg*/,
|
1626
|
+
Dwarf_Ptr /*expression_in*/ ,
|
1627
|
+
Dwarf_Unsigned /*expression_length*/ ,
|
1628
|
+
Dwarf_Half /*addr_size*/ ,
|
1629
|
+
Dwarf_Half /*offset_size*/ ,
|
1630
|
+
Dwarf_Small /*dwarf_version*/ ,
|
1631
|
+
Dwarf_Locdesc ** /*llbuf*/ ,
|
1632
|
+
Dwarf_Signed * /*listlen*/ ,
|
1633
|
+
Dwarf_Error * /*error*/ );
|
1634
|
+
|
1635
|
+
int dwarf_lowpc(Dwarf_Die /*die*/,
|
1636
|
+
Dwarf_Addr * /*returned_addr*/,
|
1637
|
+
Dwarf_Error* /*error*/);
|
1638
|
+
|
1639
|
+
/* When the highpc attribute is of class 'constant'
|
1640
|
+
it is not an address, it is an offset from the
|
1641
|
+
base address (such as lowpc) of the function.
|
1642
|
+
This is therefore a required interface for DWARF4
|
1643
|
+
style DW_AT_highpc. */
|
1644
|
+
int dwarf_highpc_b(Dwarf_Die /*die*/,
|
1645
|
+
Dwarf_Addr * /*return_value*/,
|
1646
|
+
Dwarf_Half * /*return_form*/,
|
1647
|
+
enum Dwarf_Form_Class * /*return_class*/,
|
1648
|
+
Dwarf_Error * /*error*/);
|
1649
|
+
|
1650
|
+
/* This works for DWARF2 and DWARF3 styles of DW_AT_highpc,
|
1651
|
+
but not for the DWARF4 class constant forms.
|
1652
|
+
If the FORM is of class constant this returns an error */
|
1653
|
+
int dwarf_highpc(Dwarf_Die /*die*/,
|
1654
|
+
Dwarf_Addr * /*returned_addr*/,
|
1655
|
+
Dwarf_Error* /*error*/);
|
1656
|
+
|
1657
|
+
int dwarf_bytesize(Dwarf_Die /*die*/,
|
1658
|
+
Dwarf_Unsigned * /*returned_size*/,
|
1659
|
+
Dwarf_Error* /*error*/);
|
1660
|
+
|
1661
|
+
int dwarf_bitsize(Dwarf_Die /*die*/,
|
1662
|
+
Dwarf_Unsigned * /*returned_size*/,
|
1663
|
+
Dwarf_Error* /*error*/);
|
1664
|
+
|
1665
|
+
int dwarf_bitoffset(Dwarf_Die /*die*/,
|
1666
|
+
Dwarf_Unsigned * /*returned_offset*/,
|
1667
|
+
Dwarf_Error* /*error*/);
|
1668
|
+
|
1669
|
+
int dwarf_srclang(Dwarf_Die /*die*/,
|
1670
|
+
Dwarf_Unsigned * /*returned_lang*/,
|
1671
|
+
Dwarf_Error* /*error*/);
|
1672
|
+
|
1673
|
+
int dwarf_arrayorder(Dwarf_Die /*die*/,
|
1674
|
+
Dwarf_Unsigned * /*returned_order*/,
|
1675
|
+
Dwarf_Error* /*error*/);
|
1676
|
+
|
1677
|
+
/* end of convenience function list */
|
1678
|
+
|
1679
|
+
/* this is the main interface to attributes of a DIE */
|
1680
|
+
int dwarf_attrlist(Dwarf_Die /*die*/,
|
1681
|
+
Dwarf_Attribute** /*attrbuf*/,
|
1682
|
+
Dwarf_Signed * /*attrcount*/,
|
1683
|
+
Dwarf_Error* /*error*/);
|
1684
|
+
|
1685
|
+
/* query operations for attributes */
|
1686
|
+
int dwarf_hasform(Dwarf_Attribute /*attr*/,
|
1687
|
+
Dwarf_Half /*form*/,
|
1688
|
+
Dwarf_Bool * /*returned_bool*/,
|
1689
|
+
Dwarf_Error* /*error*/);
|
1690
|
+
|
1691
|
+
int dwarf_whatform(Dwarf_Attribute /*attr*/,
|
1692
|
+
Dwarf_Half * /*returned_final_form*/,
|
1693
|
+
Dwarf_Error* /*error*/);
|
1694
|
+
|
1695
|
+
int dwarf_whatform_direct(Dwarf_Attribute /*attr*/,
|
1696
|
+
Dwarf_Half * /*returned_initial_form*/,
|
1697
|
+
Dwarf_Error* /*error*/);
|
1698
|
+
|
1699
|
+
int dwarf_whatattr(Dwarf_Attribute /*attr*/,
|
1700
|
+
Dwarf_Half * /*returned_attr_num*/,
|
1701
|
+
Dwarf_Error* /*error*/);
|
1702
|
+
|
1703
|
+
/*
|
1704
|
+
The following are concerned with the Primary Interface: getting
|
1705
|
+
the actual data values. One function per 'kind' of FORM.
|
1706
|
+
*/
|
1707
|
+
/* dwarf_formref returns, thru return_offset, a CU-relative offset
|
1708
|
+
and does not allow DW_FORM_ref_addr*/
|
1709
|
+
int dwarf_formref(Dwarf_Attribute /*attr*/,
|
1710
|
+
Dwarf_Off* /*return_offset*/,
|
1711
|
+
Dwarf_Error* /*error*/);
|
1712
|
+
/* dwarf_global_formref returns, thru return_offset,
|
1713
|
+
a debug_info-relative offset and does allow all reference forms*/
|
1714
|
+
int dwarf_global_formref(Dwarf_Attribute /*attr*/,
|
1715
|
+
Dwarf_Off* /*return_offset*/,
|
1716
|
+
Dwarf_Error* /*error*/);
|
1717
|
+
|
1718
|
+
/* dwarf_formsig8 returns in the caller-provided 8 byte area
|
1719
|
+
the 8 bytes of a DW_FORM_ref_sig8. Not a string. */
|
1720
|
+
int dwarf_formsig8(Dwarf_Attribute /*attr*/,
|
1721
|
+
Dwarf_Sig8 * /*returned sig bytes*/,
|
1722
|
+
Dwarf_Error* /*error*/);
|
1723
|
+
/* dwarf_formsig8_b returns in the caller-provided 8 byte area
|
1724
|
+
the 8 bytes of a form const (DW_FORM_data8). Not a string. */
|
1725
|
+
int dwarf_formsig8_const(Dwarf_Attribute /*attr*/,
|
1726
|
+
Dwarf_Sig8 * /*returned sig bytes*/,
|
1727
|
+
Dwarf_Error* /*error*/);
|
1728
|
+
|
1729
|
+
int dwarf_formaddr(Dwarf_Attribute /*attr*/,
|
1730
|
+
Dwarf_Addr * /*returned_addr*/,
|
1731
|
+
Dwarf_Error* /*error*/);
|
1732
|
+
|
1733
|
+
/* Part of DebugFission. So a consumer can get the index when
|
1734
|
+
the object with the actual .debug_addr section is
|
1735
|
+
elsewhere. And so a print application can
|
1736
|
+
print the index. New May 2014*/
|
1737
|
+
int dwarf_get_debug_addr_index(Dwarf_Attribute /*attr*/,
|
1738
|
+
Dwarf_Unsigned * /*return_index*/,
|
1739
|
+
Dwarf_Error * /*error*/);
|
1740
|
+
|
1741
|
+
int dwarf_formflag(Dwarf_Attribute /*attr*/,
|
1742
|
+
Dwarf_Bool * /*returned_bool*/,
|
1743
|
+
Dwarf_Error* /*error*/);
|
1744
|
+
|
1745
|
+
int dwarf_formudata(Dwarf_Attribute /*attr*/,
|
1746
|
+
Dwarf_Unsigned * /*returned_val*/,
|
1747
|
+
Dwarf_Error* /*error*/);
|
1748
|
+
|
1749
|
+
int dwarf_formsdata(Dwarf_Attribute /*attr*/,
|
1750
|
+
Dwarf_Signed * /*returned_val*/,
|
1751
|
+
Dwarf_Error* /*error*/);
|
1752
|
+
|
1753
|
+
int dwarf_formblock(Dwarf_Attribute /*attr*/,
|
1754
|
+
Dwarf_Block ** /*returned_block*/,
|
1755
|
+
Dwarf_Error* /*error*/);
|
1756
|
+
|
1757
|
+
int dwarf_formstring(Dwarf_Attribute /*attr*/,
|
1758
|
+
char ** /*returned_string*/,
|
1759
|
+
Dwarf_Error* /*error*/);
|
1760
|
+
|
1761
|
+
/* DebugFission. So a DWARF print application can
|
1762
|
+
get the string index (DW_FORM_strx) and print it.
|
1763
|
+
A convenience function.
|
1764
|
+
New May 2014. */
|
1765
|
+
int
|
1766
|
+
dwarf_get_debug_str_index(Dwarf_Attribute /*attr*/,
|
1767
|
+
Dwarf_Unsigned * /*return_index*/,
|
1768
|
+
Dwarf_Error * /*error*/);
|
1769
|
+
|
1770
|
+
|
1771
|
+
int dwarf_formexprloc(Dwarf_Attribute /*attr*/,
|
1772
|
+
Dwarf_Unsigned * /*return_exprlen*/,
|
1773
|
+
Dwarf_Ptr * /*block_ptr*/,
|
1774
|
+
Dwarf_Error * /*error*/);
|
1775
|
+
|
1776
|
+
|
1777
|
+
/* end attribute query operations. */
|
1778
|
+
|
1779
|
+
/* Start line number operations */
|
1780
|
+
/* dwarf_srclines is the original interface from 1993. */
|
1781
|
+
int dwarf_srclines(Dwarf_Die /*die*/,
|
1782
|
+
Dwarf_Line** /*linebuf*/,
|
1783
|
+
Dwarf_Signed * /*linecount*/,
|
1784
|
+
Dwarf_Error* /*error*/);
|
1785
|
+
|
1786
|
+
|
1787
|
+
/* If we have two-level line tables, this will return the
|
1788
|
+
logicals table in linebuf and the actuals table in
|
1789
|
+
linebuf_actuals. For old-style (one-level) tables, it
|
1790
|
+
will return the single table through linebuf, and the
|
1791
|
+
value returned through linecount_actuals will be 0.
|
1792
|
+
The actual version number is returned through version.
|
1793
|
+
For two-level line tables, the version returned will
|
1794
|
+
be 0xf006. This interface can return data from two-level
|
1795
|
+
line tables, which are experimental.
|
1796
|
+
Most users will not wish to use dwarf_srclines_two_level() */
|
1797
|
+
int dwarf_srclines_two_level(Dwarf_Die /*die*/,
|
1798
|
+
Dwarf_Unsigned * /*version*/,
|
1799
|
+
Dwarf_Line** /*linebuf*/,
|
1800
|
+
Dwarf_Signed * /*linecount*/,
|
1801
|
+
Dwarf_Line** /*linebuf_actuals*/,
|
1802
|
+
Dwarf_Signed * /*linecount_actuals*/,
|
1803
|
+
Dwarf_Error* /*error*/);
|
1804
|
+
|
1805
|
+
/* dwarf_srclines_dealloc, created July 2005, is the
|
1806
|
+
appropriate method for deallocating what dwarf_srclines()
|
1807
|
+
and dwarf_srclines_two_level() return.
|
1808
|
+
More complete free than using dwarf_dealloc directly.
|
1809
|
+
|
1810
|
+
When dwarf_srclines_two_level returns two line tables
|
1811
|
+
user code should call dwarf_srclines_dealloc()
|
1812
|
+
once on each linebuf returned by dwarf_srclines_two_level()
|
1813
|
+
first on linebuf_actuals and then on linebuf{_logicals}. */
|
1814
|
+
|
1815
|
+
void dwarf_srclines_dealloc(Dwarf_Debug /*dbg*/,
|
1816
|
+
Dwarf_Line* /*linebuf*/,
|
1817
|
+
Dwarf_Signed /*count */);
|
1818
|
+
|
1819
|
+
|
1820
|
+
/* New October 2015, must be used to deallocating
|
1821
|
+
what is allocated by dwarf_srclines_b() and
|
1822
|
+
dwarf_srclines_from_linecontext() use.
|
1823
|
+
Works for DWARF2,3,4,5 and for experimental line tables.
|
1824
|
+
New work should use the new Dwarf_Line_Context
|
1825
|
+
interfaces.
|
1826
|
+
This also opens a Dwarf_Line_Context struct which
|
1827
|
+
is used by dwarf_srcfiles_b()
|
1828
|
+
This interface only reads the line table header, so
|
1829
|
+
it takes relatively little time.
|
1830
|
+
*is_single_table will be set non-zero for all standard dwarf line sections.
|
1831
|
+
*is_single_table will be set zero for line sections with the
|
1832
|
+
two_level line table extension (which will have *version_out 0xf006). */
|
1833
|
+
int dwarf_srclines_b(Dwarf_Die /*die*/,
|
1834
|
+
Dwarf_Unsigned * /* version_out*/,
|
1835
|
+
Dwarf_Small * /* table_count */,
|
1836
|
+
Dwarf_Line_Context * /* linecontext*/,
|
1837
|
+
Dwarf_Error * /* error*/);
|
1838
|
+
|
1839
|
+
/* Functions passing in a Dwarf_Line_Context are only
|
1840
|
+
available if dwarf_srclines_b() was used to access
|
1841
|
+
line table information. */
|
1842
|
+
/* New October 2015. Returns line details.
|
1843
|
+
Works for DWARF2,3,4,5. If linecount
|
1844
|
+
returned is zero this is a line table with no lines.*/
|
1845
|
+
int dwarf_srclines_from_linecontext(
|
1846
|
+
Dwarf_Line_Context /*line_context*/,
|
1847
|
+
Dwarf_Line ** /*linebuf*/,
|
1848
|
+
Dwarf_Signed * /*linecount*/,
|
1849
|
+
Dwarf_Error * /* error*/);
|
1850
|
+
|
1851
|
+
/* New October 2015. Returns line details.
|
1852
|
+
Works for DWARF2,3,4,5 and for experimental
|
1853
|
+
two-level line tables. A single level table will
|
1854
|
+
have *linebuf_actuals and *linecount_actuals set
|
1855
|
+
to 0. */
|
1856
|
+
int dwarf_srclines_two_level_from_linecontext(
|
1857
|
+
Dwarf_Line_Context /*line_context*/,
|
1858
|
+
Dwarf_Line ** /*linebuf */,
|
1859
|
+
Dwarf_Signed * /*linecount*/,
|
1860
|
+
Dwarf_Line ** /*linebuf_actuals*/,
|
1861
|
+
Dwarf_Signed * /*linecount_actuals*/,
|
1862
|
+
Dwarf_Error * /* error*/);
|
1863
|
+
|
1864
|
+
/* dwarf_srclines_dealloc_b(), created October 2015, is the
|
1865
|
+
appropriate method for deallocating everything
|
1866
|
+
and dwarf_srclines_from_linecontext(),
|
1867
|
+
dwarf_srclines_twolevel_from_linecontext(),
|
1868
|
+
and dwarf_srclines_b() allocate. */
|
1869
|
+
void dwarf_srclines_dealloc_b(Dwarf_Line_Context /*line_context*/);
|
1870
|
+
|
1871
|
+
/* New October 2015. */
|
1872
|
+
/* The offset is in the relevent .debug_line or .debug_line.dwo
|
1873
|
+
section (and in a split dwarf package file includes)
|
1874
|
+
the base line table offset). */
|
1875
|
+
int dwarf_srclines_table_offset(Dwarf_Line_Context /*line_context*/,
|
1876
|
+
Dwarf_Unsigned * /*offset*/,
|
1877
|
+
Dwarf_Error * /* error*/);
|
1878
|
+
|
1879
|
+
/* New October 2015. */
|
1880
|
+
/* Compilation Directory name for the current CU.
|
1881
|
+
section (and in a split dwarf package file includes)
|
1882
|
+
the base line table offset). Do not free() the string,
|
1883
|
+
it is in a dwarf section. */
|
1884
|
+
int dwarf_srclines_comp_dir(Dwarf_Line_Context /*line_context*/,
|
1885
|
+
const char ** /*compilation_directory*/,
|
1886
|
+
Dwarf_Error * /*error*/);
|
1887
|
+
|
1888
|
+
/* New October 2015. Part of the two-level line table extension. */
|
1889
|
+
/* Count is the real count of suprogram array entries. */
|
1890
|
+
int dwarf_srclines_subprog_count(Dwarf_Line_Context /*line_context*/,
|
1891
|
+
Dwarf_Signed * /*count*/,
|
1892
|
+
Dwarf_Error * /* error*/);
|
1893
|
+
|
1894
|
+
/* New October 2015. */
|
1895
|
+
/* Index starts with 1, last is 'count' */
|
1896
|
+
int dwarf_srclines_subprog_data(Dwarf_Line_Context /*line_context*/,
|
1897
|
+
Dwarf_Signed /*index*/,
|
1898
|
+
const char ** /*name*/,
|
1899
|
+
Dwarf_Unsigned * /*decl_file*/,
|
1900
|
+
Dwarf_Unsigned * /*decl_line*/,
|
1901
|
+
Dwarf_Error * /*error*/);
|
1902
|
+
|
1903
|
+
/* New October 2015. */
|
1904
|
+
/* Count is the real count of files array entries. */
|
1905
|
+
int dwarf_srclines_files_count(Dwarf_Line_Context /*line_context*/,
|
1906
|
+
Dwarf_Signed * /*count*/,
|
1907
|
+
Dwarf_Error * /*error*/);
|
1908
|
+
|
1909
|
+
/* New October 2015. */
|
1910
|
+
/* Unlike dwarf_srcfiles() this returns the raw file table
|
1911
|
+
strings without the directory being prefixed.
|
1912
|
+
Index starts with 1, last is 'count' */
|
1913
|
+
int dwarf_srclines_files_data(Dwarf_Line_Context /*line_context*/,
|
1914
|
+
Dwarf_Signed /*index*/,
|
1915
|
+
const char ** /*name*/,
|
1916
|
+
Dwarf_Unsigned * /*directory_index*/,
|
1917
|
+
Dwarf_Unsigned * /*last_mod_time*/,
|
1918
|
+
Dwarf_Unsigned * /*file_length*/,
|
1919
|
+
Dwarf_Error * /* error*/);
|
1920
|
+
|
1921
|
+
/* New October 2015. */
|
1922
|
+
/* Count is the real count of include array entries. */
|
1923
|
+
int dwarf_srclines_include_dir_count(Dwarf_Line_Context /*line_context*/,
|
1924
|
+
Dwarf_Signed * /*count*/,
|
1925
|
+
Dwarf_Error * /* error*/);
|
1926
|
+
|
1927
|
+
/* New October 2015. */
|
1928
|
+
/* Index starts with 1, last is 'count' */
|
1929
|
+
int dwarf_srclines_include_dir_data(Dwarf_Line_Context /*line_context*/,
|
1930
|
+
Dwarf_Signed /*index*/,
|
1931
|
+
const char ** /*name*/,
|
1932
|
+
Dwarf_Error * /* error*/);
|
1933
|
+
|
1934
|
+
/* New October 2015. */
|
1935
|
+
/* The DWARF version number of this compile-unit
|
1936
|
+
in the .debug_lines section and the number of
|
1937
|
+
actual tables:0 (header with no lines),
|
1938
|
+
1 (standard table), or 2 (experimental). */
|
1939
|
+
int dwarf_srclines_version(Dwarf_Line_Context /*line_context*/,
|
1940
|
+
Dwarf_Unsigned * /*version*/,
|
1941
|
+
Dwarf_Small * /*table_count*/,
|
1942
|
+
Dwarf_Error * /*error*/);
|
1943
|
+
|
1944
|
+
|
1945
|
+
/* While 'filecount' is signed, the value
|
1946
|
+
returned through the pointer is never negative.
|
1947
|
+
Original libdwarf from 199x. */
|
1948
|
+
int dwarf_srcfiles(Dwarf_Die /*die*/,
|
1949
|
+
char*** /*srcfiles*/,
|
1950
|
+
Dwarf_Signed * /*filecount*/,
|
1951
|
+
Dwarf_Error* /*error*/);
|
1952
|
+
|
1953
|
+
/* New October 2015.
|
1954
|
+
Returns the same data as
|
1955
|
+
dwarf_srcfiles, but is based on
|
1956
|
+
a Dwarf_Line_Context created by
|
1957
|
+
dwarf_srclines_b(). Using this avoids
|
1958
|
+
rereading the line table header for this CU. */
|
1959
|
+
int dwarf_srcfiles_b(Dwarf_Line_Context /*context*/,
|
1960
|
+
Dwarf_Unsigned * /*version*/,
|
1961
|
+
char *** /*srcfiles*/,
|
1962
|
+
Dwarf_Signed * /*filecount*/,
|
1963
|
+
Dwarf_Error * /*error*/);
|
1964
|
+
|
1965
|
+
int dwarf_linebeginstatement(Dwarf_Line /*line*/,
|
1966
|
+
Dwarf_Bool * /*returned_bool*/,
|
1967
|
+
Dwarf_Error* /*error*/);
|
1968
|
+
|
1969
|
+
int dwarf_lineendsequence(Dwarf_Line /*line*/,
|
1970
|
+
Dwarf_Bool * /*returned_bool*/,
|
1971
|
+
Dwarf_Error* /*error*/);
|
1972
|
+
|
1973
|
+
int dwarf_lineno(Dwarf_Line /*line*/,
|
1974
|
+
Dwarf_Unsigned * /*returned_lineno*/,
|
1975
|
+
Dwarf_Error* /*error*/);
|
1976
|
+
|
1977
|
+
int dwarf_line_srcfileno(Dwarf_Line /*line*/,
|
1978
|
+
Dwarf_Unsigned * /*ret_fileno*/,
|
1979
|
+
Dwarf_Error * /*error*/);
|
1980
|
+
|
1981
|
+
/* Is the line address from DW_LNS_set_address? */
|
1982
|
+
int dwarf_line_is_addr_set(Dwarf_Line /*line*/,
|
1983
|
+
Dwarf_Bool * /*is_addr_set*/,
|
1984
|
+
Dwarf_Error * /*error*/);
|
1985
|
+
|
1986
|
+
int dwarf_lineaddr(Dwarf_Line /*line*/,
|
1987
|
+
Dwarf_Addr * /*returned_addr*/,
|
1988
|
+
Dwarf_Error* /*error*/);
|
1989
|
+
|
1990
|
+
/* dwarf_lineoff() is OBSOLETE as of December 2011. Do not use. */
|
1991
|
+
int dwarf_lineoff(Dwarf_Line /*line*/,
|
1992
|
+
Dwarf_Signed * /*returned_lineoffset*/,
|
1993
|
+
Dwarf_Error* /*error*/);
|
1994
|
+
|
1995
|
+
/* dwarf_lineoff_b() correctly returns an unsigned column number
|
1996
|
+
through the pointer returned_lineoffset.
|
1997
|
+
dwarf_lineoff_b() is new in December 2011. */
|
1998
|
+
int dwarf_lineoff_b(Dwarf_Line /*line*/,
|
1999
|
+
Dwarf_Unsigned * /*returned_lineoffset*/,
|
2000
|
+
Dwarf_Error* /*error*/);
|
2001
|
+
|
2002
|
+
int dwarf_linesrc(Dwarf_Line /*line*/,
|
2003
|
+
char ** /*returned_name*/,
|
2004
|
+
Dwarf_Error* /*error*/);
|
2005
|
+
|
2006
|
+
int dwarf_lineblock(Dwarf_Line /*line*/,
|
2007
|
+
Dwarf_Bool * /*returned_bool*/,
|
2008
|
+
Dwarf_Error* /*error*/);
|
2009
|
+
|
2010
|
+
/* We gather these into one call as it's likely one
|
2011
|
+
will want all or none of them. */
|
2012
|
+
int dwarf_prologue_end_etc(Dwarf_Line /* line */,
|
2013
|
+
Dwarf_Bool * /*prologue_end*/,
|
2014
|
+
Dwarf_Bool * /*eplogue_begin*/,
|
2015
|
+
Dwarf_Unsigned * /* isa */,
|
2016
|
+
Dwarf_Unsigned * /* discriminator */,
|
2017
|
+
Dwarf_Error * /*error*/);
|
2018
|
+
/* End line table operations */
|
2019
|
+
|
2020
|
+
/* Two-level line tables:
|
2021
|
+
When reading from an actuals table, dwarf_line_logical()
|
2022
|
+
returns the logical row number for the line. */
|
2023
|
+
int dwarf_linelogical(Dwarf_Line /*line*/,
|
2024
|
+
Dwarf_Unsigned * /*returned_logical*/,
|
2025
|
+
Dwarf_Error* /*error*/);
|
2026
|
+
|
2027
|
+
/* Two-level line tables:
|
2028
|
+
When reading from a logicals table, dwarf_linecontext()
|
2029
|
+
returns the logical row number corresponding the the
|
2030
|
+
calling context for an inlined call. */
|
2031
|
+
int dwarf_linecontext(Dwarf_Line /*line*/,
|
2032
|
+
Dwarf_Unsigned * /*returned_context*/,
|
2033
|
+
Dwarf_Error* /*error*/);
|
2034
|
+
|
2035
|
+
/* Two-level line tables:
|
2036
|
+
When reading from a logicals table, dwarf_linesubprogno()
|
2037
|
+
returns the index in the subprograms table of the inlined
|
2038
|
+
subprogram. */
|
2039
|
+
int dwarf_line_subprogno(Dwarf_Line /*line*/,
|
2040
|
+
Dwarf_Unsigned * /*ret_subprogno*/,
|
2041
|
+
Dwarf_Error * /*error*/);
|
2042
|
+
|
2043
|
+
/* Two-level line tables:
|
2044
|
+
When reading from a logicals table, dwarf_linesubprog()
|
2045
|
+
returns the name of the inlined subprogram, its declaration
|
2046
|
+
filename, and its declaration line number, if available. */
|
2047
|
+
int dwarf_line_subprog(Dwarf_Line /*line*/,
|
2048
|
+
char ** /*returned_subprog_name*/,
|
2049
|
+
char ** /*returned_filename*/,
|
2050
|
+
Dwarf_Unsigned * /*returned_lineno*/,
|
2051
|
+
Dwarf_Error * /*error*/);
|
2052
|
+
/* End of line table interfaces. */
|
2053
|
+
|
2054
|
+
/* global name space operations (.debug_pubnames access) */
|
2055
|
+
int dwarf_get_globals(Dwarf_Debug /*dbg*/,
|
2056
|
+
Dwarf_Global** /*globals*/,
|
2057
|
+
Dwarf_Signed * /*number_of_globals*/,
|
2058
|
+
Dwarf_Error* /*error*/);
|
2059
|
+
void dwarf_globals_dealloc(Dwarf_Debug /*dbg*/,
|
2060
|
+
Dwarf_Global* /*globals*/,
|
2061
|
+
Dwarf_Signed /*number_of_globals*/);
|
2062
|
+
|
2063
|
+
int dwarf_globname(Dwarf_Global /*glob*/,
|
2064
|
+
char ** /*returned_name*/,
|
2065
|
+
Dwarf_Error* /*error*/);
|
2066
|
+
|
2067
|
+
int dwarf_global_die_offset(Dwarf_Global /*global*/,
|
2068
|
+
Dwarf_Off* /*return_offset*/,
|
2069
|
+
Dwarf_Error * /*error*/);
|
2070
|
+
|
2071
|
+
/* This returns the CU die global offset if one knows the
|
2072
|
+
CU header global offset.
|
2073
|
+
See also dwarf_CU_dieoffset_given_die(). */
|
2074
|
+
int dwarf_get_cu_die_offset_given_cu_header_offset(
|
2075
|
+
Dwarf_Debug /*dbg*/,
|
2076
|
+
Dwarf_Off /*in_cu_header_offset*/,
|
2077
|
+
Dwarf_Off * /*out_cu_die_offset*/,
|
2078
|
+
Dwarf_Error * /*err*/);
|
2079
|
+
|
2080
|
+
/* The _b form is new October 2011. */
|
2081
|
+
int dwarf_get_cu_die_offset_given_cu_header_offset_b(
|
2082
|
+
Dwarf_Debug /*dbg*/,
|
2083
|
+
Dwarf_Off /*in_cu_header_offset*/,
|
2084
|
+
Dwarf_Bool /*is_info. True means look in debug_Info,
|
2085
|
+
false use debug_types.*/,
|
2086
|
+
Dwarf_Off * /*out_cu_die_offset*/,
|
2087
|
+
Dwarf_Error * /*err*/);
|
2088
|
+
|
2089
|
+
#ifdef __sgi /* pragma is sgi MIPS only */
|
2090
|
+
#pragma optional dwarf_get_cu_die_offset_given_cu_header_offset
|
2091
|
+
#endif
|
2092
|
+
|
2093
|
+
int dwarf_global_cu_offset(Dwarf_Global /*global*/,
|
2094
|
+
Dwarf_Off* /*return_offset*/,
|
2095
|
+
Dwarf_Error* /*error*/);
|
2096
|
+
|
2097
|
+
int dwarf_global_name_offsets(Dwarf_Global /*global*/,
|
2098
|
+
char ** /*returned_name*/,
|
2099
|
+
Dwarf_Off* /*die_offset*/,
|
2100
|
+
Dwarf_Off* /*cu_offset*/,
|
2101
|
+
Dwarf_Error* /*error*/);
|
2102
|
+
|
2103
|
+
/* Static function name operations. */
|
2104
|
+
int dwarf_get_funcs(Dwarf_Debug /*dbg*/,
|
2105
|
+
Dwarf_Func** /*funcs*/,
|
2106
|
+
Dwarf_Signed * /*number_of_funcs*/,
|
2107
|
+
Dwarf_Error* /*error*/);
|
2108
|
+
void dwarf_funcs_dealloc(Dwarf_Debug /*dbg*/,
|
2109
|
+
Dwarf_Func* /*funcs*/,
|
2110
|
+
Dwarf_Signed /*number_of_funcs*/);
|
2111
|
+
|
2112
|
+
int dwarf_funcname(Dwarf_Func /*func*/,
|
2113
|
+
char ** /*returned_name*/,
|
2114
|
+
Dwarf_Error* /*error*/);
|
2115
|
+
|
2116
|
+
int dwarf_func_die_offset(Dwarf_Func /*func*/,
|
2117
|
+
Dwarf_Off* /*return_offset*/,
|
2118
|
+
Dwarf_Error* /*error*/);
|
2119
|
+
|
2120
|
+
int dwarf_func_cu_offset(Dwarf_Func /*func*/,
|
2121
|
+
Dwarf_Off* /*return_offset*/,
|
2122
|
+
Dwarf_Error* /*error*/);
|
2123
|
+
|
2124
|
+
int dwarf_func_name_offsets(Dwarf_Func /*func*/,
|
2125
|
+
char ** /*returned_name*/,
|
2126
|
+
Dwarf_Off* /*die_offset*/,
|
2127
|
+
Dwarf_Off* /*cu_offset*/,
|
2128
|
+
Dwarf_Error* /*error*/);
|
2129
|
+
|
2130
|
+
/* User-defined type name operations, SGI IRIX .debug_typenames section.
|
2131
|
+
Same content as DWARF3 .debug_pubtypes, but defined years before
|
2132
|
+
.debug_pubtypes was defined. SGI IRIX only. */
|
2133
|
+
int dwarf_get_types(Dwarf_Debug /*dbg*/,
|
2134
|
+
Dwarf_Type** /*types*/,
|
2135
|
+
Dwarf_Signed * /*number_of_types*/,
|
2136
|
+
Dwarf_Error* /*error*/);
|
2137
|
+
void dwarf_types_dealloc(Dwarf_Debug /*dbg*/,
|
2138
|
+
Dwarf_Type* /*types*/,
|
2139
|
+
Dwarf_Signed /*number_of_types*/);
|
2140
|
+
|
2141
|
+
|
2142
|
+
int dwarf_typename(Dwarf_Type /*type*/,
|
2143
|
+
char ** /*returned_name*/,
|
2144
|
+
Dwarf_Error* /*error*/);
|
2145
|
+
|
2146
|
+
int dwarf_type_die_offset(Dwarf_Type /*type*/,
|
2147
|
+
Dwarf_Off* /*return_offset*/,
|
2148
|
+
Dwarf_Error* /*error*/);
|
2149
|
+
|
2150
|
+
int dwarf_type_cu_offset(Dwarf_Type /*type*/,
|
2151
|
+
Dwarf_Off* /*return_offset*/,
|
2152
|
+
Dwarf_Error* /*error*/);
|
2153
|
+
|
2154
|
+
int dwarf_type_name_offsets(Dwarf_Type /*type*/,
|
2155
|
+
char ** /*returned_name*/,
|
2156
|
+
Dwarf_Off* /*die_offset*/,
|
2157
|
+
Dwarf_Off* /*cu_offset*/,
|
2158
|
+
Dwarf_Error* /*error*/);
|
2159
|
+
|
2160
|
+
/* User-defined type name operations, DWARF3 .debug_pubtypes section.
|
2161
|
+
*/
|
2162
|
+
int dwarf_get_pubtypes(Dwarf_Debug /*dbg*/,
|
2163
|
+
Dwarf_Type** /*types*/,
|
2164
|
+
Dwarf_Signed * /*number_of_types*/,
|
2165
|
+
Dwarf_Error* /*error*/);
|
2166
|
+
void dwarf_pubtypes_dealloc(Dwarf_Debug /*dbg*/,
|
2167
|
+
Dwarf_Type* /*pubtypes*/,
|
2168
|
+
Dwarf_Signed /*number_of_pubtypes*/);
|
2169
|
+
|
2170
|
+
|
2171
|
+
int dwarf_pubtypename(Dwarf_Type /*type*/,
|
2172
|
+
char ** /*returned_name*/,
|
2173
|
+
Dwarf_Error* /*error*/);
|
2174
|
+
|
2175
|
+
int dwarf_pubtype_die_offset(Dwarf_Type /*type*/,
|
2176
|
+
Dwarf_Off* /*return_offset*/,
|
2177
|
+
Dwarf_Error* /*error*/);
|
2178
|
+
|
2179
|
+
int dwarf_pubtype_cu_offset(Dwarf_Type /*type*/,
|
2180
|
+
Dwarf_Off* /*return_offset*/,
|
2181
|
+
Dwarf_Error* /*error*/);
|
2182
|
+
|
2183
|
+
int dwarf_pubtype_name_offsets(Dwarf_Type /*type*/,
|
2184
|
+
char ** /*returned_name*/,
|
2185
|
+
Dwarf_Off* /*die_offset*/,
|
2186
|
+
Dwarf_Off* /*cu_offset*/,
|
2187
|
+
Dwarf_Error* /*error*/);
|
2188
|
+
|
2189
|
+
/* File-scope static variable name operations. */
|
2190
|
+
int dwarf_get_vars(Dwarf_Debug /*dbg*/,
|
2191
|
+
Dwarf_Var** /*vars*/,
|
2192
|
+
Dwarf_Signed * /*number_of_vars*/,
|
2193
|
+
Dwarf_Error* /*error*/);
|
2194
|
+
void dwarf_vars_dealloc(Dwarf_Debug /*dbg*/,
|
2195
|
+
Dwarf_Var* /*vars*/,
|
2196
|
+
Dwarf_Signed /*number_of_vars*/);
|
2197
|
+
|
2198
|
+
|
2199
|
+
int dwarf_varname(Dwarf_Var /*var*/,
|
2200
|
+
char ** /*returned_name*/,
|
2201
|
+
Dwarf_Error* /*error*/);
|
2202
|
+
|
2203
|
+
int dwarf_var_die_offset(Dwarf_Var /*var*/,
|
2204
|
+
Dwarf_Off* /*return_offset*/,
|
2205
|
+
Dwarf_Error* /*error*/);
|
2206
|
+
|
2207
|
+
int dwarf_var_cu_offset(Dwarf_Var /*var*/,
|
2208
|
+
Dwarf_Off* /*return_offset*/,
|
2209
|
+
Dwarf_Error* /*error*/);
|
2210
|
+
|
2211
|
+
int dwarf_var_name_offsets(Dwarf_Var /*var*/,
|
2212
|
+
char ** /*returned_name*/,
|
2213
|
+
Dwarf_Off* /*die_offset*/,
|
2214
|
+
Dwarf_Off* /*cu_offset*/,
|
2215
|
+
Dwarf_Error* /*error*/);
|
2216
|
+
|
2217
|
+
/* weak name operations. */
|
2218
|
+
int dwarf_get_weaks(Dwarf_Debug /*dbg*/,
|
2219
|
+
Dwarf_Weak** /*weaks*/,
|
2220
|
+
Dwarf_Signed * /*number_of_weaks*/,
|
2221
|
+
Dwarf_Error* /*error*/);
|
2222
|
+
void dwarf_weaks_dealloc(Dwarf_Debug /*dbg*/,
|
2223
|
+
Dwarf_Weak* /*weaks*/,
|
2224
|
+
Dwarf_Signed /*number_of_weaks*/);
|
2225
|
+
|
2226
|
+
|
2227
|
+
int dwarf_weakname(Dwarf_Weak /*weak*/,
|
2228
|
+
char ** /*returned_name*/,
|
2229
|
+
Dwarf_Error* /*error*/);
|
2230
|
+
|
2231
|
+
int dwarf_weak_die_offset(Dwarf_Weak /*weak*/,
|
2232
|
+
Dwarf_Off* /*return_offset*/,
|
2233
|
+
Dwarf_Error* /*error*/);
|
2234
|
+
|
2235
|
+
int dwarf_weak_cu_offset(Dwarf_Weak /*weak*/,
|
2236
|
+
Dwarf_Off* /*return_offset*/,
|
2237
|
+
Dwarf_Error* /*error*/);
|
2238
|
+
|
2239
|
+
int dwarf_weak_name_offsets(Dwarf_Weak /*weak*/,
|
2240
|
+
char ** /*returned_name*/,
|
2241
|
+
Dwarf_Off* /*die_offset*/,
|
2242
|
+
Dwarf_Off* /*cu_offset*/,
|
2243
|
+
Dwarf_Error* /*error*/);
|
2244
|
+
|
2245
|
+
/* location list section operation. (.debug_loc access) */
|
2246
|
+
int dwarf_get_loclist_entry(Dwarf_Debug /*dbg*/,
|
2247
|
+
Dwarf_Unsigned /*offset*/,
|
2248
|
+
Dwarf_Addr* /*hipc*/,
|
2249
|
+
Dwarf_Addr* /*lopc*/,
|
2250
|
+
Dwarf_Ptr* /*data*/,
|
2251
|
+
Dwarf_Unsigned* /*entry_len*/,
|
2252
|
+
Dwarf_Unsigned* /*next_entry*/,
|
2253
|
+
Dwarf_Error* /*error*/);
|
2254
|
+
|
2255
|
+
/* abbreviation section operations */
|
2256
|
+
int dwarf_get_abbrev(Dwarf_Debug /*dbg*/,
|
2257
|
+
Dwarf_Unsigned /*offset*/,
|
2258
|
+
Dwarf_Abbrev * /*returned_abbrev*/,
|
2259
|
+
Dwarf_Unsigned* /*length*/,
|
2260
|
+
Dwarf_Unsigned* /*attr_count*/,
|
2261
|
+
Dwarf_Error* /*error*/);
|
2262
|
+
|
2263
|
+
int dwarf_get_abbrev_tag(Dwarf_Abbrev /*abbrev*/,
|
2264
|
+
Dwarf_Half* /*return_tag_number*/,
|
2265
|
+
Dwarf_Error* /*error*/);
|
2266
|
+
int dwarf_get_abbrev_code(Dwarf_Abbrev /*abbrev*/,
|
2267
|
+
Dwarf_Unsigned* /*return_code_number*/,
|
2268
|
+
Dwarf_Error* /*error*/);
|
2269
|
+
/* See comments in dwarf_abbrev.c. Not an entirely safe function. */
|
2270
|
+
int dwarf_get_abbrev_count(Dwarf_Debug /*dbg*/);
|
2271
|
+
|
2272
|
+
int dwarf_get_abbrev_children_flag(Dwarf_Abbrev /*abbrev*/,
|
2273
|
+
Dwarf_Signed* /*return_flag*/,
|
2274
|
+
Dwarf_Error* /*error*/);
|
2275
|
+
|
2276
|
+
int dwarf_get_abbrev_entry(Dwarf_Abbrev /*abbrev*/,
|
2277
|
+
Dwarf_Signed /*index*/,
|
2278
|
+
Dwarf_Half * /*returned_attr_num*/,
|
2279
|
+
Dwarf_Signed* /*form*/,
|
2280
|
+
Dwarf_Off* /*offset*/,
|
2281
|
+
Dwarf_Error* /*error*/);
|
2282
|
+
|
2283
|
+
/* consumer string section operation */
|
2284
|
+
int dwarf_get_str(Dwarf_Debug /*dbg*/,
|
2285
|
+
Dwarf_Off /*offset*/,
|
2286
|
+
char** /*string*/,
|
2287
|
+
Dwarf_Signed * /*strlen_of_string*/,
|
2288
|
+
Dwarf_Error* /*error*/);
|
2289
|
+
|
2290
|
+
/* Consumer op on gnu .eh_frame info */
|
2291
|
+
int dwarf_get_fde_list_eh(
|
2292
|
+
Dwarf_Debug /*dbg*/,
|
2293
|
+
Dwarf_Cie** /*cie_data*/,
|
2294
|
+
Dwarf_Signed* /*cie_element_count*/,
|
2295
|
+
Dwarf_Fde** /*fde_data*/,
|
2296
|
+
Dwarf_Signed* /*fde_element_count*/,
|
2297
|
+
Dwarf_Error* /*error*/);
|
2298
|
+
|
2299
|
+
|
2300
|
+
/* consumer operations on frame info: .debug_frame */
|
2301
|
+
int dwarf_get_fde_list(Dwarf_Debug /*dbg*/,
|
2302
|
+
Dwarf_Cie** /*cie_data*/,
|
2303
|
+
Dwarf_Signed* /*cie_element_count*/,
|
2304
|
+
Dwarf_Fde** /*fde_data*/,
|
2305
|
+
Dwarf_Signed* /*fde_element_count*/,
|
2306
|
+
Dwarf_Error* /*error*/);
|
2307
|
+
|
2308
|
+
/* Release storage gotten by dwarf_get_fde_list_eh() or
|
2309
|
+
dwarf_get_fde_list() */
|
2310
|
+
void dwarf_fde_cie_list_dealloc(Dwarf_Debug dbg,
|
2311
|
+
Dwarf_Cie *cie_data,
|
2312
|
+
Dwarf_Signed cie_element_count,
|
2313
|
+
Dwarf_Fde *fde_data,
|
2314
|
+
Dwarf_Signed fde_element_count);
|
2315
|
+
|
2316
|
+
|
2317
|
+
|
2318
|
+
int dwarf_get_fde_range(Dwarf_Fde /*fde*/,
|
2319
|
+
Dwarf_Addr* /*low_pc*/,
|
2320
|
+
Dwarf_Unsigned* /*func_length*/,
|
2321
|
+
Dwarf_Ptr* /*fde_bytes*/,
|
2322
|
+
Dwarf_Unsigned* /*fde_byte_length*/,
|
2323
|
+
Dwarf_Off* /*cie_offset*/,
|
2324
|
+
Dwarf_Signed* /*cie_index*/,
|
2325
|
+
Dwarf_Off* /*fde_offset*/,
|
2326
|
+
Dwarf_Error* /*error*/);
|
2327
|
+
|
2328
|
+
/* Useful for IRIX only: see dwarf_get_cie_augmentation_data()
|
2329
|
+
dwarf_get_fde_augmentation_data() for GNU .eh_frame. */
|
2330
|
+
int dwarf_get_fde_exception_info(Dwarf_Fde /*fde*/,
|
2331
|
+
Dwarf_Signed* /* offset_into_exception_tables */,
|
2332
|
+
Dwarf_Error* /*error*/);
|
2333
|
+
|
2334
|
+
|
2335
|
+
int dwarf_get_cie_of_fde(Dwarf_Fde /*fde*/,
|
2336
|
+
Dwarf_Cie * /*cie_returned*/,
|
2337
|
+
Dwarf_Error* /*error*/);
|
2338
|
+
|
2339
|
+
int dwarf_get_cie_info_b(Dwarf_Cie /*cie*/,
|
2340
|
+
Dwarf_Unsigned * /*bytes_in_cie*/,
|
2341
|
+
Dwarf_Small* /*version*/,
|
2342
|
+
char ** /*augmenter*/,
|
2343
|
+
Dwarf_Unsigned* /*code_alignment_factor*/,
|
2344
|
+
Dwarf_Signed* /*data_alignment_factor*/,
|
2345
|
+
Dwarf_Half* /*return_address_register_rule*/,
|
2346
|
+
Dwarf_Ptr* /*initial_instructions*/,
|
2347
|
+
Dwarf_Unsigned* /*initial_instructions_length*/,
|
2348
|
+
Dwarf_Half* /*offset_size*/,
|
2349
|
+
Dwarf_Error* /*error*/);
|
2350
|
+
int dwarf_get_cie_info(Dwarf_Cie /*cie*/,
|
2351
|
+
Dwarf_Unsigned * /*bytes_in_cie*/,
|
2352
|
+
Dwarf_Small* /*version*/,
|
2353
|
+
char ** /*augmenter*/,
|
2354
|
+
Dwarf_Unsigned* /*code_alignment_factor*/,
|
2355
|
+
Dwarf_Signed* /*data_alignment_factor*/,
|
2356
|
+
Dwarf_Half* /*return_address_register_rule*/,
|
2357
|
+
Dwarf_Ptr* /*initial_instructions*/,
|
2358
|
+
Dwarf_Unsigned* /*initial_instructions_length*/,
|
2359
|
+
Dwarf_Error* /*error*/);
|
2360
|
+
|
2361
|
+
/* dwarf_get_cie_index new September 2009. */
|
2362
|
+
int dwarf_get_cie_index(
|
2363
|
+
Dwarf_Cie /*cie*/,
|
2364
|
+
Dwarf_Signed* /*index*/,
|
2365
|
+
Dwarf_Error* /*error*/ );
|
2366
|
+
|
2367
|
+
|
2368
|
+
int dwarf_get_fde_instr_bytes(Dwarf_Fde /*fde*/,
|
2369
|
+
Dwarf_Ptr * /*outinstrs*/, Dwarf_Unsigned * /*outlen*/,
|
2370
|
+
Dwarf_Error * /*error*/);
|
2371
|
+
|
2372
|
+
int dwarf_get_fde_info_for_all_regs(Dwarf_Fde /*fde*/,
|
2373
|
+
Dwarf_Addr /*pc_requested*/,
|
2374
|
+
Dwarf_Regtable* /*reg_table*/,
|
2375
|
+
Dwarf_Addr* /*row_pc*/,
|
2376
|
+
Dwarf_Error* /*error*/);
|
2377
|
+
|
2378
|
+
int dwarf_get_fde_info_for_all_regs3(Dwarf_Fde /*fde*/,
|
2379
|
+
Dwarf_Addr /*pc_requested*/,
|
2380
|
+
Dwarf_Regtable3* /*reg_table*/,
|
2381
|
+
Dwarf_Addr* /*row_pc*/,
|
2382
|
+
Dwarf_Error* /*error*/);
|
2383
|
+
|
2384
|
+
/* In this older interface DW_FRAME_CFA_COL is a meaningful
|
2385
|
+
column (which does not work well with DWARF3 or
|
2386
|
+
non-MIPS architectures). */
|
2387
|
+
int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/,
|
2388
|
+
Dwarf_Half /*table_column*/,
|
2389
|
+
Dwarf_Addr /*pc_requested*/,
|
2390
|
+
Dwarf_Signed* /*offset_relevant*/,
|
2391
|
+
Dwarf_Signed* /*register*/,
|
2392
|
+
Dwarf_Signed* /*offset*/,
|
2393
|
+
Dwarf_Addr* /*row_pc*/,
|
2394
|
+
Dwarf_Error* /*error*/);
|
2395
|
+
|
2396
|
+
/* See discussion of dw_value_type, libdwarf.h.
|
2397
|
+
Use of DW_FRAME_CFA_COL is not meaningful in this interface.
|
2398
|
+
See dwarf_get_fde_info_for_cfa_reg3().
|
2399
|
+
*/
|
2400
|
+
/* dwarf_get_fde_info_for_reg3 is useful on a single column, but
|
2401
|
+
it is inefficient to iterate across all table_columns using this
|
2402
|
+
function. Instead call dwarf_get_fde_info_for_all_regs3() and index
|
2403
|
+
into the table it fills in. */
|
2404
|
+
int dwarf_get_fde_info_for_reg3(Dwarf_Fde /*fde*/,
|
2405
|
+
Dwarf_Half /*table_column*/,
|
2406
|
+
Dwarf_Addr /*pc_requested*/,
|
2407
|
+
Dwarf_Small * /*value_type*/,
|
2408
|
+
Dwarf_Signed * /*offset_relevant*/,
|
2409
|
+
Dwarf_Signed* /*register*/,
|
2410
|
+
Dwarf_Signed* /*offset_or_block_len*/,
|
2411
|
+
Dwarf_Ptr * /*block_ptr */,
|
2412
|
+
Dwarf_Addr* /*row_pc_out*/,
|
2413
|
+
Dwarf_Error* /*error*/);
|
2414
|
+
|
2415
|
+
/* Use this to get the cfa. */
|
2416
|
+
int dwarf_get_fde_info_for_cfa_reg3(Dwarf_Fde /*fde*/,
|
2417
|
+
Dwarf_Addr /*pc_requested*/,
|
2418
|
+
Dwarf_Small * /*value_type*/,
|
2419
|
+
Dwarf_Signed * /*offset_relevant*/,
|
2420
|
+
Dwarf_Signed* /*register*/,
|
2421
|
+
Dwarf_Signed* /*offset_or_block_len*/,
|
2422
|
+
Dwarf_Ptr * /*block_ptr */,
|
2423
|
+
Dwarf_Addr* /*row_pc_out*/,
|
2424
|
+
Dwarf_Error* /*error*/);
|
2425
|
+
|
2426
|
+
int dwarf_get_fde_for_die(Dwarf_Debug /*dbg*/,
|
2427
|
+
Dwarf_Die /*subr_die */,
|
2428
|
+
Dwarf_Fde * /*returned_fde*/,
|
2429
|
+
Dwarf_Error* /*error*/);
|
2430
|
+
|
2431
|
+
int dwarf_get_fde_n(Dwarf_Fde* /*fde_data*/,
|
2432
|
+
Dwarf_Unsigned /*fde_index*/,
|
2433
|
+
Dwarf_Fde * /*returned_fde*/,
|
2434
|
+
Dwarf_Error* /*error*/);
|
2435
|
+
|
2436
|
+
int dwarf_get_fde_at_pc(Dwarf_Fde* /*fde_data*/,
|
2437
|
+
Dwarf_Addr /*pc_of_interest*/,
|
2438
|
+
Dwarf_Fde * /*returned_fde*/,
|
2439
|
+
Dwarf_Addr* /*lopc*/,
|
2440
|
+
Dwarf_Addr* /*hipc*/,
|
2441
|
+
Dwarf_Error* /*error*/);
|
2442
|
+
|
2443
|
+
/* GNU .eh_frame augmentation information, raw form, see
|
2444
|
+
Linux Standard Base Core Specification version 3.0 . */
|
2445
|
+
int dwarf_get_cie_augmentation_data(Dwarf_Cie /* cie*/,
|
2446
|
+
Dwarf_Small ** /* augdata */,
|
2447
|
+
Dwarf_Unsigned * /* augdata_len */,
|
2448
|
+
Dwarf_Error* /*error*/);
|
2449
|
+
/* GNU .eh_frame augmentation information, raw form, see
|
2450
|
+
Linux Standard Base Core Specification version 3.0 . */
|
2451
|
+
int dwarf_get_fde_augmentation_data(Dwarf_Fde /* fde*/,
|
2452
|
+
Dwarf_Small ** /* augdata */,
|
2453
|
+
Dwarf_Unsigned * /* augdata_len */,
|
2454
|
+
Dwarf_Error* /*error*/);
|
2455
|
+
|
2456
|
+
int dwarf_expand_frame_instructions(Dwarf_Cie /*cie*/,
|
2457
|
+
Dwarf_Ptr /*instruction*/,
|
2458
|
+
Dwarf_Unsigned /*i_length*/,
|
2459
|
+
Dwarf_Frame_Op** /*returned_op_list*/,
|
2460
|
+
Dwarf_Signed* /*op_count*/,
|
2461
|
+
Dwarf_Error* /*error*/);
|
2462
|
+
|
2463
|
+
/* Operations on .debug_aranges. */
|
2464
|
+
int dwarf_get_aranges(Dwarf_Debug /*dbg*/,
|
2465
|
+
Dwarf_Arange** /*aranges*/,
|
2466
|
+
Dwarf_Signed * /*arange_count*/,
|
2467
|
+
Dwarf_Error* /*error*/);
|
2468
|
+
|
2469
|
+
|
2470
|
+
|
2471
|
+
int dwarf_get_arange(
|
2472
|
+
Dwarf_Arange* /*aranges*/,
|
2473
|
+
Dwarf_Unsigned /*arange_count*/,
|
2474
|
+
Dwarf_Addr /*address*/,
|
2475
|
+
Dwarf_Arange * /*returned_arange*/,
|
2476
|
+
Dwarf_Error* /*error*/);
|
2477
|
+
|
2478
|
+
int dwarf_get_cu_die_offset(
|
2479
|
+
Dwarf_Arange /*arange*/,
|
2480
|
+
Dwarf_Off* /*return_offset*/,
|
2481
|
+
Dwarf_Error* /*error*/);
|
2482
|
+
|
2483
|
+
int dwarf_get_arange_cu_header_offset(
|
2484
|
+
Dwarf_Arange /*arange*/,
|
2485
|
+
Dwarf_Off* /*return_cu_header_offset*/,
|
2486
|
+
Dwarf_Error* /*error*/);
|
2487
|
+
#ifdef __sgi /* pragma is sgi MIPS only */
|
2488
|
+
#pragma optional dwarf_get_arange_cu_header_offset
|
2489
|
+
#endif
|
2490
|
+
|
2491
|
+
/* DWARF2,3 interface. No longer really adequate (it was never
|
2492
|
+
right for segmented address spaces, please switch
|
2493
|
+
to using dwarf_get_arange_info_b instead.
|
2494
|
+
There is no effective difference between these
|
2495
|
+
functions if the address space
|
2496
|
+
of the target is not segmented. */
|
2497
|
+
int dwarf_get_arange_info(
|
2498
|
+
Dwarf_Arange /*arange*/,
|
2499
|
+
Dwarf_Addr* /*start*/,
|
2500
|
+
Dwarf_Unsigned* /*length*/,
|
2501
|
+
Dwarf_Off* /*cu_die_offset*/,
|
2502
|
+
Dwarf_Error* /*error*/ );
|
2503
|
+
|
2504
|
+
/* New for DWARF4, entries may have segment information.
|
2505
|
+
*segment is only meaningful if *segment_entry_size is non-zero. */
|
2506
|
+
int dwarf_get_arange_info_b(
|
2507
|
+
Dwarf_Arange /*arange*/,
|
2508
|
+
Dwarf_Unsigned* /*segment*/,
|
2509
|
+
Dwarf_Unsigned* /*segment_entry_size*/,
|
2510
|
+
Dwarf_Addr * /*start*/,
|
2511
|
+
Dwarf_Unsigned* /*length*/,
|
2512
|
+
Dwarf_Off * /*cu_die_offset*/,
|
2513
|
+
Dwarf_Error * /*error*/ );
|
2514
|
+
|
2515
|
+
|
2516
|
+
/* consumer .debug_macinfo information interface.
|
2517
|
+
*/
|
2518
|
+
struct Dwarf_Macro_Details_s {
|
2519
|
+
Dwarf_Off dmd_offset; /* offset, in the section,
|
2520
|
+
of this macro info */
|
2521
|
+
Dwarf_Small dmd_type; /* the type, DW_MACINFO_define etc*/
|
2522
|
+
Dwarf_Signed dmd_lineno; /* the source line number where
|
2523
|
+
applicable and vend_def number if
|
2524
|
+
vendor_extension op */
|
2525
|
+
|
2526
|
+
Dwarf_Signed dmd_fileindex;/* the source file index:
|
2527
|
+
applies to define undef start_file */
|
2528
|
+
char * dmd_macro; /* macro name (with value for defineop)
|
2529
|
+
string from vendor ext */
|
2530
|
+
};
|
2531
|
+
|
2532
|
+
/* dwarf_print_lines is for use by dwarfdump: it prints
|
2533
|
+
line info to stdout.
|
2534
|
+
The _dwarf name is obsolete. Use dwarf_ instead.
|
2535
|
+
Added extra argnument 2/2009 for better checking.
|
2536
|
+
*/
|
2537
|
+
int _dwarf_print_lines(Dwarf_Die /*cu_die*/,Dwarf_Error * /*error*/);
|
2538
|
+
int dwarf_print_lines(Dwarf_Die /*cu_die*/,Dwarf_Error * /*error*/,
|
2539
|
+
int * /*error_count_out */);
|
2540
|
+
|
2541
|
+
/* As of August 2013, dwarf_print_lines() no longer uses printf.
|
2542
|
+
Instead it calls back to the application using a function pointer
|
2543
|
+
once per line-to-print. The lines passed back already have any needed
|
2544
|
+
newlines. The following struct is used to initialize
|
2545
|
+
the callback mechanism.
|
2546
|
+
|
2547
|
+
Failing to call the dwarf_register_printf_callback() function will
|
2548
|
+
prevent the lines from being passed back but such omission
|
2549
|
+
is not an error.
|
2550
|
+
See libdwarf2.1.mm for further documentation.
|
2551
|
+
|
2552
|
+
The return value is the previous set of callback values.
|
2553
|
+
*/
|
2554
|
+
|
2555
|
+
typedef void (* dwarf_printf_callback_function_type)
|
2556
|
+
(void * /*user_pointer*/, const char * /*linecontent*/);
|
2557
|
+
|
2558
|
+
struct Dwarf_Printf_Callback_Info_s {
|
2559
|
+
void * dp_user_pointer;
|
2560
|
+
dwarf_printf_callback_function_type dp_fptr;
|
2561
|
+
char * dp_buffer;
|
2562
|
+
unsigned int dp_buffer_len;
|
2563
|
+
int dp_buffer_user_provided;
|
2564
|
+
void * dp_reserved;
|
2565
|
+
};
|
2566
|
+
|
2567
|
+
/* If called with a NULL newvalues pointer, it simply returns
|
2568
|
+
the current set of values for this Dwarf_Debug. */
|
2569
|
+
struct Dwarf_Printf_Callback_Info_s
|
2570
|
+
dwarf_register_printf_callback(Dwarf_Debug /*dbg*/,
|
2571
|
+
struct Dwarf_Printf_Callback_Info_s * /*newvalues*/);
|
2572
|
+
|
2573
|
+
|
2574
|
+
/* dwarf_check_lineheader lets dwarfdump get detailed messages
|
2575
|
+
about some compiler errors we detect.
|
2576
|
+
We return the count of detected errors through the
|
2577
|
+
pointer.
|
2578
|
+
*/
|
2579
|
+
void dwarf_check_lineheader(Dwarf_Die /*cu_die*/,int *errcount_out);
|
2580
|
+
|
2581
|
+
/* dwarf_ld_sort_lines helps SGI IRIX ld
|
2582
|
+
rearrange lines in .debug_line in a .o created with a text
|
2583
|
+
section per function.
|
2584
|
+
-OPT:procedure_reorder=ON
|
2585
|
+
where ld-cord (cord(1)ing by ld,
|
2586
|
+
not by cord(1)) may have changed the function order.
|
2587
|
+
The _dwarf name is obsolete. Use dwarf_ instead.
|
2588
|
+
*/
|
2589
|
+
int _dwarf_ld_sort_lines(
|
2590
|
+
void * /*orig_buffer*/,
|
2591
|
+
unsigned long /* buffer_len*/,
|
2592
|
+
int /*is_64_bit*/,
|
2593
|
+
int * /*any_change*/,
|
2594
|
+
int * /*err_code*/);
|
2595
|
+
int dwarf_ld_sort_lines(
|
2596
|
+
void * /*orig_buffer*/,
|
2597
|
+
unsigned long /*buffer_len*/,
|
2598
|
+
int /*is_64_bit*/,
|
2599
|
+
int * /*any_change*/,
|
2600
|
+
int * /*err_code*/);
|
2601
|
+
|
2602
|
+
/* Used by dwarfdump -v to print fde offsets from debugging
|
2603
|
+
info.
|
2604
|
+
The _dwarf name is obsolete. Use dwarf_ instead.
|
2605
|
+
*/
|
2606
|
+
int _dwarf_fde_section_offset(Dwarf_Debug dbg,
|
2607
|
+
Dwarf_Fde /*in_fde*/,
|
2608
|
+
Dwarf_Off * /*fde_off*/,
|
2609
|
+
Dwarf_Off * /*cie_off*/,
|
2610
|
+
Dwarf_Error * /*err*/);
|
2611
|
+
int dwarf_fde_section_offset(Dwarf_Debug dbg,
|
2612
|
+
Dwarf_Fde /*in_fde*/,
|
2613
|
+
Dwarf_Off * /*fde_off*/,
|
2614
|
+
Dwarf_Off * /*cie_off*/,
|
2615
|
+
Dwarf_Error * /*err*/);
|
2616
|
+
|
2617
|
+
/* Used by dwarfdump -v to print cie offsets from debugging
|
2618
|
+
info.
|
2619
|
+
The _dwarf name is obsolete. Use dwarf_ instead.
|
2620
|
+
*/
|
2621
|
+
int dwarf_cie_section_offset(Dwarf_Debug /*dbg*/,
|
2622
|
+
Dwarf_Cie /*in_cie*/,
|
2623
|
+
Dwarf_Off * /*cie_off */,
|
2624
|
+
Dwarf_Error * /*err*/);
|
2625
|
+
int _dwarf_cie_section_offset(Dwarf_Debug /*dbg*/,
|
2626
|
+
Dwarf_Cie /*in_cie*/,
|
2627
|
+
Dwarf_Off * /*cie_off*/,
|
2628
|
+
Dwarf_Error * /*err*/);
|
2629
|
+
|
2630
|
+
typedef struct Dwarf_Macro_Details_s Dwarf_Macro_Details;
|
2631
|
+
|
2632
|
+
int dwarf_get_macro(Dwarf_Debug /*dbg*/,
|
2633
|
+
char * /*requested_macro_name*/,
|
2634
|
+
Dwarf_Addr /*pc_of_request*/,
|
2635
|
+
char ** /*returned_macro_value*/,
|
2636
|
+
Dwarf_Error * /*error*/);
|
2637
|
+
|
2638
|
+
int dwarf_get_all_defined_macros(Dwarf_Debug /*dbg*/,
|
2639
|
+
Dwarf_Addr /*pc_of_request*/,
|
2640
|
+
Dwarf_Signed * /*returned_count*/,
|
2641
|
+
char *** /*returned_pointers_to_macros*/,
|
2642
|
+
Dwarf_Error * /*error*/);
|
2643
|
+
|
2644
|
+
char *dwarf_find_macro_value_start(char * /*macro_string*/);
|
2645
|
+
|
2646
|
+
int dwarf_get_macro_details(Dwarf_Debug /*dbg*/,
|
2647
|
+
Dwarf_Off /*macro_offset*/,
|
2648
|
+
Dwarf_Unsigned /*maximum_count*/,
|
2649
|
+
Dwarf_Signed * /*entry_count*/,
|
2650
|
+
Dwarf_Macro_Details ** /*details*/,
|
2651
|
+
Dwarf_Error * /*err*/);
|
2652
|
+
|
2653
|
+
|
2654
|
+
/* dwarf_get_offset_size() New October 2015 */
|
2655
|
+
int dwarf_get_offset_size(Dwarf_Debug /*dbg*/,
|
2656
|
+
Dwarf_Half * /*offset_size*/,
|
2657
|
+
Dwarf_Error * /*error*/);
|
2658
|
+
int dwarf_get_address_size(Dwarf_Debug /*dbg*/,
|
2659
|
+
Dwarf_Half * /*addr_size*/,
|
2660
|
+
Dwarf_Error * /*error*/);
|
2661
|
+
int dwarf_get_die_address_size(Dwarf_Die /*die*/,
|
2662
|
+
Dwarf_Half * /*addr_size*/,
|
2663
|
+
Dwarf_Error * /*error*/);
|
2664
|
+
|
2665
|
+
enum Dwarf_Form_Class dwarf_get_form_class(
|
2666
|
+
Dwarf_Half /* dwversion */,
|
2667
|
+
Dwarf_Half /* attrnum */,
|
2668
|
+
Dwarf_Half /*offset_size */,
|
2669
|
+
Dwarf_Half /*form*/);
|
2670
|
+
|
2671
|
+
|
2672
|
+
/* BEGIN gdbindex operations interfaces. */
|
2673
|
+
/* .gdb_index section operations.
|
2674
|
+
A GDB extension.
|
2675
|
+
The section is in some executables and if present
|
2676
|
+
is used to quickly map an address or name to
|
2677
|
+
a skeleton CU or TU. If present then there are
|
2678
|
+
.dwo or .dwp files somewhere to make detailed
|
2679
|
+
debugging possible (up to user code to
|
2680
|
+
find it/them and deal with them).
|
2681
|
+
|
2682
|
+
Version 8 built by gdb, so type entries are ok as is.
|
2683
|
+
Version 7 built by the 'gold' linker and type index
|
2684
|
+
entries for a CU must be derived othewise, the
|
2685
|
+
type index is not correct... ? FIXME
|
2686
|
+
*/
|
2687
|
+
|
2688
|
+
/* Creates a Dwarf_Gdbindex, returning it and
|
2689
|
+
its values through the pointers. */
|
2690
|
+
int dwarf_gdbindex_header(Dwarf_Debug /*dbg*/,
|
2691
|
+
Dwarf_Gdbindex * /*gdbindexptr*/,
|
2692
|
+
Dwarf_Unsigned * /*version*/,
|
2693
|
+
Dwarf_Unsigned * /*cu_list_offset*/,
|
2694
|
+
Dwarf_Unsigned * /*types_cu_list_offset*/,
|
2695
|
+
Dwarf_Unsigned * /*address_area_offset*/,
|
2696
|
+
Dwarf_Unsigned * /*symbol_table_offset*/,
|
2697
|
+
Dwarf_Unsigned * /*constant_pool_offset*/,
|
2698
|
+
Dwarf_Unsigned * /*section_size*/,
|
2699
|
+
Dwarf_Unsigned * /*unused_reserved*/,
|
2700
|
+
const char ** /*section_name*/,
|
2701
|
+
Dwarf_Error * /*error*/);
|
2702
|
+
|
2703
|
+
int dwarf_gdbindex_culist_array(Dwarf_Gdbindex /*gdbindexptr*/,
|
2704
|
+
Dwarf_Unsigned * /*list_length*/,
|
2705
|
+
Dwarf_Error * /*error*/);
|
2706
|
+
|
2707
|
+
/* entryindex: 0 to list_length-1 */
|
2708
|
+
int dwarf_gdbindex_culist_entry(Dwarf_Gdbindex /*gdbindexptr*/,
|
2709
|
+
Dwarf_Unsigned /*entryindex*/,
|
2710
|
+
Dwarf_Unsigned * /*cu_offset*/,
|
2711
|
+
Dwarf_Unsigned * /*cu_length*/,
|
2712
|
+
Dwarf_Error * /*error*/);
|
2713
|
+
|
2714
|
+
int dwarf_gdbindex_types_culist_array(Dwarf_Gdbindex /*gdbindexptr*/,
|
2715
|
+
Dwarf_Unsigned * /*types_list_length*/,
|
2716
|
+
Dwarf_Error * /*error*/);
|
2717
|
+
|
2718
|
+
/* entryindex: 0 to types_list_length -1 */
|
2719
|
+
int dwarf_gdbindex_types_culist_entry(
|
2720
|
+
Dwarf_Gdbindex /*gdbindexptr*/,
|
2721
|
+
Dwarf_Unsigned /*entryindex*/,
|
2722
|
+
Dwarf_Unsigned * /*cu_offset*/,
|
2723
|
+
Dwarf_Unsigned * /*tu_offset*/,
|
2724
|
+
Dwarf_Unsigned * /*type_signature*/,
|
2725
|
+
Dwarf_Error * /*error*/);
|
2726
|
+
|
2727
|
+
int dwarf_gdbindex_addressarea(Dwarf_Gdbindex /*gdbindexptr*/,
|
2728
|
+
Dwarf_Unsigned * /*addressarea_list_length*/,
|
2729
|
+
Dwarf_Error * /*error*/);
|
2730
|
+
|
2731
|
+
/* entryindex: 0 to addressarea_list_length-1 */
|
2732
|
+
int dwarf_gdbindex_addressarea_entry(
|
2733
|
+
Dwarf_Gdbindex /*gdbindexptr*/,
|
2734
|
+
Dwarf_Unsigned /*entryindex*/,
|
2735
|
+
Dwarf_Unsigned * /*low_adddress*/,
|
2736
|
+
Dwarf_Unsigned * /*high_address*/,
|
2737
|
+
Dwarf_Unsigned * /*cu_index*/,
|
2738
|
+
Dwarf_Error * /*error*/);
|
2739
|
+
|
2740
|
+
int dwarf_gdbindex_symboltable_array(Dwarf_Gdbindex /*gdbindexptr*/,
|
2741
|
+
Dwarf_Unsigned * /*symtab_list_length*/,
|
2742
|
+
Dwarf_Error * /*error*/);
|
2743
|
+
|
2744
|
+
/* entryindex: 0 to symtab_list_length-1 */
|
2745
|
+
int dwarf_gdbindex_symboltable_entry(
|
2746
|
+
Dwarf_Gdbindex /*gdbindexptr*/,
|
2747
|
+
Dwarf_Unsigned /*entryindex*/,
|
2748
|
+
Dwarf_Unsigned * /*string_offset*/,
|
2749
|
+
Dwarf_Unsigned * /*cu_vector_offset*/,
|
2750
|
+
Dwarf_Error * /*error*/);
|
2751
|
+
|
2752
|
+
int dwarf_gdbindex_cuvector_length(Dwarf_Gdbindex /*gdbindex*/,
|
2753
|
+
Dwarf_Unsigned /*cuvector_offset*/,
|
2754
|
+
Dwarf_Unsigned * /*innercount*/,
|
2755
|
+
Dwarf_Error * /*error*/);
|
2756
|
+
|
2757
|
+
|
2758
|
+
int dwarf_gdbindex_cuvector_inner_attributes(Dwarf_Gdbindex /*gdbindex*/,
|
2759
|
+
Dwarf_Unsigned /*cuvector_offset*/,
|
2760
|
+
Dwarf_Unsigned /*innerindex*/,
|
2761
|
+
/* The attr_value is a field of bits. For expanded version
|
2762
|
+
use dwarf_gdbindex_cuvector_expand_value() */
|
2763
|
+
Dwarf_Unsigned * /*attr_value*/,
|
2764
|
+
Dwarf_Error * /*error*/);
|
2765
|
+
|
2766
|
+
int dwarf_gdbindex_cuvector_instance_expand_value(Dwarf_Gdbindex /*gdbindex*/,
|
2767
|
+
Dwarf_Unsigned /*value*/,
|
2768
|
+
Dwarf_Unsigned * /*cu_index*/,
|
2769
|
+
Dwarf_Unsigned * /*reserved1*/,
|
2770
|
+
Dwarf_Unsigned * /*symbol_kind*/,
|
2771
|
+
Dwarf_Unsigned * /*is_static*/,
|
2772
|
+
Dwarf_Error * /*error*/);
|
2773
|
+
|
2774
|
+
|
2775
|
+
/* The strings in the pool follow (in memory) the cu index
|
2776
|
+
set and are NUL terminated. */
|
2777
|
+
|
2778
|
+
int dwarf_gdbindex_string_by_offset(Dwarf_Gdbindex /*gdbindexptr*/,
|
2779
|
+
Dwarf_Unsigned /*stringoffset*/,
|
2780
|
+
const char ** /*string_ptr*/,
|
2781
|
+
Dwarf_Error * /*error*/);
|
2782
|
+
|
2783
|
+
void dwarf_gdbindex_free(Dwarf_Gdbindex /*gdbindexptr*/);
|
2784
|
+
|
2785
|
+
/* END gdbindex/debugfission operations. */
|
2786
|
+
|
2787
|
+
/* START debugfission dwp .debug_cu_index and .debug_tu_index operations. */
|
2788
|
+
|
2789
|
+
int dwarf_get_xu_index_header(Dwarf_Debug /*dbg*/,
|
2790
|
+
const char * section_type, /* "tu" or "cu" */
|
2791
|
+
Dwarf_Xu_Index_Header * /*xuhdr*/,
|
2792
|
+
Dwarf_Unsigned * /*version_number*/,
|
2793
|
+
Dwarf_Unsigned * /*offsets_count L*/,
|
2794
|
+
Dwarf_Unsigned * /*units_count N*/,
|
2795
|
+
Dwarf_Unsigned * /*hash_slots_count M*/,
|
2796
|
+
const char ** /*sect_name*/,
|
2797
|
+
Dwarf_Error * /*err*/);
|
2798
|
+
|
2799
|
+
int dwarf_get_xu_index_section_type(Dwarf_Xu_Index_Header /*xuhdr*/,
|
2800
|
+
/* the function returns a pointer to
|
2801
|
+
the immutable string "tu" or "cu" via this arg. Do not free. */
|
2802
|
+
const char ** /*typename*/,
|
2803
|
+
/* the function returns a pointer to
|
2804
|
+
the immutable section name. Do not free.
|
2805
|
+
.debug_cu_index or .debug_tu_index */
|
2806
|
+
const char ** /*sectionname*/,
|
2807
|
+
Dwarf_Error * /*err*/);
|
2808
|
+
|
2809
|
+
/* Index values 0 to M-1 are valid. */
|
2810
|
+
int dwarf_get_xu_hash_entry(Dwarf_Xu_Index_Header /*xuhdr*/,
|
2811
|
+
Dwarf_Unsigned /*index*/,
|
2812
|
+
|
2813
|
+
/* Returns the hash value. 64 bits. */
|
2814
|
+
Dwarf_Sig8 * /*hash_value*/,
|
2815
|
+
|
2816
|
+
/* returns the index into rows of offset/size tables. */
|
2817
|
+
Dwarf_Unsigned * /*index_to_sections*/,
|
2818
|
+
Dwarf_Error * /*err*/);
|
2819
|
+
|
2820
|
+
/* Columns 0 to L-1, valid. */
|
2821
|
+
int dwarf_get_xu_section_names(Dwarf_Xu_Index_Header /*xuhdr*/,
|
2822
|
+
/* Row index defined to be row zero. */
|
2823
|
+
Dwarf_Unsigned /*column_index*/,
|
2824
|
+
Dwarf_Unsigned* /*DW_SECT_ number*/,
|
2825
|
+
const char ** /*DW_SECT_ name*/,
|
2826
|
+
Dwarf_Error * /*err*/);
|
2827
|
+
|
2828
|
+
/* Rows 1 to N col 0 to L-1 are valid */
|
2829
|
+
int dwarf_get_xu_section_offset(Dwarf_Xu_Index_Header /*xuhdr*/,
|
2830
|
+
Dwarf_Unsigned /*row_index*/,
|
2831
|
+
Dwarf_Unsigned /*column_index*/,
|
2832
|
+
Dwarf_Unsigned* /*sec_offset*/,
|
2833
|
+
Dwarf_Unsigned* /*sec_size*/,
|
2834
|
+
Dwarf_Error * /*err*/);
|
2835
|
+
|
2836
|
+
void dwarf_xu_header_free(Dwarf_Xu_Index_Header /*xuhdr*/);
|
2837
|
+
|
2838
|
+
/* Defined larger than necessary. This struct, being visible,
|
2839
|
+
will be difficult to change: binary compatibility. */
|
2840
|
+
#define DW_FISSION_SECT_COUNT 12
|
2841
|
+
|
2842
|
+
/* User must allocate this struct, zero it,
|
2843
|
+
and pass a pointer to it
|
2844
|
+
into dwarf_get_debugfission_for_cu . */
|
2845
|
+
struct Dwarf_Debug_Fission_Per_CU_s {
|
2846
|
+
/* Do not free the string. It contains "cu" or "tu". */
|
2847
|
+
/* If this is not set (ie, not a CU/TU in DWP Package File)
|
2848
|
+
then pcu_type will be NULL. */
|
2849
|
+
const char * pcu_type;
|
2850
|
+
/* pcu_index is the index (range 1 to N )
|
2851
|
+
into the tu/cu table of offsets and the table
|
2852
|
+
of sizes. 1 to N as the zero index is reserved
|
2853
|
+
for special purposes. Not a value one
|
2854
|
+
actually needs. */
|
2855
|
+
Dwarf_Unsigned pcu_index;
|
2856
|
+
Dwarf_Sig8 pcu_hash; /* 8 byte */
|
2857
|
+
/* [0] has offset and size 0.
|
2858
|
+
[1]-[8] are DW_SECT_* indexes and the
|
2859
|
+
values are the offset and size
|
2860
|
+
of the respective section contribution
|
2861
|
+
of a single .dwo object. When pcu_size[n] is
|
2862
|
+
zero the corresponding section is not present. */
|
2863
|
+
Dwarf_Unsigned pcu_offset[DW_FISSION_SECT_COUNT];
|
2864
|
+
Dwarf_Unsigned pcu_size[DW_FISSION_SECT_COUNT];
|
2865
|
+
Dwarf_Unsigned unused1;
|
2866
|
+
Dwarf_Unsigned unused2;
|
2867
|
+
};
|
2868
|
+
typedef struct Dwarf_Debug_Fission_Per_CU_s Dwarf_Debug_Fission_Per_CU ;
|
2869
|
+
/* For any Dwarf_Die in a compilation unit, return
|
2870
|
+
the debug fission table data through
|
2871
|
+
percu_out. Usually applications
|
2872
|
+
will pass in the CU die.
|
2873
|
+
Calling code should zero all of the
|
2874
|
+
struct Dwarf_Debug_Fission_Per_CU_s before calling this.
|
2875
|
+
If there is no debugfission data this returns
|
2876
|
+
DW_DLV_NO_ENTRY (only .dwp objects have debugfission data). */
|
2877
|
+
int dwarf_get_debugfission_for_die(Dwarf_Die /* die */,
|
2878
|
+
Dwarf_Debug_Fission_Per_CU * /* percu_out */,
|
2879
|
+
Dwarf_Error * /* err */);
|
2880
|
+
|
2881
|
+
/* Given a key (hash signature) from a .o, find the per-cu information
|
2882
|
+
for the CU with that key. */
|
2883
|
+
int dwarf_get_debugfission_for_key(Dwarf_Debug /* dbg */,
|
2884
|
+
Dwarf_Sig8 * /* key, hash signature */,
|
2885
|
+
const char * key_type /* "cu" or "tu" */,
|
2886
|
+
Dwarf_Debug_Fission_Per_CU * /* percu_out */,
|
2887
|
+
Dwarf_Error * /* err */);
|
2888
|
+
|
2889
|
+
/* END debugfission dwp .debug_cu_index and .debug_tu_index operations. */
|
2890
|
+
|
2891
|
+
|
2892
|
+
/* Utility operations */
|
2893
|
+
Dwarf_Unsigned dwarf_errno(Dwarf_Error /*error*/);
|
2894
|
+
|
2895
|
+
char* dwarf_errmsg(Dwarf_Error /*error*/);
|
2896
|
+
|
2897
|
+
/* stringcheck zero is default and means do all
|
2898
|
+
string length validity checks.
|
2899
|
+
Call with parameter value 1 to turn off many such checks (and
|
2900
|
+
increase performance).
|
2901
|
+
Call with zero for safest running.
|
2902
|
+
Actual value saved and returned is only 8 bits! Upper bits
|
2903
|
+
ignored by libdwarf (and zero on return).
|
2904
|
+
Returns previous value. */
|
2905
|
+
int dwarf_set_stringcheck(int /*stringcheck*/);
|
2906
|
+
|
2907
|
+
/* 'apply' defaults to 1 and means do all
|
2908
|
+
'rela' relocations on reading in a dwarf object section with
|
2909
|
+
such relocations.
|
2910
|
+
Call with parameter value 0 to turn off application of
|
2911
|
+
such relocations.
|
2912
|
+
Since the static linker leaves 'bogus' data in object sections
|
2913
|
+
with a 'rela' relocation section such data cannot be read
|
2914
|
+
sensibly without processing the relocations. Such relocations
|
2915
|
+
do not exist in executables and shared objects (.so), the
|
2916
|
+
relocations only exist in plain .o relocatable object files.
|
2917
|
+
Actual value saved and returned is only 8 bits! Upper bits
|
2918
|
+
ignored by libdwarf (and zero on return).
|
2919
|
+
Returns previous value. */
|
2920
|
+
int dwarf_set_reloc_application(int /*apply*/);
|
2921
|
+
|
2922
|
+
/* Unimplemented */
|
2923
|
+
Dwarf_Handler dwarf_seterrhand(Dwarf_Debug /*dbg*/, Dwarf_Handler /*errhand*/);
|
2924
|
+
|
2925
|
+
/* Unimplemented */
|
2926
|
+
Dwarf_Ptr dwarf_seterrarg(Dwarf_Debug /*dbg*/, Dwarf_Ptr /*errarg*/);
|
2927
|
+
|
2928
|
+
void dwarf_dealloc(Dwarf_Debug /*dbg*/, void* /*space*/,
|
2929
|
+
Dwarf_Unsigned /*type*/);
|
2930
|
+
|
2931
|
+
|
2932
|
+
/* DWARF Producer Interface */
|
2933
|
+
|
2934
|
+
/* New form June, 2011. Adds user_data argument. */
|
2935
|
+
typedef int (*Dwarf_Callback_Func)(
|
2936
|
+
const char* /*name*/,
|
2937
|
+
int /*size*/,
|
2938
|
+
Dwarf_Unsigned /*type*/,
|
2939
|
+
Dwarf_Unsigned /*flags*/,
|
2940
|
+
Dwarf_Unsigned /*link*/,
|
2941
|
+
Dwarf_Unsigned /*info*/,
|
2942
|
+
Dwarf_Unsigned* /*sect_name_index*/,
|
2943
|
+
void * /*user_data*/,
|
2944
|
+
int* /*error*/);
|
2945
|
+
|
2946
|
+
/* Returns DW_DLV_OK or DW_DLV_ERROR and
|
2947
|
+
if DW_DLV_OK returns the Dwarf_P_Debug
|
2948
|
+
pointer through the dbg_returned argument. */
|
2949
|
+
int dwarf_producer_init(
|
2950
|
+
Dwarf_Unsigned /*flags*/,
|
2951
|
+
Dwarf_Callback_Func /*func*/,
|
2952
|
+
Dwarf_Handler /*errhand*/,
|
2953
|
+
Dwarf_Ptr /*errarg*/,
|
2954
|
+
void * /*user_data*/,
|
2955
|
+
const char *isa_name, /* See isa/abi names in pro_init.c */
|
2956
|
+
const char *dwarf_version, /* V2 V3 V4 or V5. */
|
2957
|
+
const char *extra, /* Extra input strings, comma separated. */
|
2958
|
+
Dwarf_P_Debug *, /* dbg_returned */
|
2959
|
+
Dwarf_Error * /*error*/);
|
2960
|
+
|
2961
|
+
Dwarf_Signed dwarf_transform_to_disk_form(Dwarf_P_Debug /*dbg*/,
|
2962
|
+
Dwarf_Error* /*error*/);
|
2963
|
+
|
2964
|
+
Dwarf_Ptr dwarf_get_section_bytes(Dwarf_P_Debug /*dbg*/,
|
2965
|
+
Dwarf_Signed /*dwarf_section*/,
|
2966
|
+
Dwarf_Signed* /*elf_section_index*/,
|
2967
|
+
Dwarf_Unsigned* /*length*/,
|
2968
|
+
Dwarf_Error* /*error*/);
|
2969
|
+
|
2970
|
+
int dwarf_get_relocation_info_count(
|
2971
|
+
Dwarf_P_Debug /*dbg*/,
|
2972
|
+
Dwarf_Unsigned * /*count_of_relocation_sections*/,
|
2973
|
+
int * /*drd_buffer_version*/,
|
2974
|
+
Dwarf_Error* /*error*/);
|
2975
|
+
|
2976
|
+
int dwarf_get_relocation_info(
|
2977
|
+
Dwarf_P_Debug /*dbg*/,
|
2978
|
+
Dwarf_Signed * /*elf_section_index*/,
|
2979
|
+
Dwarf_Signed * /*elf_section_index_link*/,
|
2980
|
+
Dwarf_Unsigned * /*relocation_buffer_count*/,
|
2981
|
+
Dwarf_Relocation_Data * /*reldata_buffer*/,
|
2982
|
+
Dwarf_Error* /*error*/);
|
2983
|
+
|
2984
|
+
/* v1: no drd_length field, enum explicit */
|
2985
|
+
/* v2: has the drd_length field, enum value in uchar member */
|
2986
|
+
#define DWARF_DRD_BUFFER_VERSION 2
|
2987
|
+
|
2988
|
+
/* Markers are not written to DWARF2/3/4, they are user
|
2989
|
+
defined and may be used for any purpose.
|
2990
|
+
*/
|
2991
|
+
Dwarf_Signed dwarf_get_die_markers(
|
2992
|
+
Dwarf_P_Debug /*dbg*/,
|
2993
|
+
Dwarf_P_Marker * /*marker_list*/,
|
2994
|
+
Dwarf_Unsigned * /*marker_count*/,
|
2995
|
+
Dwarf_Error * /*error*/);
|
2996
|
+
|
2997
|
+
int dwarf_get_string_attributes_count(Dwarf_P_Debug,
|
2998
|
+
Dwarf_Unsigned *,
|
2999
|
+
int *,
|
3000
|
+
Dwarf_Error *);
|
3001
|
+
|
3002
|
+
int dwarf_get_string_attributes_info(Dwarf_P_Debug,
|
3003
|
+
Dwarf_Signed *,
|
3004
|
+
Dwarf_Unsigned *,
|
3005
|
+
Dwarf_P_String_Attr *,
|
3006
|
+
Dwarf_Error *);
|
3007
|
+
|
3008
|
+
void dwarf_reset_section_bytes(Dwarf_P_Debug /*dbg*/);
|
3009
|
+
|
3010
|
+
Dwarf_Unsigned dwarf_producer_finish(Dwarf_P_Debug /*dbg*/,
|
3011
|
+
Dwarf_Error* /*error*/);
|
3012
|
+
|
3013
|
+
/* Producer attribute addition functions. */
|
3014
|
+
Dwarf_P_Attribute dwarf_add_AT_targ_address(Dwarf_P_Debug /*dbg*/,
|
3015
|
+
Dwarf_P_Die /*ownerdie*/,
|
3016
|
+
Dwarf_Half /*attr*/,
|
3017
|
+
Dwarf_Unsigned /*pc_value*/,
|
3018
|
+
Dwarf_Signed /*sym_index*/,
|
3019
|
+
Dwarf_Error* /*error*/);
|
3020
|
+
|
3021
|
+
Dwarf_P_Attribute dwarf_add_AT_block(Dwarf_P_Debug /*dbg*/,
|
3022
|
+
Dwarf_P_Die /*ownerdie*/,
|
3023
|
+
Dwarf_Half /*attr*/,
|
3024
|
+
Dwarf_Small* /*block_data*/,
|
3025
|
+
Dwarf_Unsigned /*block_len*/,
|
3026
|
+
Dwarf_Error* /*error*/);
|
3027
|
+
|
3028
|
+
Dwarf_P_Attribute dwarf_add_AT_targ_address_b(Dwarf_P_Debug /*dbg*/,
|
3029
|
+
Dwarf_P_Die /*ownerdie*/,
|
3030
|
+
Dwarf_Half /*attr*/,
|
3031
|
+
Dwarf_Unsigned /*pc_value*/,
|
3032
|
+
Dwarf_Unsigned /*sym_index*/,
|
3033
|
+
Dwarf_Error* /*error*/);
|
3034
|
+
|
3035
|
+
Dwarf_P_Attribute dwarf_add_AT_ref_address(Dwarf_P_Debug /*dbg*/,
|
3036
|
+
Dwarf_P_Die /*ownerdie*/,
|
3037
|
+
Dwarf_Half /*attr*/,
|
3038
|
+
Dwarf_Unsigned /*pc_value*/,
|
3039
|
+
Dwarf_Unsigned /*sym_index*/,
|
3040
|
+
Dwarf_Error* /*error*/);
|
3041
|
+
|
3042
|
+
Dwarf_P_Attribute dwarf_add_AT_unsigned_const(Dwarf_P_Debug /*dbg*/,
|
3043
|
+
Dwarf_P_Die /*ownerdie*/,
|
3044
|
+
Dwarf_Half /*attr*/,
|
3045
|
+
Dwarf_Unsigned /*value*/,
|
3046
|
+
Dwarf_Error* /*error*/);
|
3047
|
+
|
3048
|
+
Dwarf_P_Attribute dwarf_add_AT_signed_const(Dwarf_P_Debug /*dbg*/,
|
3049
|
+
Dwarf_P_Die /*ownerdie*/,
|
3050
|
+
Dwarf_Half /*attr*/,
|
3051
|
+
Dwarf_Signed /*value*/,
|
3052
|
+
Dwarf_Error* /*error*/);
|
3053
|
+
|
3054
|
+
Dwarf_P_Attribute dwarf_add_AT_reference(Dwarf_P_Debug /*dbg*/,
|
3055
|
+
Dwarf_P_Die /*ownerdie*/,
|
3056
|
+
Dwarf_Half /*attr*/,
|
3057
|
+
Dwarf_P_Die /*otherdie*/,
|
3058
|
+
Dwarf_Error* /*error*/);
|
3059
|
+
|
3060
|
+
/* dwarf_add_AT_reference_b allows otherdie to be NULL with
|
3061
|
+
the assumption the caller will then later call
|
3062
|
+
dwarf_fixup_AT_reference_die() with a non-null target die.
|
3063
|
+
New 22 October, 2013
|
3064
|
+
*/
|
3065
|
+
Dwarf_P_Attribute dwarf_add_AT_reference_b(Dwarf_P_Debug /*dbg*/,
|
3066
|
+
Dwarf_P_Die /*ownerdie*/,
|
3067
|
+
Dwarf_Half /*attr*/,
|
3068
|
+
Dwarf_P_Die /*otherdie*/,
|
3069
|
+
Dwarf_Error* /*error*/);
|
3070
|
+
|
3071
|
+
/* The following is for out-of-order cu-local
|
3072
|
+
references. Allowing nominating the target Dwarf_P_Die
|
3073
|
+
after calling dwarf_add_AT_reference with a NULL otherdie
|
3074
|
+
after a single pass thru the DIE generation. Needed
|
3075
|
+
for forward-references.
|
3076
|
+
New 22 October, 2013.
|
3077
|
+
*/
|
3078
|
+
int
|
3079
|
+
dwarf_fixup_AT_reference_die(Dwarf_P_Debug /*dbg */,
|
3080
|
+
Dwarf_Half /* attrnum */,
|
3081
|
+
Dwarf_P_Die /* sourcedie*/,
|
3082
|
+
Dwarf_P_Die /* targetdie*/,
|
3083
|
+
Dwarf_Error * /*error*/);
|
3084
|
+
|
3085
|
+
|
3086
|
+
Dwarf_P_Attribute dwarf_add_AT_dataref(
|
3087
|
+
Dwarf_P_Debug /* dbg*/,
|
3088
|
+
Dwarf_P_Die /*ownerdie*/,
|
3089
|
+
Dwarf_Half /*attr*/,
|
3090
|
+
Dwarf_Unsigned /*pcvalue*/,
|
3091
|
+
Dwarf_Unsigned /*sym_index*/,
|
3092
|
+
Dwarf_Error* /*error*/);
|
3093
|
+
|
3094
|
+
Dwarf_P_Attribute dwarf_add_AT_const_value_string(Dwarf_P_Die /*ownerdie*/,
|
3095
|
+
char* /*string_value*/,
|
3096
|
+
Dwarf_Error* /*error*/);
|
3097
|
+
|
3098
|
+
Dwarf_P_Attribute dwarf_add_AT_location_expr(Dwarf_P_Debug /*dbg*/,
|
3099
|
+
Dwarf_P_Die /*ownerdie*/,
|
3100
|
+
Dwarf_Half /*attr*/,
|
3101
|
+
Dwarf_P_Expr /*loc_expr*/,
|
3102
|
+
Dwarf_Error* /*error*/);
|
3103
|
+
|
3104
|
+
Dwarf_P_Attribute dwarf_add_AT_string(Dwarf_P_Debug /*dbg*/,
|
3105
|
+
Dwarf_P_Die /*ownerdie*/,
|
3106
|
+
Dwarf_Half /*attr*/,
|
3107
|
+
char* /*string*/,
|
3108
|
+
Dwarf_Error* /*error*/);
|
3109
|
+
|
3110
|
+
Dwarf_P_Attribute dwarf_add_AT_flag(Dwarf_P_Debug /*dbg*/,
|
3111
|
+
Dwarf_P_Die /*ownerdie*/,
|
3112
|
+
Dwarf_Half /*attr*/,
|
3113
|
+
Dwarf_Small /*flag*/,
|
3114
|
+
Dwarf_Error* /*error*/);
|
3115
|
+
|
3116
|
+
Dwarf_P_Attribute dwarf_add_AT_producer(Dwarf_P_Die /*ownerdie*/,
|
3117
|
+
char* /*producer_string*/,
|
3118
|
+
Dwarf_Error* /*error*/);
|
3119
|
+
|
3120
|
+
/* August 2013 sleb creator. For any attribute. */
|
3121
|
+
Dwarf_P_Attribute dwarf_add_AT_any_value_sleb(Dwarf_P_Die /*ownerdie*/,
|
3122
|
+
Dwarf_Half /*attrnum*/,
|
3123
|
+
Dwarf_Signed /*signed_value*/,
|
3124
|
+
Dwarf_Error * /*error*/);
|
3125
|
+
|
3126
|
+
/* Original sleb creator. Only for DW_AT_const_value. */
|
3127
|
+
Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die /*ownerdie*/,
|
3128
|
+
Dwarf_Signed /*signed_value*/,
|
3129
|
+
Dwarf_Error* /*error*/);
|
3130
|
+
|
3131
|
+
/* August 2013 uleb creator. For any attribute. */
|
3132
|
+
Dwarf_P_Attribute dwarf_add_AT_any_value_uleb(Dwarf_P_Die /*ownerdie*/,
|
3133
|
+
Dwarf_Half /*attrnum*/,
|
3134
|
+
Dwarf_Unsigned /*signed_value*/,
|
3135
|
+
Dwarf_Error * /*error*/);
|
3136
|
+
|
3137
|
+
/* Original uleb creator. Only for DW_AT_const_value. */
|
3138
|
+
Dwarf_P_Attribute dwarf_add_AT_const_value_unsignedint(
|
3139
|
+
Dwarf_P_Die /*ownerdie*/,
|
3140
|
+
Dwarf_Unsigned /*unsigned_value*/,
|
3141
|
+
Dwarf_Error* /*error*/);
|
3142
|
+
|
3143
|
+
Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die /*ownerdie*/,
|
3144
|
+
char* /*current_working_directory*/,
|
3145
|
+
Dwarf_Error* /*error*/);
|
3146
|
+
|
3147
|
+
Dwarf_P_Attribute dwarf_add_AT_name(Dwarf_P_Die /*die*/,
|
3148
|
+
char* /*name*/,
|
3149
|
+
Dwarf_Error* /*error*/);
|
3150
|
+
|
3151
|
+
Dwarf_P_Attribute
|
3152
|
+
dwarf_add_AT_with_ref_sig8(
|
3153
|
+
Dwarf_P_Die /*ownerdie */,
|
3154
|
+
Dwarf_Half /*attrnum */,
|
3155
|
+
const Dwarf_Sig8 * /*sig8_in*/,
|
3156
|
+
Dwarf_Error * /*error*/);
|
3157
|
+
|
3158
|
+
|
3159
|
+
/* Producer line creation functions (.debug_line) */
|
3160
|
+
Dwarf_Unsigned dwarf_add_directory_decl(Dwarf_P_Debug /*dbg*/,
|
3161
|
+
char* /*name*/,
|
3162
|
+
Dwarf_Error* /*error*/);
|
3163
|
+
|
3164
|
+
Dwarf_Unsigned dwarf_add_file_decl(Dwarf_P_Debug /*dbg*/,
|
3165
|
+
char* /*name*/,
|
3166
|
+
Dwarf_Unsigned /*dir_index*/,
|
3167
|
+
Dwarf_Unsigned /*time_last_modified*/,
|
3168
|
+
Dwarf_Unsigned /*length*/,
|
3169
|
+
Dwarf_Error* /*error*/);
|
3170
|
+
|
3171
|
+
Dwarf_Unsigned dwarf_add_line_entry_b(Dwarf_P_Debug /*dbg*/,
|
3172
|
+
Dwarf_Unsigned /*file_index*/,
|
3173
|
+
Dwarf_Addr /*code_address*/,
|
3174
|
+
Dwarf_Unsigned /*lineno*/,
|
3175
|
+
Dwarf_Signed /*column_number*/,
|
3176
|
+
Dwarf_Bool /*is_source_stmt_begin*/,
|
3177
|
+
Dwarf_Bool /*is_basic_block_begin*/,
|
3178
|
+
Dwarf_Bool /*is_epilogue_begin*/,
|
3179
|
+
Dwarf_Bool /*is_prologue_end*/,
|
3180
|
+
Dwarf_Unsigned /*isa*/,
|
3181
|
+
Dwarf_Unsigned /*discriminator*/,
|
3182
|
+
Dwarf_Error* /*error*/);
|
3183
|
+
Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/,
|
3184
|
+
Dwarf_Unsigned /*file_index*/,
|
3185
|
+
Dwarf_Addr /*code_address*/,
|
3186
|
+
Dwarf_Unsigned /*lineno*/,
|
3187
|
+
Dwarf_Signed /*column_number*/,
|
3188
|
+
Dwarf_Bool /*is_source_stmt_begin*/,
|
3189
|
+
Dwarf_Bool /*is_basic_block_begin*/,
|
3190
|
+
Dwarf_Error* /*error*/);
|
3191
|
+
|
3192
|
+
Dwarf_Unsigned dwarf_lne_set_address(Dwarf_P_Debug /*dbg*/,
|
3193
|
+
Dwarf_Unsigned /*offset*/,
|
3194
|
+
Dwarf_Unsigned /*symbol_index*/,
|
3195
|
+
Dwarf_Error* /*error*/);
|
3196
|
+
|
3197
|
+
Dwarf_Unsigned dwarf_lne_end_sequence(Dwarf_P_Debug /*dbg*/,
|
3198
|
+
Dwarf_Addr /*end_address*/,
|
3199
|
+
Dwarf_Error* /*error*/);
|
3200
|
+
|
3201
|
+
/* Producer .debug_frame functions */
|
3202
|
+
Dwarf_Unsigned dwarf_add_frame_cie(Dwarf_P_Debug /*dbg*/,
|
3203
|
+
char* /*augmenter*/,
|
3204
|
+
Dwarf_Small /*code_alignment_factor*/,
|
3205
|
+
Dwarf_Small /*data_alignment_factor*/,
|
3206
|
+
Dwarf_Small /*return_address_reg*/,
|
3207
|
+
Dwarf_Ptr /*initialization_bytes*/,
|
3208
|
+
Dwarf_Unsigned /*init_byte_len*/,
|
3209
|
+
Dwarf_Error* /*error*/);
|
3210
|
+
|
3211
|
+
Dwarf_Unsigned dwarf_add_frame_fde(
|
3212
|
+
Dwarf_P_Debug /*dbg*/,
|
3213
|
+
Dwarf_P_Fde /*fde*/,
|
3214
|
+
Dwarf_P_Die /*corresponding subprogram die*/,
|
3215
|
+
Dwarf_Unsigned /*cie_to_use*/,
|
3216
|
+
Dwarf_Unsigned /*virt_addr_of_described_code*/,
|
3217
|
+
Dwarf_Unsigned /*length_of_code*/,
|
3218
|
+
Dwarf_Unsigned /*symbol_index*/,
|
3219
|
+
Dwarf_Error* /*error*/);
|
3220
|
+
|
3221
|
+
Dwarf_Unsigned dwarf_add_frame_fde_b(
|
3222
|
+
Dwarf_P_Debug /*dbg*/,
|
3223
|
+
Dwarf_P_Fde /*fde*/,
|
3224
|
+
Dwarf_P_Die /*die*/,
|
3225
|
+
Dwarf_Unsigned /*cie*/,
|
3226
|
+
Dwarf_Addr /*virt_addr*/,
|
3227
|
+
Dwarf_Unsigned /*code_len*/,
|
3228
|
+
Dwarf_Unsigned /*sym_idx*/,
|
3229
|
+
Dwarf_Unsigned /*sym_idx_of_end*/,
|
3230
|
+
Dwarf_Addr /*offset_from_end_sym*/,
|
3231
|
+
Dwarf_Error* /*error*/);
|
3232
|
+
|
3233
|
+
Dwarf_Unsigned dwarf_add_frame_info_b(
|
3234
|
+
Dwarf_P_Debug dbg /*dbg*/,
|
3235
|
+
Dwarf_P_Fde /*fde*/,
|
3236
|
+
Dwarf_P_Die /*die*/,
|
3237
|
+
Dwarf_Unsigned /*cie*/,
|
3238
|
+
Dwarf_Addr /*virt_addr*/,
|
3239
|
+
Dwarf_Unsigned /*code_len*/,
|
3240
|
+
Dwarf_Unsigned /*symidx*/,
|
3241
|
+
Dwarf_Unsigned /*end_symbol */,
|
3242
|
+
Dwarf_Addr /*offset_from_end_symbol */,
|
3243
|
+
Dwarf_Signed /*offset_into_exception_tables*/,
|
3244
|
+
Dwarf_Unsigned /*exception_table_symbol*/,
|
3245
|
+
Dwarf_Error* /*error*/);
|
3246
|
+
|
3247
|
+
Dwarf_Unsigned dwarf_add_frame_info(
|
3248
|
+
Dwarf_P_Debug dbg /*dbg*/,
|
3249
|
+
Dwarf_P_Fde /*fde*/,
|
3250
|
+
Dwarf_P_Die /*die*/,
|
3251
|
+
Dwarf_Unsigned /*cie*/,
|
3252
|
+
Dwarf_Addr /*virt_addr*/,
|
3253
|
+
Dwarf_Unsigned /*code_len*/,
|
3254
|
+
Dwarf_Unsigned /*symidx*/,
|
3255
|
+
Dwarf_Signed /*offset_into_exception_tables*/,
|
3256
|
+
Dwarf_Unsigned /*exception_table_symbol*/,
|
3257
|
+
Dwarf_Error* /*error*/);
|
3258
|
+
|
3259
|
+
Dwarf_P_Fde dwarf_add_fde_inst(
|
3260
|
+
Dwarf_P_Fde /*fde*/,
|
3261
|
+
Dwarf_Small /*op*/,
|
3262
|
+
Dwarf_Unsigned /*val1*/,
|
3263
|
+
Dwarf_Unsigned /*val2*/,
|
3264
|
+
Dwarf_Error* /*error*/);
|
3265
|
+
|
3266
|
+
/* New September 17, 2009 */
|
3267
|
+
int dwarf_insert_fde_inst_bytes(
|
3268
|
+
Dwarf_P_Debug /*dbg*/,
|
3269
|
+
Dwarf_P_Fde /*fde*/,
|
3270
|
+
Dwarf_Unsigned /*len*/,
|
3271
|
+
Dwarf_Ptr /*ibytes*/,
|
3272
|
+
Dwarf_Error* /*error*/);
|
3273
|
+
|
3274
|
+
|
3275
|
+
Dwarf_P_Fde dwarf_new_fde(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
|
3276
|
+
|
3277
|
+
Dwarf_P_Fde dwarf_fde_cfa_offset(
|
3278
|
+
Dwarf_P_Fde /*fde*/,
|
3279
|
+
Dwarf_Unsigned /*register_number*/,
|
3280
|
+
Dwarf_Signed /*offset*/,
|
3281
|
+
Dwarf_Error* /*error*/);
|
3282
|
+
|
3283
|
+
/* die creation & addition routines */
|
3284
|
+
Dwarf_P_Die dwarf_new_die(
|
3285
|
+
Dwarf_P_Debug /*dbg*/,
|
3286
|
+
Dwarf_Tag /*tag*/,
|
3287
|
+
Dwarf_P_Die /*parent*/,
|
3288
|
+
Dwarf_P_Die /*child*/,
|
3289
|
+
Dwarf_P_Die /*left */,
|
3290
|
+
Dwarf_P_Die /*right*/,
|
3291
|
+
Dwarf_Error* /*error*/);
|
3292
|
+
|
3293
|
+
Dwarf_Unsigned dwarf_add_die_to_debug(
|
3294
|
+
Dwarf_P_Debug /*dbg*/,
|
3295
|
+
Dwarf_P_Die /*die*/,
|
3296
|
+
Dwarf_Error* /*error*/);
|
3297
|
+
|
3298
|
+
/* Markers are not written to DWARF2/3/4, they are user
|
3299
|
+
defined and may be used for any purpose.
|
3300
|
+
*/
|
3301
|
+
Dwarf_Unsigned dwarf_add_die_marker(
|
3302
|
+
Dwarf_P_Debug /*dbg*/,
|
3303
|
+
Dwarf_P_Die /*die*/,
|
3304
|
+
Dwarf_Unsigned /*marker*/,
|
3305
|
+
Dwarf_Error * /*error*/);
|
3306
|
+
|
3307
|
+
Dwarf_Unsigned dwarf_get_die_marker(
|
3308
|
+
Dwarf_P_Debug /*dbg*/,
|
3309
|
+
Dwarf_P_Die /*die*/,
|
3310
|
+
Dwarf_Unsigned * /*marker*/,
|
3311
|
+
Dwarf_Error * /*error*/);
|
3312
|
+
|
3313
|
+
Dwarf_P_Die dwarf_die_link(
|
3314
|
+
Dwarf_P_Die /*die*/,
|
3315
|
+
Dwarf_P_Die /*parent*/,
|
3316
|
+
Dwarf_P_Die /*child*/,
|
3317
|
+
Dwarf_P_Die /*left*/,
|
3318
|
+
Dwarf_P_Die /*right*/,
|
3319
|
+
Dwarf_Error* /*error*/);
|
3320
|
+
|
3321
|
+
void dwarf_dealloc_compressed_block(
|
3322
|
+
Dwarf_P_Debug,
|
3323
|
+
void *
|
3324
|
+
);
|
3325
|
+
|
3326
|
+
/* Call this passing in return value from dwarf_uncompress_integer_block()
|
3327
|
+
to free the space the decompression allocated. */
|
3328
|
+
void dwarf_dealloc_uncompressed_block(
|
3329
|
+
Dwarf_Debug,
|
3330
|
+
void *
|
3331
|
+
);
|
3332
|
+
|
3333
|
+
void * dwarf_compress_integer_block(
|
3334
|
+
Dwarf_P_Debug, /* dbg */
|
3335
|
+
Dwarf_Bool, /* signed==true (or unsigned) */
|
3336
|
+
Dwarf_Small, /* size of integer units: 8, 16, 32, 64 */
|
3337
|
+
void*, /* data */
|
3338
|
+
Dwarf_Unsigned, /* number of elements */
|
3339
|
+
Dwarf_Unsigned*, /* number of bytes in output block */
|
3340
|
+
Dwarf_Error* /* error */
|
3341
|
+
);
|
3342
|
+
|
3343
|
+
/* Decode an array of signed leb integers (so of course the
|
3344
|
+
array is not composed of fixed length values, but is instead
|
3345
|
+
a sequence of sleb values).
|
3346
|
+
Returns a DW_DLV_BADADDR on error.
|
3347
|
+
Otherwise returns a pointer to an array of 32bit integers.
|
3348
|
+
The signed argument must be non-zero (the decode
|
3349
|
+
assumes sleb integers in the input data) at this time.
|
3350
|
+
Size of integer units must be 32 (32 bits each) at this time.
|
3351
|
+
Number of bytes in block is a byte count (not array count).
|
3352
|
+
Returns number of units in output block (ie, number of elements
|
3353
|
+
of the array that the return value points to) thru the argument. */
|
3354
|
+
void * dwarf_uncompress_integer_block(
|
3355
|
+
Dwarf_Debug, /* dbg */
|
3356
|
+
Dwarf_Bool, /* signed==true (or unsigned) */
|
3357
|
+
Dwarf_Small, /* size of integer units: 8, 16, 32, 64 */
|
3358
|
+
void*, /* input data */
|
3359
|
+
Dwarf_Unsigned, /* number of bytes in input */
|
3360
|
+
Dwarf_Unsigned*, /* number of units in output block */
|
3361
|
+
Dwarf_Error* /* error */
|
3362
|
+
);
|
3363
|
+
|
3364
|
+
/* Operations to create location expressions. */
|
3365
|
+
Dwarf_P_Expr dwarf_new_expr(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
|
3366
|
+
|
3367
|
+
void dwarf_expr_reset(
|
3368
|
+
Dwarf_P_Expr /*expr*/,
|
3369
|
+
Dwarf_Error* /*error*/);
|
3370
|
+
|
3371
|
+
Dwarf_Unsigned dwarf_add_expr_gen(
|
3372
|
+
Dwarf_P_Expr /*expr*/,
|
3373
|
+
Dwarf_Small /*opcode*/,
|
3374
|
+
Dwarf_Unsigned /*val1*/,
|
3375
|
+
Dwarf_Unsigned /*val2*/,
|
3376
|
+
Dwarf_Error* /*error*/);
|
3377
|
+
|
3378
|
+
Dwarf_Unsigned dwarf_add_expr_addr(
|
3379
|
+
Dwarf_P_Expr /*expr*/,
|
3380
|
+
Dwarf_Unsigned /*addr*/,
|
3381
|
+
Dwarf_Signed /*sym_index*/,
|
3382
|
+
Dwarf_Error* /*error*/);
|
3383
|
+
|
3384
|
+
Dwarf_Unsigned dwarf_add_expr_addr_b(
|
3385
|
+
Dwarf_P_Expr /*expr*/,
|
3386
|
+
Dwarf_Unsigned /*addr*/,
|
3387
|
+
Dwarf_Unsigned /*sym_index*/,
|
3388
|
+
Dwarf_Error* /*error*/);
|
3389
|
+
|
3390
|
+
Dwarf_Unsigned dwarf_expr_current_offset(
|
3391
|
+
Dwarf_P_Expr /*expr*/,
|
3392
|
+
Dwarf_Error* /*error*/);
|
3393
|
+
|
3394
|
+
Dwarf_Addr dwarf_expr_into_block(
|
3395
|
+
Dwarf_P_Expr /*expr*/,
|
3396
|
+
Dwarf_Unsigned* /*length*/,
|
3397
|
+
Dwarf_Error* /*error*/);
|
3398
|
+
|
3399
|
+
Dwarf_Unsigned dwarf_add_arange(Dwarf_P_Debug /*dbg*/,
|
3400
|
+
Dwarf_Addr /*begin_address*/,
|
3401
|
+
Dwarf_Unsigned /*length*/,
|
3402
|
+
Dwarf_Signed /*symbol_index*/,
|
3403
|
+
Dwarf_Error* /*error*/);
|
3404
|
+
|
3405
|
+
Dwarf_Unsigned dwarf_add_arange_b(
|
3406
|
+
Dwarf_P_Debug /*dbg*/,
|
3407
|
+
Dwarf_Addr /*begin_address*/,
|
3408
|
+
Dwarf_Unsigned /*length*/,
|
3409
|
+
Dwarf_Unsigned /*symbol_index*/,
|
3410
|
+
Dwarf_Unsigned /*end_symbol_index*/,
|
3411
|
+
Dwarf_Addr /*offset_from_end_symbol*/,
|
3412
|
+
Dwarf_Error * /*error*/);
|
3413
|
+
|
3414
|
+
Dwarf_Unsigned dwarf_add_pubname(
|
3415
|
+
Dwarf_P_Debug /*dbg*/,
|
3416
|
+
Dwarf_P_Die /*die*/,
|
3417
|
+
char* /*pubname_name*/,
|
3418
|
+
Dwarf_Error* /*error*/);
|
3419
|
+
|
3420
|
+
/* Added 17 October 2013. Introduced in DWARF3. */
|
3421
|
+
Dwarf_Unsigned dwarf_add_pubtype(
|
3422
|
+
Dwarf_P_Debug /*dbg*/,
|
3423
|
+
Dwarf_P_Die /*die*/,
|
3424
|
+
char* /*pubtype_name*/,
|
3425
|
+
Dwarf_Error* /*error*/);
|
3426
|
+
|
3427
|
+
|
3428
|
+
Dwarf_Unsigned dwarf_add_funcname(
|
3429
|
+
Dwarf_P_Debug /*dbg*/,
|
3430
|
+
Dwarf_P_Die /*die*/,
|
3431
|
+
char* /*func_name*/,
|
3432
|
+
Dwarf_Error* /*error*/);
|
3433
|
+
|
3434
|
+
Dwarf_Unsigned dwarf_add_typename(
|
3435
|
+
Dwarf_P_Debug /*dbg*/,
|
3436
|
+
Dwarf_P_Die /*die*/,
|
3437
|
+
char* /*type_name*/,
|
3438
|
+
Dwarf_Error* /*error*/);
|
3439
|
+
|
3440
|
+
Dwarf_Unsigned dwarf_add_varname(
|
3441
|
+
Dwarf_P_Debug /*dbg*/,
|
3442
|
+
Dwarf_P_Die /*die*/,
|
3443
|
+
char* /*var_name*/,
|
3444
|
+
Dwarf_Error* /*error*/);
|
3445
|
+
|
3446
|
+
Dwarf_Unsigned dwarf_add_weakname(
|
3447
|
+
Dwarf_P_Debug /*dbg*/,
|
3448
|
+
Dwarf_P_Die /*die*/,
|
3449
|
+
char* /*weak_name*/,
|
3450
|
+
Dwarf_Error* /*error*/);
|
3451
|
+
|
3452
|
+
/* .debug_macinfo producer functions
|
3453
|
+
Functions must be called in right order: the section is output
|
3454
|
+
In the order these are presented.
|
3455
|
+
*/
|
3456
|
+
int dwarf_def_macro(Dwarf_P_Debug /*dbg*/,
|
3457
|
+
Dwarf_Unsigned /*line*/,
|
3458
|
+
char * /*macname, with (arglist), no space before (*/,
|
3459
|
+
char * /*macvalue*/,
|
3460
|
+
Dwarf_Error* /*error*/);
|
3461
|
+
|
3462
|
+
int dwarf_undef_macro(Dwarf_P_Debug /*dbg*/,
|
3463
|
+
Dwarf_Unsigned /*line*/,
|
3464
|
+
char * /*macname, no arglist, of course*/,
|
3465
|
+
Dwarf_Error* /*error*/);
|
3466
|
+
|
3467
|
+
int dwarf_start_macro_file(Dwarf_P_Debug /*dbg*/,
|
3468
|
+
Dwarf_Unsigned /*fileindex*/,
|
3469
|
+
Dwarf_Unsigned /*linenumber*/,
|
3470
|
+
Dwarf_Error* /*error*/);
|
3471
|
+
|
3472
|
+
int dwarf_end_macro_file(Dwarf_P_Debug /*dbg*/,
|
3473
|
+
Dwarf_Error* /*error*/);
|
3474
|
+
|
3475
|
+
int dwarf_vendor_ext(Dwarf_P_Debug /*dbg*/,
|
3476
|
+
Dwarf_Unsigned /*constant*/,
|
3477
|
+
char * /*string*/,
|
3478
|
+
Dwarf_Error* /*error*/);
|
3479
|
+
|
3480
|
+
/* end macinfo producer functions */
|
3481
|
+
|
3482
|
+
int dwarf_attr_offset(Dwarf_Die /*die*/,
|
3483
|
+
Dwarf_Attribute /*attr of above die*/,
|
3484
|
+
Dwarf_Off * /*returns offset thru this ptr */,
|
3485
|
+
Dwarf_Error * /*error*/);
|
3486
|
+
|
3487
|
+
/* This is a hack so clients can verify offsets.
|
3488
|
+
Added April 2005 so that debugger can detect broken offsets
|
3489
|
+
(which happened in an IRIX executable larger than 2GB
|
3490
|
+
with MIPSpro 7.3.1.3 toolchain.).
|
3491
|
+
*/
|
3492
|
+
int
|
3493
|
+
dwarf_get_section_max_offsets(Dwarf_Debug /*dbg*/,
|
3494
|
+
Dwarf_Unsigned * /*debug_info_size*/,
|
3495
|
+
Dwarf_Unsigned * /*debug_abbrev_size*/,
|
3496
|
+
Dwarf_Unsigned * /*debug_line_size*/,
|
3497
|
+
Dwarf_Unsigned * /*debug_loc_size*/,
|
3498
|
+
Dwarf_Unsigned * /*debug_aranges_size*/,
|
3499
|
+
Dwarf_Unsigned * /*debug_macinfo_size*/,
|
3500
|
+
Dwarf_Unsigned * /*debug_pubnames_size*/,
|
3501
|
+
Dwarf_Unsigned * /*debug_str_size*/,
|
3502
|
+
Dwarf_Unsigned * /*debug_frame_size*/,
|
3503
|
+
Dwarf_Unsigned * /*debug_ranges_size*/,
|
3504
|
+
Dwarf_Unsigned * /*debug_pubtypes_size*/);
|
3505
|
+
|
3506
|
+
/* New October 2011., adds .debug_types section to the sizes
|
3507
|
+
returned. */
|
3508
|
+
int
|
3509
|
+
dwarf_get_section_max_offsets_b(Dwarf_Debug /*dbg*/,
|
3510
|
+
|
3511
|
+
Dwarf_Unsigned * /*debug_info_size*/,
|
3512
|
+
Dwarf_Unsigned * /*debug_abbrev_size*/,
|
3513
|
+
Dwarf_Unsigned * /*debug_line_size*/,
|
3514
|
+
Dwarf_Unsigned * /*debug_loc_size*/,
|
3515
|
+
Dwarf_Unsigned * /*debug_aranges_size*/,
|
3516
|
+
Dwarf_Unsigned * /*debug_macinfo_size*/,
|
3517
|
+
Dwarf_Unsigned * /*debug_pubnames_size*/,
|
3518
|
+
Dwarf_Unsigned * /*debug_str_size*/,
|
3519
|
+
Dwarf_Unsigned * /*debug_frame_size*/,
|
3520
|
+
Dwarf_Unsigned * /*debug_ranges_size*/,
|
3521
|
+
Dwarf_Unsigned * /*debug_pubtypes_size*/,
|
3522
|
+
Dwarf_Unsigned * /*debug_types_size*/);
|
3523
|
+
|
3524
|
+
/* The 'set' calls here return the original (before any change
|
3525
|
+
by these set routines) of the respective fields. */
|
3526
|
+
/* Multiple releases spelled 'initial' as 'inital' .
|
3527
|
+
The 'inital' spelling should not be used. */
|
3528
|
+
Dwarf_Half dwarf_set_frame_rule_inital_value(Dwarf_Debug /*dbg*/,
|
3529
|
+
Dwarf_Half /*value*/);
|
3530
|
+
/* Additional interface with correct 'initial' spelling. */
|
3531
|
+
/* It is likely you will want to call the following 6 functions
|
3532
|
+
before accessing any frame information. All are useful
|
3533
|
+
to tailor handling of pseudo-registers needed to turn
|
3534
|
+
frame operation references into simpler forms and to
|
3535
|
+
reflect ABI specific data. Of course altering libdwarf.h
|
3536
|
+
and dwarf.h allow the same capabilities, but such header changes
|
3537
|
+
do not let one change these values at runtime. */
|
3538
|
+
Dwarf_Half dwarf_set_frame_rule_initial_value(Dwarf_Debug /*dbg*/,
|
3539
|
+
Dwarf_Half /*value*/);
|
3540
|
+
Dwarf_Half dwarf_set_frame_rule_table_size(Dwarf_Debug /*dbg*/,
|
3541
|
+
Dwarf_Half /*value*/);
|
3542
|
+
Dwarf_Half dwarf_set_frame_cfa_value(Dwarf_Debug /*dbg*/,
|
3543
|
+
Dwarf_Half /*value*/);
|
3544
|
+
Dwarf_Half dwarf_set_frame_same_value(Dwarf_Debug /*dbg*/,
|
3545
|
+
Dwarf_Half /*value*/);
|
3546
|
+
Dwarf_Half dwarf_set_frame_undefined_value(Dwarf_Debug /*dbg*/,
|
3547
|
+
Dwarf_Half /*value*/);
|
3548
|
+
/* dwarf_set_default_address_size only sets 'value' if value is
|
3549
|
+
greater than zero. */
|
3550
|
+
Dwarf_Small dwarf_set_default_address_size(Dwarf_Debug /*dbg*/,
|
3551
|
+
Dwarf_Small /* value */);
|
3552
|
+
|
3553
|
+
/* As of April 27, 2009, this version with no diepointer is
|
3554
|
+
obsolete though supported. Use dwarf_get_ranges_a() instead. */
|
3555
|
+
int dwarf_get_ranges(Dwarf_Debug /*dbg*/,
|
3556
|
+
Dwarf_Off /*rangesoffset*/,
|
3557
|
+
Dwarf_Ranges ** /*rangesbuf*/,
|
3558
|
+
Dwarf_Signed * /*listlen*/,
|
3559
|
+
Dwarf_Unsigned * /*bytecount*/,
|
3560
|
+
Dwarf_Error * /*error*/);
|
3561
|
+
|
3562
|
+
/* This adds the address_size argument. New April 27, 2009 */
|
3563
|
+
int dwarf_get_ranges_a(Dwarf_Debug /*dbg*/,
|
3564
|
+
Dwarf_Off /*rangesoffset*/,
|
3565
|
+
Dwarf_Die /* diepointer */,
|
3566
|
+
Dwarf_Ranges ** /*rangesbuf*/,
|
3567
|
+
Dwarf_Signed * /*listlen*/,
|
3568
|
+
Dwarf_Unsigned * /*bytecount*/,
|
3569
|
+
Dwarf_Error * /*error*/);
|
3570
|
+
|
3571
|
+
void dwarf_ranges_dealloc(Dwarf_Debug /*dbg*/,
|
3572
|
+
Dwarf_Ranges * /*rangesbuf*/,
|
3573
|
+
Dwarf_Signed /*rangecount*/);
|
3574
|
+
|
3575
|
+
/* The harmless error list is a circular buffer of
|
3576
|
+
errors we note but which do not stop us from processing
|
3577
|
+
the object. Created so dwarfdump or other tools
|
3578
|
+
can report such inconsequential errors without causing
|
3579
|
+
anything to stop early. */
|
3580
|
+
#define DW_HARMLESS_ERROR_CIRCULAR_LIST_DEFAULT_SIZE 4
|
3581
|
+
#define DW_HARMLESS_ERROR_MSG_STRING_SIZE 200
|
3582
|
+
/* User code supplies size of array of pointers errmsg_ptrs_array
|
3583
|
+
in count and the array of pointers (the pointers themselves
|
3584
|
+
need not be initialized).
|
3585
|
+
The pointers returned in the array of pointers
|
3586
|
+
are invalidated by ANY call to libdwarf.
|
3587
|
+
Use them before making another libdwarf call!
|
3588
|
+
The array of string pointers passed in always has
|
3589
|
+
a final null pointer, so if there are N pointers the
|
3590
|
+
and M actual strings, then MIN(M,N-1) pointers are
|
3591
|
+
set to point to error strings. The array of pointers
|
3592
|
+
to strings always terminates with a NULL pointer.
|
3593
|
+
If 'count' is passed in zero then errmsg_ptrs_array
|
3594
|
+
is not touched.
|
3595
|
+
|
3596
|
+
The function returns DW_DLV_NO_ENTRY if no harmless errors
|
3597
|
+
were noted so far. Returns DW_DLV_OK if there are errors.
|
3598
|
+
Never returns DW_DLV_ERROR.
|
3599
|
+
|
3600
|
+
Each call empties the error list (discarding all current entries).
|
3601
|
+
If newerr_count is non-NULL the count of harmless errors
|
3602
|
+
since the last call is returned through the pointer
|
3603
|
+
(some may have been discarded or not returned, it is a circular
|
3604
|
+
list...).
|
3605
|
+
If DW_DLV_NO_ENTRY is returned none of the arguments
|
3606
|
+
here are touched or used.
|
3607
|
+
*/
|
3608
|
+
int dwarf_get_harmless_error_list(Dwarf_Debug /*dbg*/,
|
3609
|
+
unsigned /*count*/,
|
3610
|
+
const char ** /*errmsg_ptrs_array*/,
|
3611
|
+
unsigned * /*newerr_count*/);
|
3612
|
+
|
3613
|
+
/* Insertion is only for testing the harmless error code, it is not
|
3614
|
+
necessarily useful otherwise. */
|
3615
|
+
void dwarf_insert_harmless_error(Dwarf_Debug /*dbg*/,
|
3616
|
+
char * /*newerror*/);
|
3617
|
+
|
3618
|
+
/* The size of the circular list of strings may be set
|
3619
|
+
and reset as needed. If it is shortened excess
|
3620
|
+
messages are simply dropped. It returns the previous
|
3621
|
+
size. If zero passed in the size is unchanged
|
3622
|
+
and it simply returns the current size */
|
3623
|
+
unsigned dwarf_set_harmless_error_list_size(Dwarf_Debug /*dbg*/,
|
3624
|
+
unsigned /*maxcount*/);
|
3625
|
+
/* The harmless error strings (if any) are freed when the dbg
|
3626
|
+
is dwarf_finish()ed. */
|
3627
|
+
|
3628
|
+
/* When the val_in is known these dwarf_get_TAG_name (etc)
|
3629
|
+
functions return the string corresponding to the val_in passed in
|
3630
|
+
through the pointer s_out and the value returned is DW_DLV_OK.
|
3631
|
+
The strings are in static storage
|
3632
|
+
and must not be freed.
|
3633
|
+
If DW_DLV_NO_ENTRY is returned the val_in is not known and
|
3634
|
+
*s_out is not set. DW_DLV_ERROR is never returned.*/
|
3635
|
+
|
3636
|
+
/* The following copied from a generated dwarf_names.h */
|
3637
|
+
|
3638
|
+
/* BEGIN FILE */
|
3639
|
+
|
3640
|
+
extern int dwarf_get_TAG_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3641
|
+
extern int dwarf_get_children_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3642
|
+
extern int dwarf_get_FORM_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3643
|
+
extern int dwarf_get_AT_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3644
|
+
extern int dwarf_get_OP_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3645
|
+
extern int dwarf_get_ATE_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3646
|
+
extern int dwarf_get_DS_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3647
|
+
extern int dwarf_get_END_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3648
|
+
extern int dwarf_get_ATCF_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3649
|
+
extern int dwarf_get_ACCESS_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3650
|
+
extern int dwarf_get_VIS_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3651
|
+
extern int dwarf_get_VIRTUALITY_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3652
|
+
extern int dwarf_get_LANG_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3653
|
+
extern int dwarf_get_ID_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3654
|
+
extern int dwarf_get_CC_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3655
|
+
extern int dwarf_get_INL_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3656
|
+
extern int dwarf_get_ORD_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3657
|
+
extern int dwarf_get_DSC_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3658
|
+
extern int dwarf_get_LNS_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3659
|
+
extern int dwarf_get_LNE_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3660
|
+
extern int dwarf_get_LLE_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3661
|
+
extern int dwarf_get_ISA_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3662
|
+
extern int dwarf_get_MACINFO_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3663
|
+
extern int dwarf_get_CFA_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3664
|
+
extern int dwarf_get_EH_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3665
|
+
extern int dwarf_get_FRAME_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3666
|
+
extern int dwarf_get_CHILDREN_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3667
|
+
extern int dwarf_get_ADDR_name(unsigned int /*val_in*/, const char ** /*s_out */);
|
3668
|
+
extern int dwarf_get_SECT_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3669
|
+
extern int dwarf_get_MACRO_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3670
|
+
extern int dwarf_get_DEFAULT_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3671
|
+
extern int dwarf_get_IDX_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3672
|
+
extern int dwarf_get_LNCT_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3673
|
+
extern int dwarf_get_UT_name (unsigned int /*val_in*/,const char ** /*s_out*/);
|
3674
|
+
|
3675
|
+
/* END FILE */
|
3676
|
+
|
3677
|
+
/* Convert local offset into global offset */
|
3678
|
+
int dwarf_convert_to_global_offset(Dwarf_Attribute /*attr*/,
|
3679
|
+
Dwarf_Off /*offset*/,
|
3680
|
+
Dwarf_Off* /*ret_offset*/,
|
3681
|
+
Dwarf_Error* /*error*/);
|
3682
|
+
|
3683
|
+
/* Get both offsets (local and global) */
|
3684
|
+
int dwarf_die_offsets(Dwarf_Die /*die*/,
|
3685
|
+
Dwarf_Off* /*global_offset*/,
|
3686
|
+
Dwarf_Off* /*local_offset*/,
|
3687
|
+
Dwarf_Error* /*error*/);
|
3688
|
+
|
3689
|
+
/* Giving a section name, get its size and address */
|
3690
|
+
int dwarf_get_section_info_by_name(Dwarf_Debug /*dbg*/,
|
3691
|
+
const char * /*section_name*/,
|
3692
|
+
Dwarf_Addr* /*section_addr*/,
|
3693
|
+
Dwarf_Unsigned* /*section_size*/,
|
3694
|
+
Dwarf_Error* /*error*/);
|
3695
|
+
|
3696
|
+
/* Giving a section index, get its size and address */
|
3697
|
+
int dwarf_get_section_info_by_index(Dwarf_Debug /*dbg*/,
|
3698
|
+
int /*section_index*/,
|
3699
|
+
const char ** /*section_name*/,
|
3700
|
+
Dwarf_Addr* /*section_addr*/,
|
3701
|
+
Dwarf_Unsigned* /*section_size*/,
|
3702
|
+
Dwarf_Error* /*error*/);
|
3703
|
+
|
3704
|
+
/* Get section count, of object file sections. */
|
3705
|
+
int dwarf_get_section_count(Dwarf_Debug /*dbg*/);
|
3706
|
+
|
3707
|
+
/* Get the version and offset size of a CU context.
|
3708
|
+
This is useful as a precursor to
|
3709
|
+
calling dwarf_get_form_class() at times. */
|
3710
|
+
int dwarf_get_version_of_die(Dwarf_Die /*die*/,
|
3711
|
+
Dwarf_Half * /*version*/,
|
3712
|
+
Dwarf_Half * /*offset_size*/);
|
3713
|
+
|
3714
|
+
/* These make the LEB encoding routines visible to libdwarf
|
3715
|
+
callers. Added November, 2012. */
|
3716
|
+
int dwarf_encode_leb128(Dwarf_Unsigned /*val*/,
|
3717
|
+
int * /*nbytes*/,
|
3718
|
+
char * /*space*/,
|
3719
|
+
int /*splen*/);
|
3720
|
+
int dwarf_encode_signed_leb128(Dwarf_Signed /*val*/,
|
3721
|
+
int * /*nbytes*/,
|
3722
|
+
char * /*space*/,
|
3723
|
+
int /*splen*/);
|
3724
|
+
|
3725
|
+
/* Record some application command line options in libdwarf.
|
3726
|
+
This is not arc/argv processing, just precooked setting
|
3727
|
+
of a flag in libdwarf based on something the application
|
3728
|
+
wants. check_verbose_mode of TRUE means do more checking
|
3729
|
+
and sometimes print errors (from libdwarf).
|
3730
|
+
Not restricted to a single Dwarf_Debug, it applies
|
3731
|
+
to the libdwarf the executable is using.
|
3732
|
+
*/
|
3733
|
+
typedef struct {
|
3734
|
+
Dwarf_Bool check_verbose_mode;
|
3735
|
+
} Dwarf_Cmdline_Options;
|
3736
|
+
extern Dwarf_Cmdline_Options dwarf_cmdline_options;
|
3737
|
+
|
3738
|
+
/* Set libdwarf to reflect some application command line options. */
|
3739
|
+
void dwarf_record_cmdline_options(Dwarf_Cmdline_Options /*options*/);
|
3740
|
+
|
3741
|
+
#ifdef __cplusplus
|
3742
|
+
}
|
3743
|
+
#endif
|
3744
|
+
#endif /* _LIBDWARF_H */
|
3745
|
+
|
3746
|
+
|