Skip to content

Commit 79a6e4e

Browse files
committed
Add documentation for stdarch tests
1 parent 0a52b65 commit 79a6e4e

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

doc/debugging-gcc-lto.md

-3
This file was deleted.

doc/debugging.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Debugging
2+
3+
## How to debug GCC LTO
4+
5+
Run do the command with `-v -save-temps` and then extract the `lto1` line from the output and run that under the debugger.
6+
7+
## How to debug stdarch tests that cannot be ran locally
8+
9+
First, run the tests normally:
10+
11+
----
12+
cd build/build_sysroot/sysroot_src/library/stdarch/
13+
STDARCH_TEST_EVERYTHING=1 CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="sde -future -rtm_mode full --" TARGET=x86_64-unknown-linux-gnu ../../../../../y.sh cargo test
14+
----
15+
16+
It will show the command it ran, something like this:
17+
18+
----
19+
process didn't exit successfully: `sde -future -rtm_mode full -- /home/user/projects/rustc_codegen_gcc/build/build_sysroot/sysroot_src/library/stdarch/target/debug/deps/core_arch-fd2d75f89baae5c6` (signal: 11, SIGSEGV: invalid memory reference)
20+
----
21+
22+
Then add the `-debug` flag to it:
23+
24+
----
25+
sde -debug -future -rtm_mode full -- /home/user/projects/rustc_codegen_gcc/build/build_sysroot/sysroot_src/library/stdarch/target/debug/deps/core_arch-fd2d75f89baae5c6
26+
----
27+
28+
To see the symbols in `gdb`, specify the executable in your command:
29+
30+
----
31+
gdb /home/user/projects/rustc_codegen_gcc/build/build_sysroot/sysroot_src/library/stdarch/target/debug/deps/core_arch-fd2d75f89baae5c6
32+
----
33+
34+
and then write the `gdb` command that `sde` tells you to use, something like:
35+
36+
----
37+
target remote :51299
38+
----

0 commit comments

Comments
 (0)