8
8
9
9
#include " lldb/API/SBInstructionList.h"
10
10
#include " lldb/API/SBAddress.h"
11
+ #include " lldb/API/SBExecutionContext.h"
11
12
#include " lldb/API/SBFile.h"
12
13
#include " lldb/API/SBInstruction.h"
13
14
#include " lldb/API/SBStream.h"
14
15
#include " lldb/Core/Disassembler.h"
15
16
#include " lldb/Core/Module.h"
16
17
#include " lldb/Host/StreamFile.h"
17
18
#include " lldb/Symbol/SymbolContext.h"
19
+ #include " lldb/Target/ExecutionContext.h"
18
20
#include " lldb/Utility/Instrumentation.h"
19
21
#include " lldb/Utility/Stream.h"
20
22
@@ -138,7 +140,15 @@ bool SBInstructionList::GetDescription(lldb::SBStream &stream) {
138
140
return GetDescription (stream.ref ());
139
141
}
140
142
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) {
142
152
143
153
if (m_opaque_sp) {
144
154
size_t num_instructions = GetSize ();
@@ -148,7 +158,7 @@ bool SBInstructionList::GetDescription(Stream &sref) {
148
158
const uint32_t max_opcode_byte_size =
149
159
m_opaque_sp->GetInstructionList ().GetMaxOpcocdeByteSize ();
150
160
FormatEntity::Entry format;
151
- FormatEntity::Parse (" ${addr}: " , format);
161
+ FormatEntity::Parse (" ${addr-file-or-load }: " , format);
152
162
SymbolContext sc;
153
163
SymbolContext prev_sc;
154
164
@@ -172,7 +182,7 @@ bool SBInstructionList::GetDescription(Stream &sref) {
172
182
if (next_addr && *next_addr != addr)
173
183
sref.EOL ();
174
184
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,
176
186
&format, 0 );
177
187
sref.EOL ();
178
188
next_addr = addr;
0 commit comments