z/OS Common Debug Architecture User's Guide
|
Previous topic |
Next topic |
Contents |
Index |
Contact z/OS |
Library |
PDF
Initializing libdwarf z/OS Common Debug Architecture User's Guide SC14-7310-00 |
|
|
This topic describes how the consumer application initializes libdwarf to process the information within an ELF object file or GOFF program object file. Steps to initialize libdwarf for an ELF object fileIf the object format ELF, and the ELF descriptor object is available, use the dwarf_elf_init operation to initialize the libdwarf object. For example:
It is important to check the return code to ensure that the processing succeeded. dwarf_elf_init returns DW_DLV_OK on successful completion. It returns DW_DLV_ERROR if an error occurs. dwarf_elf_init returns DW_DLV_NO_ENTRY if the ELF descriptor does not contain DWARF data. If the processing was successful, then dbg contains the Dwarf_Debug object which is used to interact with libdwarf. Note: Other operations that can
be used are dwarf_elf_init_b. Consult the libdwarf
documentation for details on using these operations.
Steps to initialize libdwarf for an GOFF program objectIf reading a GOFF program object, use the dwarf_goff_init_with_PO_filename operation to initialize the libdwarf object. For example:
It is important to check the return code to ensure that the processing succeeded. dwarf_elf_init returns DW_DLV_OK on successful completion. It returns DW_DLV_ERROR if an error occurs. dwarf_elf_init returns DW_DLV_NO_ENTRY if the ELF descriptor does not contain DWARF. data. dwarf_goff_init_with_PO_filename returns DW_DLV_NO_ENTRY if the GOFF program object file does not contain DWARF data. Unlike ELF object, when handling GOFF program object, the relocation logic is handled by the libdwarf initialization processing. Note: Other
operations that can be used are dwarf_goff_init_with_csvquery_token.
Consult the libdwarf documentation for details on using these operations.
|
Copyright IBM Corporation 1990, 2013 |