Files
clang-p2996/lldb/test/API/riscv/break-undecoded/compressed.c
ita-sc a1ffabc403 [lldb][riscv] Fix setting breakpoint for undecoded instruction (#90075)
This patch adds an interface GetLastInstrSize to get information about
the size of last tried to be decoded instruction and uses it to set
software breakpoint if the memory can be decoded as instruction.

RISC-V architecture instruction format specifies the length of
instruction in first bits, so we can set a breakpoint for these cases.
This is needed as RISCV have a lot of extensions, that are not supported
by `EmulateInstructionRISCV`.
2024-07-16 10:03:42 +01:00

8 lines
229 B
C

int main() {
// This instruction is not valid, but we have an ability to set
// software breakpoint.
// This results in illegal instruction during execution, not fail to set
// breakpoint
asm volatile(".2byte 0xaf");
}