xref: /minix3/external/bsd/elftoolchain/dist/libdwarf/dwarf_dealloc.3 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	$NetBSD: dwarf_dealloc.3,v 1.2 2014/03/09 16:58:03 christos Exp $
2*0a6a1f1dSLionel Sambuc.\"
3*0a6a1f1dSLionel Sambuc.\" Copyright (c) 2009-2011 Joseph Koshy.  All rights reserved.
4*0a6a1f1dSLionel Sambuc.\"
5*0a6a1f1dSLionel Sambuc.\" Redistribution and use in source and binary forms, with or without
6*0a6a1f1dSLionel Sambuc.\" modification, are permitted provided that the following conditions
7*0a6a1f1dSLionel Sambuc.\" are met:
8*0a6a1f1dSLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright
9*0a6a1f1dSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer.
10*0a6a1f1dSLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright
11*0a6a1f1dSLionel Sambuc.\"    notice, this list of conditions and the following disclaimer in the
12*0a6a1f1dSLionel Sambuc.\"    documentation and/or other materials provided with the distribution.
13*0a6a1f1dSLionel Sambuc.\"
14*0a6a1f1dSLionel Sambuc.\" This software is provided by Joseph Koshy ``as is'' and
15*0a6a1f1dSLionel Sambuc.\" any express or implied warranties, including, but not limited to, the
16*0a6a1f1dSLionel Sambuc.\" implied warranties of merchantability and fitness for a particular purpose
17*0a6a1f1dSLionel Sambuc.\" are disclaimed.  in no event shall Joseph Koshy be liable
18*0a6a1f1dSLionel Sambuc.\" for any direct, indirect, incidental, special, exemplary, or consequential
19*0a6a1f1dSLionel Sambuc.\" damages (including, but not limited to, procurement of substitute goods
20*0a6a1f1dSLionel Sambuc.\" or services; loss of use, data, or profits; or business interruption)
21*0a6a1f1dSLionel Sambuc.\" however caused and on any theory of liability, whether in contract, strict
22*0a6a1f1dSLionel Sambuc.\" liability, or tort (including negligence or otherwise) arising in any way
23*0a6a1f1dSLionel Sambuc.\" out of the use of this software, even if advised of the possibility of
24*0a6a1f1dSLionel Sambuc.\" such damage.
25*0a6a1f1dSLionel Sambuc.\"
26*0a6a1f1dSLionel Sambuc.\" Id: dwarf_dealloc.3 2073 2011-10-27 03:30:47Z jkoshy
27*0a6a1f1dSLionel Sambuc.\"
28*0a6a1f1dSLionel Sambuc.Dd July 23, 2011
29*0a6a1f1dSLionel Sambuc.Os
30*0a6a1f1dSLionel Sambuc.Dt DWARF_DEALLOC 3
31*0a6a1f1dSLionel Sambuc.Sh NAME
32*0a6a1f1dSLionel Sambuc.Nm dwarf_dealloc ,
33*0a6a1f1dSLionel Sambuc.Nm dwarf_fde_cie_list_dealloc ,
34*0a6a1f1dSLionel Sambuc.Nm dwarf_funcs_dealloc ,
35*0a6a1f1dSLionel Sambuc.Nm dwarf_globals_dealloc ,
36*0a6a1f1dSLionel Sambuc.Nm dwarf_pubtypes_dealloc ,
37*0a6a1f1dSLionel Sambuc.Nm dwarf_ranges_dealloc ,
38*0a6a1f1dSLionel Sambuc.Nm dwarf_srclines_dealloc ,
39*0a6a1f1dSLionel Sambuc.Nm dwarf_types_dealloc ,
40*0a6a1f1dSLionel Sambuc.Nm dwarf_vars_dealloc ,
41*0a6a1f1dSLionel Sambuc.Nm dwarf_weaks_dealloc
42*0a6a1f1dSLionel Sambuc.Nd release resources
43*0a6a1f1dSLionel Sambuc.Sh LIBRARY
44*0a6a1f1dSLionel Sambuc.Lb libdwarf
45*0a6a1f1dSLionel Sambuc.Sh SYNOPSIS
46*0a6a1f1dSLionel Sambuc.In libdwarf.h
47*0a6a1f1dSLionel Sambuc.Ft void
48*0a6a1f1dSLionel Sambuc.Fo dwarf_dealloc
49*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
50*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Ptr ptr"
51*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Unsigned type"
52*0a6a1f1dSLionel Sambuc.Fc
53*0a6a1f1dSLionel Sambuc.Fo dwarf_fde_cie_list_dealloc
54*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
55*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Cie *cie_list"
56*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed cie_count"
57*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Fde *fde_list"
58*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed fde_count"
59*0a6a1f1dSLionel Sambuc.Fc
60*0a6a1f1dSLionel Sambuc.Ft void
61*0a6a1f1dSLionel Sambuc.Fo dwarf_funcs_dealloc
62*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
63*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Func *funcs"
64*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed funccount"
65*0a6a1f1dSLionel Sambuc.Fc
66*0a6a1f1dSLionel Sambuc.Ft void
67*0a6a1f1dSLionel Sambuc.Fo dwarf_globals_dealloc
68*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
69*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Global *globals"
70*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed globalcount"
71*0a6a1f1dSLionel Sambuc.Fc
72*0a6a1f1dSLionel Sambuc.Ft void
73*0a6a1f1dSLionel Sambuc.Fo dwarf_pubtypes_dealloc
74*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
75*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Type *pubtypes"
76*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed pubtypecount"
77*0a6a1f1dSLionel Sambuc.Fc
78*0a6a1f1dSLionel Sambuc.Ft void
79*0a6a1f1dSLionel Sambuc.Fo dwarf_ranges_dealloc
80*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
81*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Ranges *ranges"
82*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed rangecount"
83*0a6a1f1dSLionel Sambuc.Fc
84*0a6a1f1dSLionel Sambuc.Ft void
85*0a6a1f1dSLionel Sambuc.Fo dwarf_srclines_dealloc
86*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
87*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Line *lines"
88*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed linecount"
89*0a6a1f1dSLionel Sambuc.Fc
90*0a6a1f1dSLionel Sambuc.Ft void
91*0a6a1f1dSLionel Sambuc.Fo dwarf_types_dealloc
92*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
93*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Type *types"
94*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed typecount"
95*0a6a1f1dSLionel Sambuc.Fc
96*0a6a1f1dSLionel Sambuc.Ft void
97*0a6a1f1dSLionel Sambuc.Fo dwarf_vars_dealloc
98*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
99*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Var *vars"
100*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed varcount"
101*0a6a1f1dSLionel Sambuc.Fc
102*0a6a1f1dSLionel Sambuc.Ft void
103*0a6a1f1dSLionel Sambuc.Fo dwarf_weaks_dealloc
104*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Debug dbg"
105*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Weak *weaks"
106*0a6a1f1dSLionel Sambuc.Fa "Dwarf_Signed weakcount"
107*0a6a1f1dSLionel Sambuc.Fc
108*0a6a1f1dSLionel Sambuc.Sh DESCRIPTION
109*0a6a1f1dSLionel SambucThe function
110*0a6a1f1dSLionel Sambuc.Fn dwarf_dealloc
111*0a6a1f1dSLionel Sambucis used by applications to indicate that memory areas returned by
112*0a6a1f1dSLionel Sambuc.Lb libdwarf
113*0a6a1f1dSLionel Sambucmay be safely disposed off.
114*0a6a1f1dSLionel SambucDue to the way memory is managed in the current implementation, the
115*0a6a1f1dSLionel Sambucuse of
116*0a6a1f1dSLionel Sambuc.Fn dwarf_dealloc
117*0a6a1f1dSLionel Sambucis only necessary for a small set of DWARF types.
118*0a6a1f1dSLionel Sambuc.Pp
119*0a6a1f1dSLionel SambucArgument
120*0a6a1f1dSLionel Sambuc.Ar dbg
121*0a6a1f1dSLionel Sambucshould reference a valid debugging context allocated using
122*0a6a1f1dSLionel Sambuc.Xr dwarf_init 3 .
123*0a6a1f1dSLionel Sambuc.Pp
124*0a6a1f1dSLionel SambucArgument
125*0a6a1f1dSLionel Sambuc.Ar ptr
126*0a6a1f1dSLionel Sambucshould point to an object or memory area obtained by a prior call
127*0a6a1f1dSLionel Sambucto a DWARF(3) function.
128*0a6a1f1dSLionel Sambuc.Pp
129*0a6a1f1dSLionel SambucArgument
130*0a6a1f1dSLionel Sambuc.Ar type
131*0a6a1f1dSLionel Sambucindicates the type of object being deallocated.
132*0a6a1f1dSLionel SambucThe indicated type must match that of the object being passed in
133*0a6a1f1dSLionel Sambucargument
134*0a6a1f1dSLionel Sambuc.Ar ptr .
135*0a6a1f1dSLionel SambucValid values for the
136*0a6a1f1dSLionel Sambuc.Ar type
137*0a6a1f1dSLionel Sambucargument are:
138*0a6a1f1dSLionel Sambuc.Bl -tag -width ".Dv DW_DLA_FRAME_BLOCK"
139*0a6a1f1dSLionel Sambuc.It Dv DW_DLA_ABBREV
140*0a6a1f1dSLionel SambucAn object of type
141*0a6a1f1dSLionel Sambuc.Vt Dwarf_Abbrev ,
142*0a6a1f1dSLionel Sambucas returned by a call to the function
143*0a6a1f1dSLionel Sambuc.Xr dwarf_get_abbrev 3 .
144*0a6a1f1dSLionel Sambuc.It Dv DW_DLA_DIE
145*0a6a1f1dSLionel SambucAn object of type
146*0a6a1f1dSLionel Sambuc.Vt Dwarf_Die ,
147*0a6a1f1dSLionel Sambucas returned by calls to the functions
148*0a6a1f1dSLionel Sambuc.Xr dwarf_child 3 ,
149*0a6a1f1dSLionel Sambuc.Xr dwarf_offdie 3
150*0a6a1f1dSLionel Sambucor
151*0a6a1f1dSLionel Sambuc.Xr dwarf_siblingof 3 .
152*0a6a1f1dSLionel Sambuc.It Dv DW_DLA_FRAME_BLOCK
153*0a6a1f1dSLionel SambucAn array of objects of type
154*0a6a1f1dSLionel Sambuc.Vt Dwarf_Frame_op ,
155*0a6a1f1dSLionel Sambucas returned by a call to the function
156*0a6a1f1dSLionel Sambuc.Xr dwarf_expand_frame_instructions 3 .
157*0a6a1f1dSLionel Sambuc.El
158*0a6a1f1dSLionel Sambuc.Pp
159*0a6a1f1dSLionel SambucCalls to
160*0a6a1f1dSLionel Sambuc.Fn dwarf_dealloc
161*0a6a1f1dSLionel Sambucwith other values for argument
162*0a6a1f1dSLionel Sambuc.Ar type
163*0a6a1f1dSLionel Sambucare no-ops in this implementation.
164*0a6a1f1dSLionel Sambuc.Pp
165*0a6a1f1dSLionel SambucThe functions
166*0a6a1f1dSLionel Sambuc.Fn dwarf_fde_cie_list_dealloc ,
167*0a6a1f1dSLionel Sambuc.Fn dwarf_funcs_dealloc ,
168*0a6a1f1dSLionel Sambuc.Fn dwarf_globals_dealloc ,
169*0a6a1f1dSLionel Sambuc.Fn dwarf_pubtypes_dealloc ,
170*0a6a1f1dSLionel Sambuc.Fn dwarf_ranges_dealloc ,
171*0a6a1f1dSLionel Sambuc.Fn dwarf_srclines_dealloc ,
172*0a6a1f1dSLionel Sambuc.Fn dwarf_types_dealloc ,
173*0a6a1f1dSLionel Sambuc.Fn dwarf_vars_dealloc
174*0a6a1f1dSLionel Sambucand
175*0a6a1f1dSLionel Sambuc.Fn dwarf_weaks_dealloc
176*0a6a1f1dSLionel Sambucare provided for compatibility with other implementations of the
177*0a6a1f1dSLionel SambucDWARF(3) API.
178*0a6a1f1dSLionel SambucDue to the way memory is managed in the current implementation, these
179*0a6a1f1dSLionel Sambucfunctions are effectively no-ops.
180*0a6a1f1dSLionel Sambuc.Pp
181*0a6a1f1dSLionel SambucSee
182*0a6a1f1dSLionel Sambuc.Xr dwarf 3
183*0a6a1f1dSLionel Sambucfor more information about the memory management scheme in this
184*0a6a1f1dSLionel Sambucimplementation of the DWARF(3) API.
185*0a6a1f1dSLionel Sambuc.Sh RETURN VALUES
186*0a6a1f1dSLionel SambucFunctions
187*0a6a1f1dSLionel Sambuc.Fn dwarf_dealloc ,
188*0a6a1f1dSLionel Sambuc.Fn dwarf_fde_cie_list_dealloc ,
189*0a6a1f1dSLionel Sambuc.Fn dwarf_funcs_dealloc ,
190*0a6a1f1dSLionel Sambuc.Fn dwarf_globals_dealloc ,
191*0a6a1f1dSLionel Sambuc.Fn dwarf_pubtypes_dealloc ,
192*0a6a1f1dSLionel Sambuc.Fn dwarf_ranges_dealloc ,
193*0a6a1f1dSLionel Sambuc.Fn dwarf_srclines_dealloc ,
194*0a6a1f1dSLionel Sambuc.Fn dwarf_types_dealloc ,
195*0a6a1f1dSLionel Sambuc.Fn dwarf_vars_dealloc
196*0a6a1f1dSLionel Sambucand
197*0a6a1f1dSLionel Sambuc.Fn dwarf_weaks_dealloc
198*0a6a1f1dSLionel Sambuchave no return value.
199*0a6a1f1dSLionel Sambuc.Sh SEE ALSO
200*0a6a1f1dSLionel Sambuc.Xr dwarf 3 ,
201*0a6a1f1dSLionel Sambuc.Xr dwarf_child 3 ,
202*0a6a1f1dSLionel Sambuc.Xr dwarf_expand_frame_instructions 3 ,
203*0a6a1f1dSLionel Sambuc.Xr dwarf_get_abbrev 3 ,
204*0a6a1f1dSLionel Sambuc.Xr dwarf_offdie 3 ,
205*0a6a1f1dSLionel Sambuc.Xr dwarf_siblingof 3
206