12de3b87aSKai Wang.\" Copyright (c) 2010 Joseph Koshy. All rights reserved. 22de3b87aSKai Wang.\" 32de3b87aSKai Wang.\" Redistribution and use in source and binary forms, with or without 42de3b87aSKai Wang.\" modification, are permitted provided that the following conditions 52de3b87aSKai Wang.\" are met: 62de3b87aSKai Wang.\" 1. Redistributions of source code must retain the above copyright 72de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer. 82de3b87aSKai Wang.\" 2. Redistributions in binary form must reproduce the above copyright 92de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer in the 102de3b87aSKai Wang.\" documentation and/or other materials provided with the distribution. 112de3b87aSKai Wang.\" 122de3b87aSKai Wang.\" This software is provided by Joseph Koshy ``as is'' and 132de3b87aSKai Wang.\" any express or implied warranties, including, but not limited to, the 142de3b87aSKai Wang.\" implied warranties of merchantability and fitness for a particular purpose 152de3b87aSKai Wang.\" are disclaimed. in no event shall Joseph Koshy be liable 162de3b87aSKai Wang.\" for any direct, indirect, incidental, special, exemplary, or consequential 172de3b87aSKai Wang.\" damages (including, but not limited to, procurement of substitute goods 182de3b87aSKai Wang.\" or services; loss of use, data, or profits; or business interruption) 192de3b87aSKai Wang.\" however caused and on any theory of liability, whether in contract, strict 202de3b87aSKai Wang.\" liability, or tort (including negligence or otherwise) arising in any way 212de3b87aSKai Wang.\" out of the use of this software, even if advised of the possibility of 222de3b87aSKai Wang.\" such damage. 232de3b87aSKai Wang.\" 24*ae500c1fSEd Maste.\" $Id: dwarf_seterrarg.3 3644 2018-10-15 19:55:01Z jkoshy $ 252de3b87aSKai Wang.\" 262de3b87aSKai Wang.Dd May 01, 2010 272de3b87aSKai Wang.Dt DWARF_SETERRARG 3 28*ae500c1fSEd Maste.Os 292de3b87aSKai Wang.Sh NAME 302de3b87aSKai Wang.Nm dwarf_seterrarg , 312de3b87aSKai Wang.Nm dwarf_seterrhand 322de3b87aSKai Wang.Nd configure error handling 332de3b87aSKai Wang.Sh LIBRARY 342de3b87aSKai Wang.Lb libdwarf 352de3b87aSKai Wang.Sh SYNOPSIS 362de3b87aSKai Wang.In libdwarf.h 372de3b87aSKai Wang.Ft Dwarf_Ptr 382de3b87aSKai Wang.Fn dwarf_seterrarg "Dwarf_Debug dbg" "Dwarf_Ptr arg" 392de3b87aSKai Wang.Ft Dwarf_Handler 402de3b87aSKai Wang.Fn dwarf_seterrhand "Dwarf_Debug dbg" "Dwarf_Handler handler" 412de3b87aSKai Wang.Sh DESCRIPTION 422de3b87aSKai WangThese functions may be used by applications to configure error handling 432de3b87aSKai Wangcallbacks. 442de3b87aSKai WangThe error handling scheme used by the library is described in 452de3b87aSKai Wang.Xr dwarf 3 . 462de3b87aSKai Wang.Pp 472de3b87aSKai WangFunction 482de3b87aSKai Wang.Fn dwarf_seterrarg 492de3b87aSKai Wangmay be used to set the callback argument passed to a configured 502de3b87aSKai Wangerror handler at the time it is invoked. 512de3b87aSKai WangArgument 522de3b87aSKai Wang.Ar arg 532de3b87aSKai Wangis the callback argument being set. 542de3b87aSKai WangArgument 552de3b87aSKai Wang.Ar dbg 562de3b87aSKai Wangcan be a debug context allocated by a prior call to 572de3b87aSKai Wang.Xr dwarf_init 3 , 582de3b87aSKai Wangor can be NULL to indicate that the library-wide callback argument 592de3b87aSKai Wangis to be set. 602de3b87aSKai Wang.Pp 612de3b87aSKai WangFunction 622de3b87aSKai Wang.Fn dwarf_seterrhand 632de3b87aSKai Wangmay be used to associate an error handler denoted by argument 642de3b87aSKai Wang.Ar handler 652de3b87aSKai Wangwith the DWARF debug context descriptor denoted by argument 662de3b87aSKai Wang.Ar dbg . 672de3b87aSKai WangArgument 682de3b87aSKai Wang.Ar dbg 692de3b87aSKai Wangshould be a debug context allocated by a prior call to 702de3b87aSKai Wang.Xr dwarf_init 3 , 712de3b87aSKai Wangor may be NULL to indicate that the library-wide error handler 722de3b87aSKai Wangis to be set. 732de3b87aSKai Wang.Sh RETURN VALUES 742de3b87aSKai WangFunction 752de3b87aSKai Wang.Fn dwarf_seterrhand 762de3b87aSKai Wangreturns the previous error handler associated with argument 772de3b87aSKai Wang.Ar dbg . 782de3b87aSKai WangIf argument 792de3b87aSKai Wang.Ar dbg 802de3b87aSKai Wangis NULL, function 812de3b87aSKai Wang.Fn dwarf_seterrhand 822de3b87aSKai Wangreturns the previous library-wide error handler. 832de3b87aSKai Wang.Pp 842de3b87aSKai WangFunction 852de3b87aSKai Wang.Fn dwarf_seterrarg 862de3b87aSKai Wangreturns the previous callback argument associated with argument 872de3b87aSKai Wang.Ar dbg . 882de3b87aSKai WangIf argument 892de3b87aSKai Wang.Ar dbg 902de3b87aSKai Wangis NULL, function 912de3b87aSKai Wang.Fn dwarf_seterrarg 922de3b87aSKai Wangreturns the previous library-wide callback argument. 932de3b87aSKai Wang.Sh COMPATIBILITY 942de3b87aSKai WangThe behavior of these functions when argument 952de3b87aSKai Wang.Ar dbg 962de3b87aSKai Wangis NULL is a local extension. 972de3b87aSKai Wang.Sh ERRORS 982de3b87aSKai WangThese functions do not set an error code. 992de3b87aSKai Wang.Sh SEE ALSO 1002de3b87aSKai Wang.Xr dwarf 3 , 1012de3b87aSKai Wang.Xr dwarf_init 3 102