xref: /netbsd-src/external/bsd/elftoolchain/dist/libdwarf/dwarf_seterrarg.3 (revision 5ac3bc719ce6e70593039505b491894133237d12)
1*5ac3bc71Schristos.\"	$NetBSD: dwarf_seterrarg.3,v 1.6 2024/03/03 17:37:32 christos Exp $
2e81373b4Schristos.\"
39dd9d0cfSchristos.\" Copyright (c) 2010 Joseph Koshy.  All rights reserved.
49dd9d0cfSchristos.\"
59dd9d0cfSchristos.\" Redistribution and use in source and binary forms, with or without
69dd9d0cfSchristos.\" modification, are permitted provided that the following conditions
79dd9d0cfSchristos.\" are met:
89dd9d0cfSchristos.\" 1. Redistributions of source code must retain the above copyright
99dd9d0cfSchristos.\"    notice, this list of conditions and the following disclaimer.
109dd9d0cfSchristos.\" 2. Redistributions in binary form must reproduce the above copyright
119dd9d0cfSchristos.\"    notice, this list of conditions and the following disclaimer in the
129dd9d0cfSchristos.\"    documentation and/or other materials provided with the distribution.
139dd9d0cfSchristos.\"
149dd9d0cfSchristos.\" This software is provided by Joseph Koshy ``as is'' and
159dd9d0cfSchristos.\" any express or implied warranties, including, but not limited to, the
169dd9d0cfSchristos.\" implied warranties of merchantability and fitness for a particular purpose
179dd9d0cfSchristos.\" are disclaimed.  in no event shall Joseph Koshy be liable
189dd9d0cfSchristos.\" for any direct, indirect, incidental, special, exemplary, or consequential
199dd9d0cfSchristos.\" damages (including, but not limited to, procurement of substitute goods
209dd9d0cfSchristos.\" or services; loss of use, data, or profits; or business interruption)
219dd9d0cfSchristos.\" however caused and on any theory of liability, whether in contract, strict
229dd9d0cfSchristos.\" liability, or tort (including negligence or otherwise) arising in any way
239dd9d0cfSchristos.\" out of the use of this software, even if advised of the possibility of
249dd9d0cfSchristos.\" such damage.
259dd9d0cfSchristos.\"
26cdbf1fe1Sjkoshy.\" Id: dwarf_seterrarg.3 3963 2022-03-12 16:07:32Z jkoshy
279dd9d0cfSchristos.\"
289dd9d0cfSchristos.Dd May 01, 2010
299dd9d0cfSchristos.Dt DWARF_SETERRARG 3
30604b0842Sjkoshy.Os
319dd9d0cfSchristos.Sh NAME
329dd9d0cfSchristos.Nm dwarf_seterrarg ,
339dd9d0cfSchristos.Nm dwarf_seterrhand
349dd9d0cfSchristos.Nd configure error handling
359dd9d0cfSchristos.Sh LIBRARY
369dd9d0cfSchristos.Lb libdwarf
379dd9d0cfSchristos.Sh SYNOPSIS
389dd9d0cfSchristos.In libdwarf.h
399dd9d0cfSchristos.Ft Dwarf_Ptr
409dd9d0cfSchristos.Fn dwarf_seterrarg "Dwarf_Debug dbg" "Dwarf_Ptr arg"
419dd9d0cfSchristos.Ft Dwarf_Handler
429dd9d0cfSchristos.Fn dwarf_seterrhand "Dwarf_Debug dbg" "Dwarf_Handler handler"
439dd9d0cfSchristos.Sh DESCRIPTION
449dd9d0cfSchristosThese functions may be used by applications to configure error handling
459dd9d0cfSchristoscallbacks.
469dd9d0cfSchristosThe error handling scheme used by the library is described in
479dd9d0cfSchristos.Xr dwarf 3 .
489dd9d0cfSchristos.Pp
499dd9d0cfSchristosFunction
509dd9d0cfSchristos.Fn dwarf_seterrarg
519dd9d0cfSchristosmay be used to set the callback argument passed to a configured
529dd9d0cfSchristoserror handler at the time it is invoked.
539dd9d0cfSchristosArgument
54cdbf1fe1Sjkoshy.Fa arg
559dd9d0cfSchristosis the callback argument being set.
569dd9d0cfSchristosArgument
57cdbf1fe1Sjkoshy.Fa dbg
589dd9d0cfSchristoscan be a debug context allocated by a prior call to
599dd9d0cfSchristos.Xr dwarf_init 3 ,
60cdbf1fe1Sjkoshyor can be
61cdbf1fe1Sjkoshy.Dv NULL
62cdbf1fe1Sjkoshyto indicate that the library-wide callback argument
639dd9d0cfSchristosis to be set.
649dd9d0cfSchristos.Pp
659dd9d0cfSchristosFunction
669dd9d0cfSchristos.Fn dwarf_seterrhand
679dd9d0cfSchristosmay be used to associate an error handler denoted by argument
68cdbf1fe1Sjkoshy.Fa handler
699dd9d0cfSchristoswith the DWARF debug context descriptor denoted by argument
70cdbf1fe1Sjkoshy.Fa dbg .
719dd9d0cfSchristosArgument
72cdbf1fe1Sjkoshy.Fa dbg
739dd9d0cfSchristosshould be a debug context allocated by a prior call to
749dd9d0cfSchristos.Xr dwarf_init 3 ,
75cdbf1fe1Sjkoshyor may be
76cdbf1fe1Sjkoshy.Dv NULL
77cdbf1fe1Sjkoshyto indicate that the library-wide error handler
789dd9d0cfSchristosis to be set.
799dd9d0cfSchristos.Sh RETURN VALUES
809dd9d0cfSchristosFunction
819dd9d0cfSchristos.Fn dwarf_seterrhand
829dd9d0cfSchristosreturns the previous error handler associated with argument
83cdbf1fe1Sjkoshy.Fa dbg .
849dd9d0cfSchristosIf argument
85cdbf1fe1Sjkoshy.Fa dbg
86cdbf1fe1Sjkoshyis
87cdbf1fe1Sjkoshy.Dv NULL ,
88cdbf1fe1Sjkoshyfunction
899dd9d0cfSchristos.Fn dwarf_seterrhand
909dd9d0cfSchristosreturns the previous library-wide error handler.
919dd9d0cfSchristos.Pp
929dd9d0cfSchristosFunction
939dd9d0cfSchristos.Fn dwarf_seterrarg
949dd9d0cfSchristosreturns the previous callback argument associated with argument
95cdbf1fe1Sjkoshy.Fa dbg .
969dd9d0cfSchristosIf argument
97cdbf1fe1Sjkoshy.Fa dbg
98cdbf1fe1Sjkoshyis
99cdbf1fe1Sjkoshy.Dv NULL ,
100cdbf1fe1Sjkoshyfunction
1019dd9d0cfSchristos.Fn dwarf_seterrarg
1029dd9d0cfSchristosreturns the previous library-wide callback argument.
1039dd9d0cfSchristos.Sh COMPATIBILITY
1049dd9d0cfSchristosThe behavior of these functions when argument
105cdbf1fe1Sjkoshy.Fa dbg
106cdbf1fe1Sjkoshyis
107cdbf1fe1Sjkoshy.Dv NULL
108cdbf1fe1Sjkoshyis a local extension.
1099dd9d0cfSchristos.Sh ERRORS
1109dd9d0cfSchristosThese functions do not set an error code.
1119dd9d0cfSchristos.Sh SEE ALSO
1129dd9d0cfSchristos.Xr dwarf 3 ,
1139dd9d0cfSchristos.Xr dwarf_init 3
114