]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/elftoolchain/libdwarf/dwarf_highpc.3
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
[FreeBSD/FreeBSD.git] / contrib / elftoolchain / libdwarf / dwarf_highpc.3
1 .\" Copyright (c) 2010 Kai Wang
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
12 .\"
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
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $Id: dwarf_highpc.3 2073 2011-10-27 03:30:47Z jkoshy $
26 .\"
27 .Dd April 7, 2010
28 .Os
29 .Dt DWARF_HIGHPC 3
30 .Sh NAME
31 .Nm dwarf_arrayorder ,
32 .Nm dwarf_bitoffset ,
33 .Nm dwarf_bitsize ,
34 .Nm dwarf_bytesize ,
35 .Nm dwarf_highpc ,
36 .Nm dwarf_lowpc ,
37 .Nm dwarf_srclang
38 .Nd retrieve the value of a DWARF attribute
39 .Sh LIBRARY
40 .Lb libdwarf
41 .Sh SYNOPSIS
42 .In libdwarf.h
43 .Ft int
44 .Fo dwarf_arrayorder
45 .Fa "Dwarf_Die die"
46 .Fa "Dwarf_Unsigned *ret_order"
47 .Fa "Dwarf_Error *err"
48 .Fc
49 .Ft int
50 .Fo dwarf_bitoffset
51 .Fa "Dwarf_Die die"
52 .Fa "Dwarf_Unsigned *ret_size"
53 .Fa "Dwarf_Error *err"
54 .Fc
55 .Ft int
56 .Fo dwarf_bitsize
57 .Fa "Dwarf_Die die"
58 .Fa "Dwarf_Unsigned *ret_size"
59 .Fa "Dwarf_Error *err"
60 .Fc
61 .Ft int
62 .Fo dwarf_bytesize
63 .Fa "Dwarf_Die die"
64 .Fa "Dwarf_Unsigned *ret_size"
65 .Fa "Dwarf_Error *err"
66 .Fc
67 .Ft int
68 .Fo dwarf_highpc
69 .Fa "Dwarf_Die die"
70 .Fa "Dwarf_Addr *ret_highpc"
71 .Fa "Dwarf_Error *err"
72 .Fc
73 .Ft int
74 .Fo dwarf_lowpc
75 .Fa "Dwarf_Die die"
76 .Fa "Dwarf_Addr *ret_lowpc"
77 .Fa "Dwarf_Error *err"
78 .Fc
79 .Ft int
80 .Fo dwarf_srclang
81 .Fa "Dwarf_Die die"
82 .Fa "Dwarf_Unsigned *ret_lang"
83 .Fa "Dwarf_Error *err"
84 .Fc
85 .Sh DESCRIPTION
86 These convenience functions are used to retrieve DWARF attribute
87 values associated with a Debugging Information Entry (DIE) descriptor
88 denoted by argument
89 .Ar die .
90 These functions store the value of the requested attribute into the
91 location pointed to by their second argument, provided that the requested
92 attribute exists in the debugging information entry.
93 .Pp
94 The list of functions and the DWARF attribute that they retrieve are:
95 .Pp
96 .Bl -tag -width ".Fn dwarf_arrayorder" -compact
97 .It Fn dwarf_arrayorder
98 Retrieve the
99 .Dv DW_AT_ordering
100 attribute value.
101 .It Fn dwarf_bitoffset
102 Retrieve the
103 .Dv DW_AT_bit_offset
104 attribute value.
105 .It Fn dwarf_bitsize
106 Retrieve the
107 .Dv DW_AT_bit_size
108 attribute value.
109 .It Fn dwarf_bytesize
110 Retrieve the
111 .Dv DW_AT_byte_size
112 attribute value.
113 .It Fn dwarf_highpc
114 Retrieve the
115 .Dv DW_AT_high_pc
116 attribute value.
117 .It Fn dwarf_lowpc
118 Retrieve the
119 .Dv DW_AT_low_pc
120 attribute value.
121 .It Fn dwarf_srclang
122 Retrieve the
123 .Dv DW_AT_language
124 attribute value.
125 .El
126 .Sh RETURN VALUES
127 These functions return
128 .Dv DW_DLV_OK on success.
129 .Pp
130 If the debugging information entry descriptor denoted by argument
131 .Ar die
132 does not contain the requested attribute, these functions return
133 .Dv DW_DLV_NO_ENTRY
134 and set argument
135 .Ar err .
136 For other errors, they return
137 .Dv DW_DLV_ERROR
138 and set argument
139 .Ar err .
140 .Sh ERRORS
141 These functions can fail with the following errors:
142 .Bl -tag -width ".Bq Er DW_DLE_ARGUMENT"
143 .It Bq Er DW_DLE_ARGUMENT
144 Arguments
145 .Ar die ,
146 .Ar ret_highpc ,
147 .Ar ret_lowpc ,
148 .Ar ret_size ,
149 .Ar ret_lang
150 or
151 .Ar ret_order
152 were NULL.
153 .It Bq Er DW_DLE_NO_ENTRY
154 Argument
155 .Ar die
156 had no requested attribute.
157 .El
158 .Sh SEE ALSO
159 .Xr dwarf 3 ,
160 .Xr dwarf_attr 3 ,
161 .Xr dwarf_attrlist 3 ,
162 .Xr dwarf_hasattr 3