libdwarf: Using dwarf_discr_list()

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_dbg | The applicable Dwarf_Debug
  dw_die | The applicable Dwarf_Die
  dw_attr | The applicable Dwarf_Attribute
  dw_attrnum,The | attribute number passed in to shorten this example a bit.
  dw_isunsigned,The | attribute number passed in to shorten this example a bit.
  dw_theform,The | form number passed in to shorten this example a bit.
  dw_error | The usual error pointer.

Returns
  Returns DW_DLV_OK etc
  */
  int example_discr_list(Dwarf_Debug dbg,
  Dwarf_Die die,
  Dwarf_Attribute attr,
  Dwarf_Half attrnum,
  Dwarf_Bool isunsigned,
  Dwarf_Half theform,
  Dwarf_Error <em>error)
  {
  /</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.
  Dwarf_Die
  struct Dwarf_Die_s * Dwarf_Die
  Definition libdwarf.h:627
  Dwarf_Attribute
  struct Dwarf_Attribute_s * Dwarf_Attribute
  Definition libdwarf.h:677
  Dwarf_Error
  struct Dwarf_Error_s * Dwarf_Error
  Definition libdwarf.h:611
  Dwarf_Debug
  struct Dwarf_Debug_s * Dwarf_Debug
  Definition libdwarf.h:617
  Dwarf_Bool
  int Dwarf_Bool
  Definition libdwarf.h:202
  Dwarf_Half
  unsigned short Dwarf_Half
  Definition libdwarf.h:203