summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/elftoolchain/libdwarf/dwarf_seterrarg.3
blob: 55d78d94258f6a7340593b8a45dc9852871e510a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.\" Copyright (c) 2010 Joseph Koshy.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" This software is provided by Joseph Koshy ``as is'' and
.\" any express or implied warranties, including, but not limited to, the
.\" implied warranties of merchantability and fitness for a particular purpose
.\" are disclaimed.  in no event shall Joseph Koshy be liable
.\" for any direct, indirect, incidental, special, exemplary, or consequential
.\" damages (including, but not limited to, procurement of substitute goods
.\" or services; loss of use, data, or profits; or business interruption)
.\" however caused and on any theory of liability, whether in contract, strict
.\" liability, or tort (including negligence or otherwise) arising in any way
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
.\" $Id: dwarf_seterrarg.3 2075 2011-10-27 03:47:28Z jkoshy $
.\"
.Dd May 01, 2010
.Os
.Dt DWARF_SETERRARG 3
.Sh NAME
.Nm dwarf_seterrarg ,
.Nm dwarf_seterrhand
.Nd configure error handling
.Sh LIBRARY
.Lb libdwarf
.Sh SYNOPSIS
.In libdwarf.h
.Ft Dwarf_Ptr
.Fn dwarf_seterrarg "Dwarf_Debug dbg" "Dwarf_Ptr arg"
.Ft Dwarf_Handler
.Fn dwarf_seterrhand "Dwarf_Debug dbg" "Dwarf_Handler handler"
.Sh DESCRIPTION
These functions may be used by applications to configure error handling
callbacks.
The error handling scheme used by the library is described in
.Xr dwarf 3 .
.Pp
Function
.Fn dwarf_seterrarg
may be used to set the callback argument passed to a configured
error handler at the time it is invoked.
Argument
.Ar arg
is the callback argument being set.
Argument
.Ar dbg
can be a debug context allocated by a prior call to
.Xr dwarf_init 3 ,
or can be NULL to indicate that the library-wide callback argument
is to be set.
.Pp
Function
.Fn dwarf_seterrhand
may be used to associate an error handler denoted by argument
.Ar handler
with the DWARF debug context descriptor denoted by argument
.Ar dbg .
Argument
.Ar dbg
should be a debug context allocated by a prior call to
.Xr dwarf_init 3 ,
or may be NULL to indicate that the library-wide error handler
is to be set.
.Sh RETURN VALUES
Function
.Fn dwarf_seterrhand
returns the previous error handler associated with argument
.Ar dbg .
If argument
.Ar dbg
is NULL, function
.Fn dwarf_seterrhand
returns the previous library-wide error handler.
.Pp
Function
.Fn dwarf_seterrarg
returns the previous callback argument associated with argument
.Ar dbg .
If argument
.Ar dbg
is NULL, function
.Fn dwarf_seterrarg
returns the previous library-wide callback argument.
.Pp
.Sh COMPATIBILITY
The behavior of these functions when argument
.Ar dbg
is NULL is a local extension.
.Sh ERRORS
These functions do not set an error code.
.Sh SEE ALSO
.Xr dwarf 3 ,
.Xr dwarf_init 3