This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 40/42] Convert the DWARF reader to new-style buildysm
- From: Simon Marchi <simark at simark dot ca>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 10 Jul 2018 00:36:01 -0400
- Subject: Re: [RFA 40/42] Convert the DWARF reader to new-style buildysm
- References: <20180523045851.11660-1-tom@tromey.com> <20180523045851.11660-41-tom@tromey.com>
Just some nits, otherwise it LGTM.
On 2018-05-23 12:58 AM, Tom Tromey wrote:
> @@ -11129,12 +11139,12 @@ read_namespace_alias (struct die_info *die, struct dwarf2_cu *cu)
> global only in Ada. */
>
> static struct using_direct **
> -using_directives (enum language language)
> +using_directives (struct dwarf2_cu *cu)
The comment above would need to be updated.
> @@ -11578,7 +11588,13 @@ setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
> else
> {
> gdb_assert (tu_group->symtabs == NULL);
> - restart_symtab (tu_group->compunit_symtab, "", 0);
> + gdb_assert (!bool (cu->builder));
That looks odd, can't you do the usual
gdb_assert (cu->builder == nullptr) ?
There are other instances of this.
> @@ -24200,6 +24237,7 @@ dwarf_parse_macro_header (const gdb_byte **opcode_definitions,
>
> static void
> dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile,
> + struct dwarf2_cu *cu,
> bfd *abfd,
> const gdb_byte *mac_ptr, const gdb_byte *mac_end,
> struct macro_source_file *current_file,
You can probably remove the dwarf2_per_objfile parameter, since it's<
available as:
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
Simon