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: [patch] dwarf2read.c: Rewrite signatured type handling


>>>>> "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


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