1 .\" $NetBSD: dwarf_dieoffset.3,v 1.2 2014/03/09 16:58:03 christos Exp $
3 .\" Copyright (c) 2010 Kai Wang
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" Id: dwarf_dieoffset.3 2073 2011-10-27 03:30:47Z jkoshy
33 .Nm dwarf_die_CU_offset ,
34 .Nm dwarf_die_CU_offset_range ,
36 .Nm dwarf_get_cu_die_offset_given_cu_header_offset
37 .Nd return offsets of DWARF debugging information entries
43 .Fo dwarf_die_CU_offset
45 .Fa "Dwarf_Off *ret_offset"
46 .Fa "Dwarf_Error *err"
49 .Fo dwarf_die_CU_offset_range
51 .Fa "Dwarf_Off *cu_offset"
52 .Fa "Dwarf_Off *cu_length"
53 .Fa "Dwarf_Error *err"
58 .Fa "Dwarf_Off *ret_offset"
59 .Fa "Dwarf_Error *err"
62 .Fo dwarf_get_cu_die_offset_given_cu_header_offset
64 .Fa "Dwarf_Off in_cu_header_offset"
65 .Fa "Dwarf_Off *out_cu_die_offset"
66 .Fa "Dwarf_Error *err"
69 These functions are used to retrieve offsets for DWARF debugging
73 .Fn dwarf_die_CU_offset
74 returns the offset of the debugging information entry referenced by
77 relative to the start of its containing compilation unit.
80 should point to the location that is to hold the returned offset.
83 is non-NULL, it will be used to return an error descriptor in case of
87 .Fn dwarf_die_CU_offset_range
88 returns the section-relative offset and length of the compilation unit
89 containing the debugging information entry referenced by argument
93 should point to a location that will hold the returned offset.
96 should point to a location that will hold the returned length of the
100 is non-NULL, it will be used to return an error descriptor in case of
105 retrieves the section-relative offset of the debugging information
106 entry referenced by argument
110 should point to a location that is to hold the returned
111 section-relative offset.
114 is non-NULL, it will be used to return an error descriptor in case of
118 .Fn dwarf_get_cu_die_offset_given_cu_header_offset
119 returns the offset for the debugging information entry for a
120 compilation unit, given an offset to the header of the compilation
124 should reference a valid debugging context allocated using
127 .Ar in_cu_header_offset
128 contains the offset to the start of a compilation unit.
130 .Ar out_cu_die_offset
131 points to a location that will hold the returned offset.
134 is non-NULL, it will be used to return an error descriptor in case of
137 On success, these functions returns
139 In case of an error, these functions return
145 .Fn dwarf_get_cu_die_offset_given_cu_header_offset
150 if there is no compilation unit located at the
151 offset specified in argument
152 .Ar in_cu_header_offset .
154 These functions may fail with the following errors:
155 .Bl -tag -width ".Bq Er DW_DLE_ARGUMENT"
156 .It Bq Er DW_DLE_ARGUMENT
162 .Va out_cu_die_offset
166 .It Bq Er DW_DLE_NO_ENTRY
168 .Ar in_cu_header_offset
169 specified an unknown offset.
173 .Xr dwarf_next_cu_header 3 ,