[Lldb-commits] [lldb] Support disassembling RISC-V proprietary instructions (PR #145793)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 27 07:49:41 PDT 2025
================
@@ -658,8 +658,13 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
// the byte dump to be able to always show 15 bytes (3 chars each) plus a
// space
if (max_opcode_byte_size > 0)
- m_opcode.Dump(&ss, max_opcode_byte_size * 3 + 1);
- else
+ // make RISC-V opcode dump look like llvm-objdump
+ if (exe_ctx &&
+ exe_ctx->GetTargetSP()->GetArchitecture().GetTriple().isRISCV())
+ m_opcode.DumpRISCV(&ss, max_opcode_byte_size * 3 + 1);
----------------
DavidSpickett wrote:
Pull the minimum size out into:
```
auto min_byte_width = max_opcode_byte_size * 3 + 1;
```
Then use it in both calls, so it's clear they use the same minimum.
https://github.com/llvm/llvm-project/pull/145793
More information about the lldb-commits
mailing list