public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Bail out for unhandled dwarf-5 CU type
@ 2021-02-09  7:33 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-02-09  7:33 UTC (permalink / raw)
  To: dwz, jakub

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
 	{

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-09  7:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  7:33 [committed] Bail out for unhandled dwarf-5 CU type Tom de Vries

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).