xref: /freebsd-src/contrib/elftoolchain/libdwarf/dwarf_attroffset.3 (revision ae500c1ff8974130f7f2692772cf288b90349e0d)
1cf781b2eSEd Maste.\" Copyright (c) 2014 Kai Wang
2cf781b2eSEd Maste.\" All rights reserved.
3cf781b2eSEd Maste.\"
4cf781b2eSEd Maste.\" Redistribution and use in source and binary forms, with or without
5cf781b2eSEd Maste.\" modification, are permitted provided that the following conditions
6cf781b2eSEd Maste.\" are met:
7cf781b2eSEd Maste.\" 1. Redistributions of source code must retain the above copyright
8cf781b2eSEd Maste.\"    notice, this list of conditions and the following disclaimer.
9cf781b2eSEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright
10cf781b2eSEd Maste.\"    notice, this list of conditions and the following disclaimer in the
11cf781b2eSEd Maste.\"    documentation and/or other materials provided with the distribution.
12cf781b2eSEd Maste.\"
13cf781b2eSEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14cf781b2eSEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15cf781b2eSEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16cf781b2eSEd Maste.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17cf781b2eSEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18cf781b2eSEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19cf781b2eSEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20cf781b2eSEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21cf781b2eSEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22cf781b2eSEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23cf781b2eSEd Maste.\" SUCH DAMAGE.
24cf781b2eSEd Maste.\"
25*ae500c1fSEd Maste.\" $Id: dwarf_attroffset.3 3640 2018-10-14 14:09:13Z jkoshy $
26cf781b2eSEd Maste.\"
27cf781b2eSEd Maste.Dd December 20, 2014
28cf781b2eSEd Maste.Dt DWARF_ATTROFFSET 3
29*ae500c1fSEd Maste.Os
30cf781b2eSEd Maste.Sh NAME
31cf781b2eSEd Maste.Nm dwarf_attroffset
32cf781b2eSEd Maste.Nd retrieve the section-relative offset of an attribute descriptor
33cf781b2eSEd Maste.Sh LIBRARY
34cf781b2eSEd Maste.Lb libdwarf
35cf781b2eSEd Maste.Sh SYNOPSIS
36cf781b2eSEd Maste.In libdwarf.h
37cf781b2eSEd Maste.Ft int
38cf781b2eSEd Maste.Fo dwarf_attroffset
39cf781b2eSEd Maste.Fa "Dwarf_Attribute at"
40cf781b2eSEd Maste.Fa "Dwarf_Off *ret_off"
41cf781b2eSEd Maste.Fa "Dwarf_Error *err"
42cf781b2eSEd Maste.Fc
43cf781b2eSEd Maste.Sh DESCRIPTION
44cf781b2eSEd MasteFunction
45cf781b2eSEd Maste.Fn dwarf_attroffset
46cf781b2eSEd Masteretrieves the section-relative offset of the attribute descriptor
47cf781b2eSEd Mastereferenced by argument
48cf781b2eSEd Maste.Ar at .
49cf781b2eSEd Maste.Pp
50cf781b2eSEd MasteArgument
51cf781b2eSEd Maste.Ar ret_off
52cf781b2eSEd Masteshould point to a location that is to hold the returned
53cf781b2eSEd Mastesection-relative offset.
54cf781b2eSEd MasteIf argument
55cf781b2eSEd Maste.Ar err
56cf781b2eSEd Masteis non-NULL, it is used to return an error descriptor in case of an
57cf781b2eSEd Masteerror.
58cf781b2eSEd Maste.Sh RETURN VALUES
59cf781b2eSEd MasteOn success, function
60cf781b2eSEd Maste.Fn dwarf_attroffset
61cf781b2eSEd Mastereturns
62cf781b2eSEd Maste.Dv DW_DLV_OK .
63cf781b2eSEd Maste.Pp
64cf781b2eSEd MasteIn case of an error, it returns
65cf781b2eSEd Maste.Dv DW_DLV_ERROR
66cf781b2eSEd Masteand sets argument
67cf781b2eSEd Maste.Ar err .
68cf781b2eSEd Maste.Sh COMPATIBILITY
69cf781b2eSEd MasteThis function is an extension to the
70cf781b2eSEd Maste.Xr DWARF 3
71cf781b2eSEd MasteAPI.
72cf781b2eSEd Maste.Sh ERRORS
73cf781b2eSEd MasteThe
74cf781b2eSEd Maste.Fn dwarf_attroffset
75cf781b2eSEd Mastefunction may fail with the following errors:
76cf781b2eSEd Maste.Bl -tag -width ".Bq Er DW_DLE_ARGUMENT"
77cf781b2eSEd Maste.It Bq Er DW_DLE_ARGUMENT
78cf781b2eSEd MasteEither of the arguments
79cf781b2eSEd Maste.Ar at
80cf781b2eSEd Masteor
81cf781b2eSEd Maste.Ar ret_off
82cf781b2eSEd Mastewas NULL.
83cf781b2eSEd Maste.El
84cf781b2eSEd Maste.Sh SEE ALSO
85cf781b2eSEd Maste.Xr dwarf 3 ,
86cf781b2eSEd Maste.Xr dwarf_attr 3
87