public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Mark Wielaard <mark@klomp.org>, binutils@sourceware.org
Subject: Re: [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.
Date: Thu, 24 Sep 2020 11:23:49 +0100	[thread overview]
Message-ID: <31edd139-9e1f-3cd0-b413-b0489bdd0616@redhat.com> (raw)
In-Reply-To: <20200923145152.27111-1-mark@klomp.org>

Hi Mark,

> binutils/ChangeLog:
> 
> 	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
> 	for dwarf_version 5 just as version 3 and 4 (only 2 is different).
> 	(process_debug_info): Allow DW_UT_partial.

Approved - please apply - I do however have one small suggested change:

> -      else if (dwarf_version == 3 || dwarf_version == 4)
> +      else if (dwarf_version == 3 || dwarf_version == 4 || dwarf_version == 5)
>  	SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end);
>        else
> -	error (_("Internal error: DWARF version is not 2, 3 or 4.\n"));
> +	error (_("Internal error: DWARF version is not 2, 3, 4 or 5.\n"));

I think that it is safe to say that say that DW_FORM_ref_addr is not going
to change in future versions of the DWARF spec, so it would be easier/simpler
to change the check to be "dwarf_version > 2" and the error message to be
"DW_FORM_ref_addr is not supported in DWARF version 1".

Cheers
  Nick


  parent reply	other threads:[~2020-09-24 10:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 14:51 Mark Wielaard
2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
2020-09-24 10:26   ` Nick Clifton
2020-09-24 21:12     ` Mark Wielaard
2020-09-25  2:23       ` Alan Modra
2020-09-25  9:38         ` Mark Wielaard
2020-09-23 14:51 ` [PATCH 3/3] readelf: Show Unit Type for DWARF5 Mark Wielaard
2020-09-24 10:27   ` Nick Clifton
2020-09-24 10:23 ` Nick Clifton [this message]
2020-09-24 20:55   ` [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31edd139-9e1f-3cd0-b413-b0489bdd0616@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).