Single stepping requires setting software breakpoint at address 0x0. This results in input/output error instead of SIGSEGV. Using “continue” instead of single stepping avoids setting of software breakpoint at address 0x0.
Diff Detail
- Repository
- rL LLVM
Event Timeline
I believe this defeats the purpose of the whole test, which (I think) is to check that crashes during the actual "step" operation are handled correctly. We already have other tests which test crashing after a "continue" so I don't think this adds any value. A better course of action in my opinion would be to xfail or skip this test.
It will be tricky, but I think the proper way to make these kinds of things work with software single stepping is to detect (during the instruction emulation phase) that the instruction will crash (because it jumps to unmapped memory, for instance). Then you can omit putting the breakpoint and just issue the "continue" command normally, and the process will stop anyway because of the signal. This way the higher levels of the debugger (and the user) can be oblivious to the fact that software single stepping is in use, and everything will work normally.
But if having this working is not important for you, then I suggest you just go with XFAIL.
Thanks.
If you wish, you can link it to the same bug as the arm xfail above, as that is the same underlying issue.