[Lldb-commits] [lldb] [lldb] Added a warning in case of instruction decode failure (PR #164413)

Timur Golubovich via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 22 06:34:17 PDT 2025


================
@@ -0,0 +1,32 @@
+"""
+Test the 'memory read' command when decoding instruction failures.
+"""
----------------
tgs-sc wrote:

Yes, you are right, currently this warning only triggers if target specific disasm won't change the size of consumed bytes. In RISC-V it happens only if we can't fetch instruction's length. As I see, in AArch64 the have

```cpp
DecodeStatus AArch64Disassembler::getInstruction(MCInst &MI, uint64_t &Size,
                                                 ArrayRef<uint8_t> Bytes,
                                                 uint64_t Address,
                                                 raw_ostream &CS) const {
  CommentStream = &CS;

  Size = 0;
  // We want to read exactly 4 bytes of data.
  if (Bytes.size() < 4)
    return Fail;
  Size = 4;
  ```
  So, you can try to trigger this by passing here size less than 4. 

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


More information about the lldb-commits mailing list