[lldb] [llvm] Annotate disassembly with register‐resident variable locations (PR #147460)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 05:54:38 PDT 2025
================
@@ -702,6 +705,78 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
ss.FillLastLineToColumn(opcode_pos + opcode_column_width, ' ');
ss.PutCString(mnemonics);
+ const size_t annotation_column = 150;
+
+ if (exe_ctx && exe_ctx->GetFramePtr()) {
+ StackFrame *frame = exe_ctx->GetFramePtr();
+ TargetSP target_sp = exe_ctx->GetTargetSP();
+ if (frame && target_sp) {
+ addr_t current_pc = m_address.GetLoadAddress(target_sp.get());
+ addr_t original_pc = frame->GetFrameCodeAddress().GetLoadAddress(target_sp.get());
+ if (frame->ChangePC(current_pc)) {
----------------
adrian-prantl wrote:
What is `m_address` here? Is it really necessary to _modify_ the PC of `frame`?
https://github.com/llvm/llvm-project/pull/147460
More information about the llvm-commits
mailing list