public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Allow .debug_macro section with version 5
@ 2021-02-09  7:32 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-02-09  7:32 UTC (permalink / raw)
  To: dwz, jakub

Hi,

With this executable:
...
$ gcc -ggdb3 -gdwarf-5 hello.c
...
we run into:
...
$ cp a.out 1; cp 1 2; ./dwz-for-test -m 3 1 2
./dwz-for-test: 1: Unhandled .debug_macro version 5
./dwz-for-test: 2: Unhandled .debug_macro version 5
./dwz-for-test: No suitable DWARF found for multifile optimization
...

Fix this by allowing version 5 when reading .debug_macro.

Committed to trunk.

Thanks,
- Tom

Allow .debug_macro section with version 5

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

	PR dwz/27368
	* dwz.c (read_macro): Allow version 5 .debug_macro.

---
 dwz.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dwz.c b/dwz.c
index 10860bf..1c4ffbf 100644
--- a/dwz.c
+++ b/dwz.c
@@ -9844,7 +9844,8 @@ read_macro (DSO *dso)
 	}
 
       version = read_16 (ptr);
-      if (version != 4)
+      bool supported_version_p = version >= 4 && version <= 5;
+      if (!supported_version_p)
 	{
 	  error (0, 0, "%s: Unhandled .debug_macro version %d", dso->filename,
 		 version);

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

only message in thread, other threads:[~2021-02-09  7:32 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:32 [committed] Allow .debug_macro section with version 5 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).