Open
Description
One of the few remaining issues on sparc64 on Linux are the debuginfo tests, they all fail which is why I assume we're missing some definitions here or there something regarding the debugging part is generally broken:
test [debuginfo-gdb] debuginfo/borrowed-c-style-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/borrowed-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/borrowed-basic.rs ... FAILED
test [debuginfo-gdb] debuginfo/function-call.rs ... FAILED
test [debuginfo-gdb] debuginfo/generic-enum-with-different-disr-sizes.rs ... FAILED
test [debuginfo-gdb] debuginfo/generic-struct.rs ... FAILED
test [debuginfo-gdb] debuginfo/evec-in-struct.rs ... FAILED
test [debuginfo-gdb] debuginfo/extern-c-fn.rs ... FAILED
test [debuginfo-gdb] debuginfo/gdb-pretty-struct-and-enums.rs ... FAILED
test [debuginfo-gdb] debuginfo/by-value-self-argument-in-trait-impl.rs ... FAILED
test [debuginfo-gdb] debuginfo/generic-struct-style-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/include_string.rs ... FAILED
test [debuginfo-gdb] debuginfo/generic-tuple-style-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-unique-closure.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-stack-closure.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-match.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-unconditional-loop.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-for-loop.rs ... FAILED
test [debuginfo-gdb] debuginfo/destructured-local.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-while.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-in-if.rs ... FAILED
test [debuginfo-gdb] debuginfo/destructured-fn-argument.rs ... FAILED
test [debuginfo-gdb] debuginfo/lexical-scope-with-macro.rs ... FAILED
test [debuginfo-gdb] debuginfo/multi-cgu.rs ... FAILED
test [debuginfo-gdb] debuginfo/multiple-functions-equal-var-names.rs ... FAILED
test [debuginfo-gdb] debuginfo/multiple-functions.rs ... FAILED
test [debuginfo-gdb] debuginfo/shadowed-argument.rs ... FAILED
test [debuginfo-gdb] debuginfo/name-shadowing-and-scope-nesting.rs ... FAILED
test [debuginfo-gdb] debuginfo/static-method-on-struct-and-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/simd.rs ... FAILED
test [debuginfo-gdb] debuginfo/simple-lexical-scope.rs ... FAILED
test [debuginfo-gdb] debuginfo/shadowed-variable.rs ... FAILED
test [debuginfo-gdb] debuginfo/tuple-style-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/tuple-in-tuple.rs ... FAILED
test [debuginfo-gdb] debuginfo/tuple-struct.rs ... FAILED
test [debuginfo-gdb] debuginfo/struct-style-enum.rs ... FAILED
test [debuginfo-gdb] debuginfo/var-captured-in-sendable-closure.rs ... FAILED
test [debuginfo-gdb] debuginfo/tuple-in-struct.rs ... FAILED
Any pointers where I should start looking?
Full log at: https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=sparc64&ver=1.42.0%2Bdfsg1-1&stamp=1586554512&raw=0
CC @psumbera
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jonas-schievink commentedon Apr 22, 2020
There also seem to be some non-debuginfo tests failing due to what looks like ABI-related miscompilations.
tromey commentedon May 20, 2020
Maybe something is wrong with the
gdb
you are using, because the logs are full of things likeThis could also be a compiler bug (debuggers are very susceptible to GIGO) -- but I would start by verifying that gdb works on a tiny C program first.
glaubitz commentedon May 28, 2020
GDB generally works fine on sparc64. We're using it extensively on sparc64 to debug C/C++ programs.
Any suggestions on how to test GDB properly?
tromey commentedon May 30, 2020
Seeing if gdb was working properly is just the first step. Since it's working, there's no easy road any more, just looking at the debug info and/or debugging gdb to see where the bug lies.
jrtc27 commentedon Jul 29, 2020
Duplicates #62780, though this one has discussion so maybe the older one should be closed in favour of this.
jrtc27 commentedon Jul 29, 2020
As mentioned on IRC with @glaubitz I have a strange sense of deja vu here. I recall looking at this before and deciding that the tests just fundamentally wouldn't work on SPARC, as they broke on function calls, i.e. the SPARC CALL instruction, which has a delay slot, and that the delay slot was generally filled with part of the code that comes before the function call in the source code, so when probing with GDB it looks like some of the code hasn't yet executed (which it hasn't, but it will have by the time control is transferred to the callee). I think my conclusion was it could "easily" be fixed if all the magic "break on this line" comments were instead calls to a magic "please break" function, with GDB configured to break in the callee rather than the caller (plus a
frame 1
in GDB). But that's still a bit of an undertaking. And I can't for the life of me discover any notes from past me about this anywhere... perhaps it's just back in IRC logs, or I never wrote anything up about it.jrtc27 commentedon Nov 12, 2020
Managed to dig out IRC logs; this is what past me said:
pnkfelix commentedon Oct 17, 2022
visited for wg-debugging triage
we discussed this for a bit. @michaelwoerister had some ideas for ways we might revise the debuginfo tests to be more robust to targets that are feature delay-slots (and are making use of them when compiling these tests).
I think our big first step is to find someone who can replicate these problems; I'm going to see if I can get access to a SPARC64 system (or emulator) that can replicate the issues. If not, then we'll have to look around for a member of the community who is willing to test some of these ideas out.
jrtc27 commentedon Oct 17, 2022
The GCC compile farm has various sparc64 machines available for anyone working on open-source projects (not just GCC) https://cfarm.tetaneutral.net/machines/list/
2 remaining items