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_hasform.3 3640 2018-10-14 14:09:13Z jkoshy $ 252de3b87aSKai Wang.\" 262de3b87aSKai Wang.Dd May 22, 2010 272de3b87aSKai Wang.Dt DWARF_HASFORM 3 28*ae500c1fSEd Maste.Os 292de3b87aSKai Wang.Sh NAME 302de3b87aSKai Wang.Nm dwarf_hasform , 312de3b87aSKai Wang.Nm dwarf_whatform , 322de3b87aSKai Wang.Nm dwarf_whatform_direct 332de3b87aSKai Wang.Nd query attribute forms 342de3b87aSKai Wang.Sh LIBRARY 352de3b87aSKai Wang.Lb libdwarf 362de3b87aSKai Wang.Sh SYNOPSIS 372de3b87aSKai Wang.In libdwarf.h 382de3b87aSKai Wang.Ft int 392de3b87aSKai Wang.Fo dwarf_hasform 402de3b87aSKai Wang.Fa "Dwarf_Attribute attr" 412de3b87aSKai Wang.Fa "Dwarf_Half form" 422de3b87aSKai Wang.Fa "Dwarf_Bool *ret" 432de3b87aSKai Wang.Fa "Dwarf_Error *err" 442de3b87aSKai Wang.Fc 452de3b87aSKai Wang.Ft int 462de3b87aSKai Wang.Fo dwarf_whatform 472de3b87aSKai Wang.Fa "Dwarf_Attribute attr" 482de3b87aSKai Wang.Fa "Dwarf_Half *retform" 492de3b87aSKai Wang.Fa "Dwarf_Error *err" 502de3b87aSKai Wang.Fc 512de3b87aSKai Wang.Ft int 522de3b87aSKai Wang.Fo dwarf_whatform_direct 532de3b87aSKai Wang.Fa "Dwarf_Attribute attr" 542de3b87aSKai Wang.Fa "Dwarf_Half *retform" 552de3b87aSKai Wang.Fa "Dwarf_Error *err" 562de3b87aSKai Wang.Fc 572de3b87aSKai Wang.Sh DESCRIPTION 582de3b87aSKai WangFunction 592de3b87aSKai Wang.Fn dwarf_hasform 602de3b87aSKai Wangindicates whether the DWARF attribute denoted by argument 612de3b87aSKai Wang.Ar attr 622de3b87aSKai Wanghas the attribute form specified by argument 632de3b87aSKai Wang.Ar form . 642de3b87aSKai WangIf the attribute has the specified form, then 652de3b87aSKai Wangargument 662de3b87aSKai Wang.Ar ret 672de3b87aSKai Wangis set to a non-zero value, otherwise it is set to zero. 682de3b87aSKai WangIf argument 692de3b87aSKai Wang.Ar err 702de3b87aSKai Wangis non-NULL, it will be used to return an error descriptor in 712de3b87aSKai Wangcase of an error. 722de3b87aSKai Wang.Pp 732de3b87aSKai WangFunction 742de3b87aSKai Wang.Fn dwarf_whatform 752de3b87aSKai Wangsets the location specified by argument 762de3b87aSKai Wang.Ar retform 772de3b87aSKai Wangto the attribute form code for the DWARF attribute referenced 782de3b87aSKai Wangby argument 792de3b87aSKai Wang.Ar attr . 802de3b87aSKai WangIf the attribute referenced by argument 812de3b87aSKai Wang.Ar attr 822de3b87aSKai Wanghas an indirect form attribute, this function will return the final 832de3b87aSKai Wangform for the attribute. 842de3b87aSKai WangIf argument 852de3b87aSKai Wang.Ar err 862de3b87aSKai Wangis non-NULL, it will be used to return an error descriptor in 872de3b87aSKai Wangcase of an error. 882de3b87aSKai Wang.Pp 892de3b87aSKai WangFunction 902de3b87aSKai Wang.Fn dwarf_whatform_direct 912de3b87aSKai Wangsets the location specified by argument 922de3b87aSKai Wang.Ar retform 932de3b87aSKai Wangto the attribute form code for the DWARF attribute referenced 942de3b87aSKai Wangby argument 952de3b87aSKai Wang.Ar attr . 962de3b87aSKai WangIf the form is an indirect form, the function sets the location 972de3b87aSKai Wangspecified by argument 982de3b87aSKai Wang.Ar retform 992de3b87aSKai Wangto 1002de3b87aSKai Wang.Dv DW_FORM_indirect . 1012de3b87aSKai WangIf argument 1022de3b87aSKai Wang.Ar err 1032de3b87aSKai Wangis non-NULL, it will be used to return an error descriptor in 1042de3b87aSKai Wangcase of an error. 1052de3b87aSKai Wang.Sh RETURN VALUES 1062de3b87aSKai WangThese functions return 1072de3b87aSKai Wang.Dv DW_DLV_OK 1082de3b87aSKai Wangon success. 1092de3b87aSKai WangIn case of an error, these functions return 1102de3b87aSKai Wang.Dv DW_DLV_ERR 1112de3b87aSKai Wangand set argument 1122de3b87aSKai Wang.Ar err . 1132de3b87aSKai Wang.Sh ERRORS 1142de3b87aSKai WangThese functions may fail with the following errors: 1152de3b87aSKai Wang.Bl -tag -width ".Bq Er DW_DLE_ARGUMENT" 1162de3b87aSKai Wang.It Bq Er DW_DLE_ARGUMENT 1172de3b87aSKai WangAny of the arguments 1182de3b87aSKai Wang.Ar attr , 1192de3b87aSKai Wang.Ar ret , 1202de3b87aSKai Wangor 1212de3b87aSKai Wang.Ar retform 1222de3b87aSKai Wangwas NULL. 1232de3b87aSKai Wang.El 1242de3b87aSKai Wang.Sh SEE ALSO 1252de3b87aSKai Wang.Xr dwarf 3 , 1262de3b87aSKai Wang.Xr dwarf_attr 3 , 1272de3b87aSKai Wang.Xr dwarf_hasattr 3 128