[committed] Bail out for unhandled dwarf-5 CU type

Tom de Vries tdevries@suse.de
Tue Feb 9 07:33:00 GMT 2021


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
 	{


More information about the Dwz mailing list