-
Notifications
You must be signed in to change notification settings - Fork 13.3k
All debuginfo tests fail on sparc64 on Linux #71437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There also seem to be some non-debuginfo tests failing due to what looks like ABI-related miscompilations. |
Maybe something is wrong with the
This 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. |
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? |
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. |
Duplicates #62780, though this one has discussion so maybe the older one should be closed in favour of this. |
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 |
Managed to dig out IRC logs; this is what past me said:
|
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. |
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/ |
To follow up: I think the way we are setting breakpoints in our tests is pretty consistent and would probably be compatible with the approach of setting the breakpoint by function name and then looking one frame up. It would be good if that function was defined in a central place (so we don't have to copy-and-paste it into every test file) and then we'd have to update the test runner and documentation. |
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:
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
The text was updated successfully, but these errors were encountered: