summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authorKJ Tsanaktsidis <[email protected]>2023-04-18 15:47:54 +1000
committerNobuyoshi Nakada <[email protected]>2023-04-27 11:25:57 +0900
commitdd406c5a911d2f4a16ce97016666760713540185 ()
treee86b5c465ac0d0f1887f543111c3fca6a88b812d /addr2line.c
parent417eb83b48f2e9eb551e8dd5163778c3ef278972 (diff)
Skip DW_FORM_GNU_* forms in addr2line.c
DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt refer to data stored in an external ELF file specified by a .gnu_debugaltlink attribute. These attributes are generated by dwz(1), which extracts DWARF data common amongst several files and stores it in a single, new file. It leaves behind these two forms in the original file to point at the new, common data. We don't support actually reading the .gnu_debugaltlink file in addr2line.c (and maybe we don't really need to), but we do need to know how to read the actual value of these forms so we can skip over the right number of bytes and not lose track of where we are in the CU.
Notes: Merged: https://.com/ruby/ruby/pull/7731
-rw-r--r--addr2line.c14
1 files changed, 13 insertions, 1 deletions
@@ -840,7 +840,11 @@ enum
DW_FORM_addrx1 = 0x29,
DW_FORM_addrx2 = 0x2a,
DW_FORM_addrx3 = 0x2b,
- DW_FORM_addrx4 = 0x2c
};
/* Range list entry encodings */
@@ -1315,6 +1319,14 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
case DW_FORM_addrx4:
set_addr_idx_value(v, read_uint32(&reader->p));
break;
case 0:
goto fail;
break;