This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] support for skeletonless DWARF Fission Type Units
- From: Doug Evans <dje at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Cc: Cary Coutant <ccoutant at google dot com>
- Date: Mon, 2 Jun 2014 17:18:11 -0700
- Subject: Re: [PATCH] support for skeletonless DWARF Fission Type Units
- Authentication-results: sourceware.org; auth=none
- References: <yjt21tvla4zz dot fsf at ruffy dot mtv dot corp dot google dot com>
On Thu, May 22, 2014 at 2:16 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> This patch adds support for skeletonless DWARF Fission Type Units.
>
> Today, TUs have two pieces:
> 1) a small stub or skeleton, lives in the .o file
> 2) the guts of the TU, lives in the .dwo file
>
> There's not much in the skeleton, and it can be removed,
> saving space in the binary.
>
> The corresponding GCC support is being worked on by Cary.
> This patch implements the GDB side.
>
> Regression tested on amd64-linux with/without skeletonless TUs,
> with/without fission, with/without .gdb_index.
> [Though I'm sure there's a couple of combinations I didn't test.]
>
> 2014-05-21 Doug Evans <dje@google.com>
>
> Add support for skeletonless type units.
> * dwarf2read.c (struct dwarf2_per_objfile): New member
> n_allocated_type_units.
> (struct dwarf2_per_objfile) <tu_stats>: New member
> nr_all_type_units_reallocs.
> (create_signatured_type_table_from_index): Initialize
> n_allocated_type_units
> (create_all_type_units): Ditto.
> (add_type_unit): Move up in file. New arg slot.
> All callers updated. Increase space for all_type_units more
> efficiently.
> (fill_in_sig_entry_from_dwo_entry): Handle psymtabs.
> (lookup_dwo_signatured_type): Handle skeletonless TUs.
> (lookup_dwp_signatured_type): Ditto.
> (init_tu_and_read_dwo_dies): New arg use_existing_cu.
> All callers updated.
> (build_type_psymtabs_1): Leave type_unit_groups as
> NULL if no TUs present.
> (print_tu_stats): New function.
> (process_skeletonless_type_unit): New function.
> (process_dwo_file_for_skeletonless_type_units): New
> function.
> (process_skeletonless_type_units): New function.
> (dwarf2_build_psymtabs_hard): Handle skeletonless TUs.
> Call print tu_stats if debugging enabled.
I have committed this.