libdwarf
|
Functions | |
DW_API int | dwarf_debug_addr_table (Dwarf_Debug dw_dbg, Dwarf_Unsigned dw_section_offset, Dwarf_Debug_Addr_Table *dw_table_header, Dwarf_Unsigned *dw_length, Dwarf_Half *dw_version, Dwarf_Small *dw_address_size, Dwarf_Unsigned *dw_at_addr_base, Dwarf_Unsigned *dw_entry_count, Dwarf_Unsigned *dw_next_table_offset, Dwarf_Error *dw_error) |
Return a .debug_addr table. | |
DW_API int | dwarf_debug_addr_by_index (Dwarf_Debug_Addr_Table dw_dat, Dwarf_Unsigned dw_entry_index, Dwarf_Unsigned *dw_address, Dwarf_Error *dw_error) |
Return .debug_addr address given table index. | |
DW_API void | dwarf_dealloc_debug_addr_table (Dwarf_Debug_Addr_Table dw_dat) |
dealloc (free) a Dwarf_Attr_Table record. | |
Reading just the .debug_addr section.
These functions solely useful for reading that section. It seems unlikely you would have a reason to call these. The functions getting attribute values use the section when appropriate without using these functions.
DW_API void dwarf_dealloc_debug_addr_table | ( | Dwarf_Debug_Addr_Table | dw_dat | ) |
dealloc (free) a Dwarf_Attr_Table record.
dw_dat | Pass in a valid Dwarf_Debug_Addr_Table pointer. Does nothing if the dw_dat field is NULL. |
DW_API int dwarf_debug_addr_by_index | ( | Dwarf_Debug_Addr_Table | dw_dat, |
Dwarf_Unsigned | dw_entry_index, | ||
Dwarf_Unsigned * | dw_address, | ||
Dwarf_Error * | dw_error | ||
) |
Return .debug_addr address given table index.
dw_dat | Pass in a Dwarf_Debug_Addr_Table pointer. |
dw_entry_index | Pass in a Dwarf_Debug_Addr_Table index to an address. If out of the valid range 0 through dw_entry_count-1 the function returns DW_DLV_NO_ENTRY. |
dw_address | Returns an address in the program through the pointer. |
dw_error | The usual error detail return pointer. |
DW_API int dwarf_debug_addr_table | ( | Dwarf_Debug | dw_dbg, |
Dwarf_Unsigned | dw_section_offset, | ||
Dwarf_Debug_Addr_Table * | dw_table_header, | ||
Dwarf_Unsigned * | dw_length, | ||
Dwarf_Half * | dw_version, | ||
Dwarf_Small * | dw_address_size, | ||
Dwarf_Unsigned * | dw_at_addr_base, | ||
Dwarf_Unsigned * | dw_entry_count, | ||
Dwarf_Unsigned * | dw_next_table_offset, | ||
Dwarf_Error * | dw_error | ||
) |
Return a .debug_addr table.
Allocates and returns a pointer to a Dwarf_Debug_Addr_Table as well as the contents of the record.
Other than dw_debug and dw_error and dw_table_header a NULL passed in as a pointer argument means the return value will not be set through the pointer, so a caller can pass NULL for return values of no immediate interest.
It is only intended to enable printing of the simple DWARF5 .debug_addr section (by dwarfdump).
When emitting DWARF4, gcc may emit a GNU-specified .debug_addr format. If some CU has been opened then this call will work, but the single table will have all the entries for all CUs.
dw_dbg | The Dwarf_Debug of interest. |
dw_section_offset | Pass in the section offset of a table header. Start with zero. If the passed-in offset is past the last byte of the table the function returns DW_DLV_NO_ENTRY. |
dw_table_header | On success Returns a pointer to a Dwarf_Debug_Addr_Table for use with dwarf_get_attr_by_index(). |
dw_length | On success Returns the length in bytes of this contribution to .debug_addr from the table header, including the table length field and the array of addresses. |
dw_version | On success returns the version number, which should be 5. |
dw_address_size | On success returns the address size of the address entries in this table. |
dw_at_addr_base | On success returns the value that will appear in some DW_AT_addr_base attribute. |
dw_entry_count | On success returns the number of table entries in this table instance. |
dw_next_table_offset | On success returns the offset of the next table in the section. Use the offset returned in the next call to this function. |
dw_error | The usual error detail return pointer. |