https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110466
--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Andrew Pinski from comment #4)
> > (In reply to David Malcolm from comment #3)
> > >
> > > Reading symbols from
> > > /home/dmalcolm/build/gcc/testsuite/jit4/jit-debuginfo.o...Dwarf Error:
> > > wrong
> > > version in compilation unit header (is 5, should be 2, 3, or 4) [in module
> > > /home/dmalcolm/build/gcc/testsuite/jit4/jit-debuginfo.o]
> > >
> > > though I'm not sure if that's the cause of the error.
> >
> > Those look depedenent on the binutils version that is in use. I suspect if
> > there is a newer version of binutils installed, it would just work. Dwarf5
> > was added to binutils version 2.35.2 . Though maybe it is finding the wrong
> > readelf ...
>
> Or rather it is gdb that is complaining and a newer gdb version is needed.
Yeah; I think the gdb version is too old.
Adding the following patch turns this into an "unsupported" (on this host, at
least):
diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp
index 3568dbb..8bf7e51 100644
--- a/gcc/testsuite/jit.dg/jit.exp
+++ b/gcc/testsuite/jit.dg/jit.exp
@@ -440,6 +440,10 @@ proc jit-check-debug-info { obj_file cmds match } {
send $cmd
}
expect {
+ -re "Dwarf Error: wrong version in compilation unit header" {
+ set testcase [testname-for-summary]
+ unsupported "$testcase: gdb does not support dwarf version"
+ }
-re $match { pass OK }
default { fail FAIL }
}
I'll try the combination of these patches on my regular x86_64 workstation...