[committed] Allow .debug_macro section with version 5
Tom de Vries
tdevries@suse.de
Tue Feb 9 07:32:40 GMT 2021
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);
More information about the Dwz
mailing list