1 .\" Copyright (c) 2010 Kai Wang
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" $Id: dwarf_dieoffset.3 2073 2011-10-27 03:30:47Z jkoshy $
31 .Nm dwarf_die_CU_offset ,
32 .Nm dwarf_die_CU_offset_range ,
34 .Nm dwarf_get_cu_die_offset_given_cu_header_offset
35 .Nd return offsets of DWARF debugging information entries
41 .Fo dwarf_die_CU_offset
43 .Fa "Dwarf_Off *ret_offset"
44 .Fa "Dwarf_Error *err"
47 .Fo dwarf_die_CU_offset_range
49 .Fa "Dwarf_Off *cu_offset"
50 .Fa "Dwarf_Off *cu_length"
51 .Fa "Dwarf_Error *err"
56 .Fa "Dwarf_Off *ret_offset"
57 .Fa "Dwarf_Error *err"
60 .Fo dwarf_get_cu_die_offset_given_cu_header_offset
62 .Fa "Dwarf_Off in_cu_header_offset"
63 .Fa "Dwarf_Off *out_cu_die_offset"
64 .Fa "Dwarf_Error *err"
67 These functions are used to retrieve offsets for DWARF debugging
71 .Fn dwarf_die_CU_offset
72 returns the offset of the debugging information entry referenced by
75 relative to the start of its containing compilation unit.
78 should point to the location that is to hold the returned offset.
81 is non-NULL, it will be used to return an error descriptor in case of
85 .Fn dwarf_die_CU_offset_range
86 returns the section-relative offset and length of the compilation unit
87 containing the debugging information entry referenced by argument
91 should point to a location that will hold the returned offset.
94 should point to a location that will hold the returned length of the
98 is non-NULL, it will be used to return an error descriptor in case of
103 retrieves the section-relative offset of the debugging information
104 entry referenced by argument
108 should point to a location that is to hold the returned
109 section-relative offset.
112 is non-NULL, it will be used to return an error descriptor in case of
116 .Fn dwarf_get_cu_die_offset_given_cu_header_offset
117 returns the offset for the debugging information entry for a
118 compilation unit, given an offset to the header of the compilation
122 should reference a valid debugging context allocated using
125 .Ar in_cu_header_offset
126 contains the offset to the start of a compilation unit.
128 .Ar out_cu_die_offset
129 points to a location that will hold the returned offset.
132 is non-NULL, it will be used to return an error descriptor in case of
135 On success, these functions returns
137 In case of an error, these functions return
143 .Fn dwarf_get_cu_die_offset_given_cu_header_offset
148 if there is no compilation unit located at the
149 offset specified in argument
150 .Ar in_cu_header_offset .
152 These functions may fail with the following errors:
153 .Bl -tag -width ".Bq Er DW_DLE_ARGUMENT"
154 .It Bq Er DW_DLE_ARGUMENT
160 .Va out_cu_die_offset
164 .It Bq Er DW_DLE_NO_ENTRY
166 .Ar in_cu_header_offset
167 specified an unknown offset.
171 .Xr dwarf_next_cu_header 3 ,