libdrgn: debug_info: support DWARF 3 forms for loclistptr

DWARF 3 uses DW_FORM_data4 or DW_FORM_data8 for DW_AT_location
loclistptrs.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2021-08-13 17:12:18 -07:00
parent ad2119aaa3
commit 611e4d90b2

View File

@ -1862,7 +1862,12 @@ drgn_dwarf_location(struct drgn_debug_info_module *module,
{
struct drgn_error *err;
switch (attr->form) {
/* DWARF 3 */
case DW_FORM_data4:
case DW_FORM_data8:
/* DWARF 4-5 */
case DW_FORM_sec_offset:
/* DWARF 5 */
case DW_FORM_loclistx: {
Dwarf_Die cu_die;
Dwarf_Half cu_version;