This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/3] Initial Fission support, the actual Fission stuff
On Fri, Apr 27, 2012 at 11:15 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> ? * symfile.h (dwarf2_debug_sections): New members addr, ref.
>
> I think you have to update xcoffread.c as well.
Righto.
> Doug> + ?struct bfd *dwo_bfd;
>
> I think it is more normal to use the 'bfd' typedef.
> I see a few uses of 'struct bfd' in the tree, but 10x more for the
> typedef.
Yeah, done.
> Doug> + ? ? ?/* We can't set abfd until now because the section may be empty or
> Doug> + ?not present, in which case section->asection will be NULL. ?*/
> Doug> + ? ? ?abfd = section->asection->owner;
> Doug> +
> Doug> ? ? ? ?if (types_htab == NULL)
> Doug> - types_htab = allocate_signatured_type_table (objfile);
> Doug> + {
> Doug> + ? if (dwo_file)
> Doug> + ? ? types_htab = allocate_dwo_unit_table (objfile);
> Doug> + ? else
> Doug> + ? ? types_htab = allocate_signatured_type_table (objfile);
> Doug> + }
>
> Doug> ? ? ? ?if (dwarf2_die_debug)
> Doug> ? fprintf_unfiltered (gdb_stdlog, "Reading signatured types for %s:\n",
> Doug> - ? ? ? ? ? ? ? ? ? ? bfd_get_filename (abfd));
> Doug> + ? ? ? ? ? ? ? ? ? ? bfd_get_filename (objfile->obfd));
>
> The code uses abfd, but the debugging print uses objfile->obfd.
> If this is intentional, I think it deserves a clarifying comment.
Done.
> Doug> + ? /* FIXME: Why do ref attributes use DW_ADDR instead of DW_UNSND? ?*/
>
> Doug> + ? /* FIXME: Why do ref attributes use DW_ADDR instead of DW_UNSND? ?*/
>
> IIRC you fixed these already.
Righto, removed.
> Doug> +static struct bfd *
> Doug> +try_open_dwo_file (const char *file_name)
> Doug> +{
> Doug> + ?bfd *sym_bfd;
> [...]
>
> I couldn't find any code to close these BFDs.
> I think it may be an oversight in free_dwo_file.
Indeed.
> Also, I wonder whether this needs special code for the case where the
> underlying object file is modified.
That will require some API enhancements to the file readers (there
could be an arbitrary number of such files, and I don't want symfile.c
to have to know about them).
I'm going to submit that as a separate patch.
As discussed off list, I've committed the patches to date.
Regression tested without fission. A few failures remain with -gfission.
I still need a NEWS entry as well. That will come with the followup patch.