libdwarf
Loading...
Searching...
No Matches
Using dwarf_discr_list()

Example using dwarf_discr_list, dwarf_formblock.

Example using dwarf_discr_list, dwarf_formblock.

An example calling dwarf_get_form_class, dwarf_discr_list, and dwarf_formblock. and the dwarf_deallocs applicable.

See also
dwarf_discr_list
dwarf_get_form_class
dwarf_formblock
Parameters
dw_dbgThe applicable Dwarf_Debug
dw_dieThe applicable Dwarf_Die
dw_attrThe applicable Dwarf_Attribute
dw_attrnum,Theattribute number passed in to shorten this example a bit.
dw_isunsigned,Theattribute number passed in to shorten this example a bit.
dw_theform,Theform number passed in to shorten this example a bit.
dw_errorThe usual error pointer.
Returns
Returns DW_DLV_OK etc
*/
int example_discr_list(Dwarf_Debug dbg,
Dwarf_Die die,
Dwarf_Half attrnum,
Dwarf_Bool isunsigned,
Dwarf_Half theform,
{
/</em> The example here assumes that
attribute attr is a DW_AT_discr_list.
isunsigned should be set from the signedness
of the parent of 'die' per DWARF rules for
DW_AT_discr_list.
struct Dwarf_Die_s * Dwarf_Die
Definition libdwarf.h:627
struct Dwarf_Attribute_s * Dwarf_Attribute
Definition libdwarf.h:677
struct Dwarf_Error_s * Dwarf_Error
Definition libdwarf.h:611
struct Dwarf_Debug_s * Dwarf_Debug
Definition libdwarf.h:617
int Dwarf_Bool
Definition libdwarf.h:202
unsigned short Dwarf_Half
Definition libdwarf.h:203