summaryrefslogtreecommitdiff
path: root/tests/testfile-dwarf-45.source
Commit message (Collapse)AuthorAgeFilesLines
* libdw: dwarf_get_units find split units from .dwo.Mark Wielaard2018-05-191-0/+8
| | | | | | | | | | | | For a skeleton DIE dwarf_get_units should provide the split DIE as subdie. This implements that by trying to find the (named) .dwo file and finding the matching CU in it. The .dwo file is search relative to the current DWARF or using the comp_dir of the skeleton DIE. Also fixes a small issue with str_offsets_base_off which is tested in the new testcase (by getting the name of the split CU DIE). Signed-off-by: Mark Wielaard <mark@klomp.org>
* libdw: Handle DWARF5 line tables in dwarf_getsrclines.Mark Wielaard2018-05-111-0/+81
In DWARF5 the actual line number table format doesn't change, except for not allowing DW_LNE_define_file (but we still just accept it). The changes are the header having new fields for address and segment selector sizes, and new formats for the directory and file names tables. The directory and file name tables are much more flexible in DWARF5, but we only interpret the actual names and file/dir index relationships, skipping/ignoring any other information. There also is no new interface yet to get at the new directory and file properties. There is some small confusion about the file name table indexing. Older DWARF versions explicitly called the first file name table 1. DWARF5 implies the first index is 0 (but for file attributes, zero means not associated with a file). We get away with that by having an actual zero index for older DWARF versions (the null_fill). It looks like gcc gets around it by explicitly duplicating the first (0) and second (1) file name entry in the table. This can also be seen in the new testcase. The patch looks big because of moving a few initializations around and because the code that is different for older/newer DWARF got moved under if statements. But the original old DWARF code path didn't really change. Signed-off-by: Mark Wielaard <mark@klomp.org>