xref: /minix3/external/bsd/elftoolchain/dist/libdwarf/dwarf_seterrarg.3 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	$NetBSD: dwarf_seterrarg.3,v 1.2 2014/03/09 16:58:04 christos Exp $
2*0a6a1f1dSLionel Sambuc.\"
3*0a6a1f1dSLionel Sambuc.\" Copyright (c) 2010 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_seterrarg.3 2075 2011-10-27 03:47:28Z jkoshy
27*0a6a1f1dSLionel Sambuc.\"
28*0a6a1f1dSLionel Sambuc.Dd May 01, 2010
29*0a6a1f1dSLionel Sambuc.Os
30*0a6a1f1dSLionel Sambuc.Dt DWARF_SETERRARG 3
31*0a6a1f1dSLionel Sambuc.Sh NAME
32*0a6a1f1dSLionel Sambuc.Nm dwarf_seterrarg ,
33*0a6a1f1dSLionel Sambuc.Nm dwarf_seterrhand
34*0a6a1f1dSLionel Sambuc.Nd configure error handling
35*0a6a1f1dSLionel Sambuc.Sh LIBRARY
36*0a6a1f1dSLionel Sambuc.Lb libdwarf
37*0a6a1f1dSLionel Sambuc.Sh SYNOPSIS
38*0a6a1f1dSLionel Sambuc.In libdwarf.h
39*0a6a1f1dSLionel Sambuc.Ft Dwarf_Ptr
40*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrarg "Dwarf_Debug dbg" "Dwarf_Ptr arg"
41*0a6a1f1dSLionel Sambuc.Ft Dwarf_Handler
42*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrhand "Dwarf_Debug dbg" "Dwarf_Handler handler"
43*0a6a1f1dSLionel Sambuc.Sh DESCRIPTION
44*0a6a1f1dSLionel SambucThese functions may be used by applications to configure error handling
45*0a6a1f1dSLionel Sambuccallbacks.
46*0a6a1f1dSLionel SambucThe error handling scheme used by the library is described in
47*0a6a1f1dSLionel Sambuc.Xr dwarf 3 .
48*0a6a1f1dSLionel Sambuc.Pp
49*0a6a1f1dSLionel SambucFunction
50*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrarg
51*0a6a1f1dSLionel Sambucmay be used to set the callback argument passed to a configured
52*0a6a1f1dSLionel Sambucerror handler at the time it is invoked.
53*0a6a1f1dSLionel SambucArgument
54*0a6a1f1dSLionel Sambuc.Ar arg
55*0a6a1f1dSLionel Sambucis the callback argument being set.
56*0a6a1f1dSLionel SambucArgument
57*0a6a1f1dSLionel Sambuc.Ar dbg
58*0a6a1f1dSLionel Sambuccan be a debug context allocated by a prior call to
59*0a6a1f1dSLionel Sambuc.Xr dwarf_init 3 ,
60*0a6a1f1dSLionel Sambucor can be NULL to indicate that the library-wide callback argument
61*0a6a1f1dSLionel Sambucis to be set.
62*0a6a1f1dSLionel Sambuc.Pp
63*0a6a1f1dSLionel SambucFunction
64*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrhand
65*0a6a1f1dSLionel Sambucmay be used to associate an error handler denoted by argument
66*0a6a1f1dSLionel Sambuc.Ar handler
67*0a6a1f1dSLionel Sambucwith the DWARF debug context descriptor denoted by argument
68*0a6a1f1dSLionel Sambuc.Ar dbg .
69*0a6a1f1dSLionel SambucArgument
70*0a6a1f1dSLionel Sambuc.Ar dbg
71*0a6a1f1dSLionel Sambucshould be a debug context allocated by a prior call to
72*0a6a1f1dSLionel Sambuc.Xr dwarf_init 3 ,
73*0a6a1f1dSLionel Sambucor may be NULL to indicate that the library-wide error handler
74*0a6a1f1dSLionel Sambucis to be set.
75*0a6a1f1dSLionel Sambuc.Sh RETURN VALUES
76*0a6a1f1dSLionel SambucFunction
77*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrhand
78*0a6a1f1dSLionel Sambucreturns the previous error handler associated with argument
79*0a6a1f1dSLionel Sambuc.Ar dbg .
80*0a6a1f1dSLionel SambucIf argument
81*0a6a1f1dSLionel Sambuc.Ar dbg
82*0a6a1f1dSLionel Sambucis NULL, function
83*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrhand
84*0a6a1f1dSLionel Sambucreturns the previous library-wide error handler.
85*0a6a1f1dSLionel Sambuc.Pp
86*0a6a1f1dSLionel SambucFunction
87*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrarg
88*0a6a1f1dSLionel Sambucreturns the previous callback argument associated with argument
89*0a6a1f1dSLionel Sambuc.Ar dbg .
90*0a6a1f1dSLionel SambucIf argument
91*0a6a1f1dSLionel Sambuc.Ar dbg
92*0a6a1f1dSLionel Sambucis NULL, function
93*0a6a1f1dSLionel Sambuc.Fn dwarf_seterrarg
94*0a6a1f1dSLionel Sambucreturns the previous library-wide callback argument.
95*0a6a1f1dSLionel Sambuc.Pp
96*0a6a1f1dSLionel Sambuc.Sh COMPATIBILITY
97*0a6a1f1dSLionel SambucThe behavior of these functions when argument
98*0a6a1f1dSLionel Sambuc.Ar dbg
99*0a6a1f1dSLionel Sambucis NULL is a local extension.
100*0a6a1f1dSLionel Sambuc.Sh ERRORS
101*0a6a1f1dSLionel SambucThese functions do not set an error code.
102*0a6a1f1dSLionel Sambuc.Sh SEE ALSO
103*0a6a1f1dSLionel Sambuc.Xr dwarf 3 ,
104*0a6a1f1dSLionel Sambuc.Xr dwarf_init 3
105