[Lldb-commits] [lldb] [lldb][RISCV][test] make atomic region stepping test more robust (PR #156506)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 3 06:57:34 PDT 2025


DavidSpickett wrote:

In `lldb/test/API/riscv/step/incomplete_sequence_without_lr.c` you expect to land on `and a5, a2, a4`. There is another `and a5...` but has different 2nd and 3rd operands.

There is a comment that refers to this but it almost looks like a typo.
```
  // a step instruction and ensure that execution stops at the next instruction
  // (and).
```

Please change that to include the operands too and/or add an inline comment on the instruction we expect to stop on. So then if the test ever does fail, we have more chances to realise that `and a5, a5, a4` is in fact different to `and a5, a2, a4`.

I was going to say make it some unique thing like a nop, but this test wants it to be almost an atomic sequence but not quite. So we shouldn't be modifying the rest of the sequence I think.

https://github.com/llvm/llvm-project/pull/156506


More information about the lldb-commits mailing list