arm linux-user: bkpt insn doesn't cause SIGTRAP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
QEMU's 32-bit arm linux-user mode doesn't correctly turn guest BKPT insns into SIGTRAP signals. Test case:
===begin bkpt.c===
/* test bkpt insn */
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
printf(
#ifdef __aarch64__
__asm__ volatile("brk 0x42\n");
#else
__asm__ volatile("bkpt 0x42\n");
#endif
printf(
return 0;
}
===endit===
Compile with
$ arm-linux-
$ aarch64-
Contrast aarch64 which delivers the SIGTRAP and arm which doesn't:
$ qemu-aarch64 bkpt-aa64
breakpoint
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
Trace/breakpoint trap (core dumped)
$ qemu-arm bkpt-aa32
breakpoint
done
This is because in linux-user/
Changed in qemu: | |
status: | New → In Progress |
Should be fixed in current git, will be in 5.2.