88
99#include " lldb/API/SBInstructionList.h"
1010#include " lldb/API/SBAddress.h"
11+ #include " lldb/API/SBExecutionContext.h"
1112#include " lldb/API/SBFile.h"
1213#include " lldb/API/SBInstruction.h"
1314#include " lldb/API/SBStream.h"
1415#include " lldb/Core/Disassembler.h"
1516#include " lldb/Core/Module.h"
1617#include " lldb/Host/StreamFile.h"
1718#include " lldb/Symbol/SymbolContext.h"
19+ #include " lldb/Target/ExecutionContext.h"
1820#include " lldb/Utility/Instrumentation.h"
1921#include " lldb/Utility/Stream.h"
2022
@@ -138,7 +140,15 @@ bool SBInstructionList::GetDescription(lldb::SBStream &stream) {
138140 return GetDescription (stream.ref ());
139141}
140142
141- bool SBInstructionList::GetDescription (Stream &sref) {
143+ bool SBInstructionList::GetDescription (lldb::SBStream &stream,
144+ lldb::SBExecutionContext &exe_ctx) {
145+ LLDB_INSTRUMENT_VA (this , stream);
146+ ExecutionContext exe_ctx_wrapper (exe_ctx.get ());
147+ return GetDescription (stream.ref (), &exe_ctx_wrapper);
148+ }
149+
150+ bool SBInstructionList::GetDescription (
151+ Stream &sref, lldb_private::ExecutionContext *exe_ctx) {
142152
143153 if (m_opaque_sp) {
144154 size_t num_instructions = GetSize ();
@@ -148,7 +158,7 @@ bool SBInstructionList::GetDescription(Stream &sref) {
148158 const uint32_t max_opcode_byte_size =
149159 m_opaque_sp->GetInstructionList ().GetMaxOpcocdeByteSize ();
150160 FormatEntity::Entry format;
151- FormatEntity::Parse (" ${addr}: " , format);
161+ FormatEntity::Parse (" ${addr-file-or-load }: " , format);
152162 SymbolContext sc;
153163 SymbolContext prev_sc;
154164
@@ -172,7 +182,7 @@ bool SBInstructionList::GetDescription(Stream &sref) {
172182 if (next_addr && *next_addr != addr)
173183 sref.EOL ();
174184 inst->Dump (&sref, max_opcode_byte_size, true , false ,
175- /* show_control_flow_kind=*/ false , nullptr , &sc, &prev_sc,
185+ /* show_control_flow_kind=*/ false , exe_ctx , &sc, &prev_sc,
176186 &format, 0 );
177187 sref.EOL ();
178188 next_addr = addr;
0 commit comments