This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 40/42] Convert the DWARF reader to new-style buildysm


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]