public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Bail out for unhandled dwarf-5 CU type
Date: Tue, 9 Feb 2021 08:33:00 +0100	[thread overview]
Message-ID: <20210209073258.GA5513@delia> (raw)

Hi,

With this exec:
...
$ gcc -gdwarf-5 -fdebug-types-section hello.c
...
we run into:
...
$ dwz a.out
dwz: a.out: DWARF CU type DW_UT_type unhandled
dwz: a.out: Could not find DWARF abbreviation 8620
...

Remove the second message by bailing out of read_debug_info once the
unhandled dwarf-5 CU type is encountered.

Committed to trunk.

Thanks,
- Tom

Bail out for unhandled dwarf-5 CU type

2021-02-09  Tom de Vries  <tdevries@suse.de>

	PR dwz/27372
	* dwz.c (read_debug_info): Goto fail when encountering unhandled
	dwarf-5 CU type.

---
 dwz.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dwz.c b/dwz.c
index 1c4ffbf..d6b9df0 100644
--- a/dwz.c
+++ b/dwz.c
@@ -6584,9 +6584,11 @@ read_debug_info (DSO *dso, int kind, unsigned int *die_count)
 	{
 	  value = read_8 (ptr);
 	  if (value != DW_UT_compile && value != DW_UT_partial)
-	    error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
-		   get_DW_UT_str (value));
-
+	    {
+	      error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
+		     get_DW_UT_str (value));
+	      goto fail;
+	    }
 	}
       else
 	{

                 reply	other threads:[~2021-02-09  7:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210209073258.GA5513@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    /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).