This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] dwarf2read.c: Rewrite signatured type handling
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 16 Apr 2013 09:34:47 -0600
- Subject: Re: [patch] dwarf2read.c: Rewrite signatured type handling
- References: <yjt2haj7s5bu dot fsf at ruffy2 dot mtv dot corp dot google dot com>
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> This patch simplifies and improves signature type handling a bit.
Doug> For one, it no longer calls error on certain kinds of bad debug info,
Doug> instead it just creates a TYPE_CODE_ERROR type.
Doug> I like calling error() early on - errors are detected sooner.
Doug> But this code has been in use for a fair while,
Doug> and in general we want gdb to at least limp along in the presence
Doug> of bad debug info.
Doug> Plus it paves the way for a subsequent optimization for Fission.
Doug> Regression tested on amd64-linux with/without Fission.
Doug> I will check this in in a few days if there are no objections.
No objections -- one nit, one question.
Doug> +
Doug> +static struct die_info *
Doug> +follow_die_sig (struct die_info *src_die, struct attribute *attr,
Doug> + struct dwarf2_cu **ref_cu)
Doug> +{
This function needs a comment.
Doug> + sig_type = lookup_signatured_type (signature);
Doug> + /* sig_type will be NULL if the signatured type is missing from
Doug> + the debug info. */
Doug> + if (sig_type == NULL)
Doug> + {
Doug> + error (_("Dwarf Error: Cannot find signatured DIE %s referenced"
Doug> + " from DIE at 0x%x [in module %s]"),
Doug> + hex_string (signature), src_die->offset.sect_off,
Doug> + (*ref_cu)->objfile->name);
I'm curious why there are errors calls in this function still.
Tom