================
@@ -148,10 +158,15 @@ bool SBInstructionList::GetDescription(Stream &sref) {
       const uint32_t max_opcode_byte_size =
           m_opaque_sp->GetInstructionList().GetMaxOpcocdeByteSize();
       FormatEntity::Entry format;
-      FormatEntity::Parse("${addr}: ", format);
+      FormatEntity::Parse("${addr-file-or-load}: ", format);
       SymbolContext sc;
       SymbolContext prev_sc;
 
+      std::shared_ptr<ExecutionContext> exe_ctx_ptr;
+      if (nullptr != exe_ctx) {
+        exe_ctx_ptr = std::make_shared<ExecutionContext>(exe_ctx->get());
+      }
----------------
JDevlieghere wrote:

A few nits:

1. No braces around single-line ifs. 
2. Do we actually need to wrap this in a shared pointer? The underlying object 
will already live long enough, right? Anyway the current code doesn't look safe 
unless the underlying object inherits from `enable_shared_from_this`.

https://github.com/llvm/llvm-project/pull/136755
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to