93 return this->
operator bool();
95SBInstruction::operator
bool()
const {
106 if (inst_sp && inst_sp->GetAddress().IsValid())
120 std::unique_lock<std::recursive_mutex> lock;
122 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
124 target_sp->CalculateExecutionContext(exe_ctx);
139 std::unique_lock<std::recursive_mutex> lock;
141 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
143 target_sp->CalculateExecutionContext(exe_ctx);
158 std::unique_lock<std::recursive_mutex> lock;
160 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
162 target_sp->CalculateExecutionContext(exe_ctx);
176 std::unique_lock<std::recursive_mutex> lock;
178 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
180 target_sp->CalculateExecutionContext(exe_ctx);
183 return inst_sp->GetControlFlowKind(&exe_ctx);
193 return inst_sp->GetOpcode().GetByteSize();
204 if (inst_sp->GetData(*data_extractor_sp)) {
216 return inst_sp->DoesBranch();
225 return inst_sp->HasDelaySlot();
234 return inst_sp->CanSetBreakpoint();
247 m_opaque_sp = std::make_shared<InstructionImpl>(disasm_sp, inst_sp);
256 const Address &addr = inst_sp->GetAddress();
259 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
265 inst_sp->Dump(&s.
ref(), 0,
true,
false,
false,
266 nullptr, &sc,
nullptr, &format, 0);
287 if (!out_sp || !out_sp->IsValid())
293 const Address &addr = inst_sp->GetAddress();
296 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
301 inst_sp->Dump(&out_stream, 0,
true,
false,
false,
302 nullptr, &sc,
nullptr, &format, 0);
307 uint32_t evaluate_options) {
316 frame_sp->CalculateExecutionContext(exe_ctx);
320 return inst_sp->Emulate(
321 arch, evaluate_options, (
void *)frame_sp.get(),
335 if (inst_sp && triple) {
336 return inst_sp->DumpEmulation(HostInfo::GetAugmentedArchSpec(triple));
342 const char *test_file) {
351 return inst_sp->TestEmulation(output_stream.
ref(), test_file);
#define LLDB_INSTRUMENT_VA(...)
lldb::InstructionSP GetSP() const
InstructionImpl(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp)
lldb::InstructionSP m_inst_sp
lldb::DisassemblerSP m_disasm_sp
void SetAddress(lldb::SBSection section, lldb::addr_t offset)
void SetOpaque(const lldb::DataExtractorSP &data_sp)
lldb::StackFrameSP GetFrameSP() const
void SetOpaque(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp)
std::shared_ptr< InstructionImpl > m_opaque_sp
const char * GetOperands(lldb::SBTarget target)
lldb::InstructionSP GetOpaque()
const char * GetComment(lldb::SBTarget target)
bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options)
bool DumpEmulation(const char *triple)
lldb::InstructionControlFlowKind GetControlFlowKind(lldb::SBTarget target)
const SBInstruction & operator=(const SBInstruction &rhs)
bool TestEmulation(lldb::SBStream &output_stream, const char *test_file)
lldb::SBStructuredData GetVariableAnnotations()
Get variable annotations for this instruction as structured data.
lldb::SBData GetData(lldb::SBTarget target)
bool GetDescription(lldb::SBStream &description)
const char * GetMnemonic(lldb::SBTarget target)
lldb_private::Stream & ref()
StructuredDataImplUP m_impl_up
lldb::TargetSP GetSP() const
A section + offset based address class.
lldb::ModuleSP GetModule() const
Get accessor for the module for this address.
An architecture specification class.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
static size_t WriteMemoryFrame(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
static size_t ReadMemoryFrame(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
static bool WriteRegisterFrame(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue ®_value)
static bool ReadRegisterFrame(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue ®_value)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void SetProcessSP(const lldb::ProcessSP &process_sp)
Set accessor to set only the process shared pointer.
Target * GetTargetPtr() const
Returns a pointer to the target object.
std::shared_ptr< Array > ArraySP
Defines a symbol context baton that can be handed other debug core functions.
const ArchSpec & GetArchitecture() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::Instruction > InstructionSP
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
InstructionControlFlowKind
Architecture-agnostic categorization of instructions for traversing the control flow of a trace.
@ eInstructionControlFlowKindUnknown
The instruction could not be classified.
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::File > FileSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::Module > ModuleSP