[PATCH] DWARF 5 support: Handle line table and file indexes

Simon Marchi simon.marchi@polymtl.ca
Mon Oct 21 20:07:00 GMT 2019


On 2019-10-21 3:47 p.m., Ali Tamur wrote:
>> Update the comment for psymtab_include_file_name
> Done.
> 
>> is_valid_file_index should be a method of line_header
> Done.
> ---
> 
> *  Fix handling of file and directory indexes in line tables; in DWARF 5 the
> indexes are zero-based. Make file_names field private to abstract this detail
> from the clients. Introduce file_names, is_valid_file_index and
> file_names_size methods. Reflect these changes in clients.
> *  Handle DW_FORM_data16 in read_formatted_entries; it is used to record MD5
> of the file entries in DWARF 5.
> *  Fix a bug in line header parsing that calculates the length of the header
> incorrectly. (Seemingly this manifests itself only in DWARF 5).
> 
> Tested with CC=/usr/bin/gcc (version 8.3.0) against master branch (also with
> -gsplit-dwarf and -gdwarf-4 flags) and there was no increase in the set of
> tests that fails. (gdb still cannot debug a 'hello world' program with DWARF 5,
> so for the time being, this is all we care about).
> 
> This is part of an effort to support DWARF 5 in gdb.

Thanks, this version LGTM, please push.

Simon



More information about the Gdb-patches mailing list