34#pragma mark ThreadPlanTracer
37 : m_process(*thread.GetProcess().get()), m_tid(thread.GetID()),
38 m_enabled(false), m_stream_sp(stream_sp), m_thread(nullptr) {}
41 : m_process(*thread.GetProcess().get()), m_tid(thread.GetID()),
42 m_enabled(false), m_stream_sp(), m_thread(nullptr) {}
50 return &(target_sp->GetDebugger().GetOutputStream());
65 bool show_frame_index =
false;
66 bool show_fullpaths =
false;
85#pragma mark ThreadPlanAssemblyTracer
90 m_register_values() {}
94 m_register_values() {}
106 auto type_system_or_err =
108 if (
auto err = type_system_or_err.takeError()) {
111 "Unable to get integer pointer type from TypeSystem: {0}");
113 if (
auto ts = *type_system_or_err)
116 target_sp->GetArchitecture().GetAddressByteSize() * 8));
140 bool addr_valid =
false;
141 uint8_t buffer[16] = {0};
158 bool data_from_file =
false;
167 const uint32_t max_opcode_byte_size =
170 if (instruction_list.
GetSize()) {
171 const bool show_bytes =
true;
172 const bool show_address =
true;
173 const bool show_control_flow_kind =
true;
178 instruction->
Dump(stream, max_opcode_byte_size, show_address,
179 show_bytes, show_control_flow_kind,
nullptr,
nullptr,
180 nullptr, disassemble_format, 0);
188 if (abi && intptr_type.
IsValid()) {
190 const int num_args = 1;
192 for (
int arg_index = 0; arg_index < num_args; ++arg_index) {
200 for (
int arg_index = 0; arg_index < num_args; ++arg_index) {
202 "\n\targ[%d]=%llx", arg_index,
205 if (arg_index + 1 < num_args)
218 reg_num < num_registers; ++reg_num) {
#define LLDB_LOG_ERROR(log, error,...)
virtual bool GetArgumentValues(Thread &thread, ValueList &values) const =0
A section + offset based address class.
@ DumpStyleModuleWithFileAddress
Display as the file address with the module name prepended (if any).
@ DumpStyleResolvedDescription
Display the details about what an address resolves to.
bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, DumpStyle fallback_style=DumpStyleInvalid, uint32_t addr_byte_size=UINT32_MAX, bool all_ranges=false, std::optional< Stream::HighlightSettings > settings=std::nullopt) const
Dump a description of this object to a Stream.
const FormatEntity::Entry * GetDisassemblyFormat() const
virtual size_t DecodeInstructions(const Address &base_addr, const DataExtractor &data, lldb::offset_t data_offset, size_t num_instructions, bool append, bool data_from_file)=0
InstructionList & GetInstructionList()
static lldb::DisassemblerSP FindPlugin(const ArchSpec &arch, const char *flavor, const char *plugin_name)
lldb::InstructionSP GetInstructionAtIndex(size_t idx) const
uint32_t GetMaxOpcocdeByteSize() const
virtual void Dump(Stream *s, uint32_t max_opcode_byte_size, bool show_address, bool show_bytes, bool show_control_flow_kind, const ExecutionContext *exe_ctx, const SymbolContext *sym_ctx, const SymbolContext *prev_sym_ctx, const FormatEntity::Entry *disassembly_addr_format, size_t max_address_text_size)
Dump the text representation of this Instruction to a Stream.
ThreadList & GetThreadList()
virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, Status &error)
Read of memory from a process.
lldb::TargetSP CalculateTarget() override
lldb::ByteOrder GetByteOrder() const
uint32_t GetAddressByteSize() const
const lldb::ABISP & GetABI()
Target & GetTarget()
Get the target object pointer for this module.
uint64_t GetPC(uint64_t fail_value=LLDB_INVALID_ADDRESS)
virtual const RegisterInfo * GetRegisterInfoAtIndex(size_t reg)=0
virtual size_t GetRegisterCount()=0
virtual bool ReadRegister(const RegisterInfo *reg_info, RegisterValue ®_value)=0
RegisterValue::Type GetType() const
unsigned long long ULongLong(unsigned long long fail_value=0) const
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, bool allow_section_end=false) const
bool Success() const
Test for success condition.
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
virtual void Flush()=0
Flush the stream.
size_t EOL()
Output and End of Line character to the stream.
Defines a symbol context baton that can be handed other debug core functions.
SectionLoadList & GetSectionLoadList()
const ArchSpec & GetArchitecture() const
lldb::ThreadSP FindThreadByID(lldb::tid_t tid, bool can_update=true)
lldb::DisassemblerSP m_disassembler_sp
ThreadPlanAssemblyTracer(Thread &thread, lldb::StreamSP &stream_sp)
~ThreadPlanAssemblyTracer() override
void TracingStarted() override
TypeFromUser GetIntPointerType()
void TracingEnded() override
TypeFromUser m_intptr_type
Disassembler * GetDisassembler()
std::vector< RegisterValue > m_register_values
ThreadPlanTracer(Thread &thread, lldb::StreamSP &stream_sp)
lldb::StreamSP m_stream_sp
bool TracerExplainsStop()
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb::StopInfoSP GetStopInfo()
void PushValue(const Value &value)
Value * GetValueAtIndex(size_t idx)
const Scalar & GetScalar() const
@ Scalar
A raw scalar value.
void SetCompilerType(const CompilerType &compiler_type)
void SetValueType(ValueType value_type)
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
TaggedASTType< 1 > TypeFromUser
void DumpRegisterValue(const RegisterValue ®_val, Stream &s, const RegisterInfo ®_info, bool prefix_with_name, bool prefix_with_alt_name, lldb::Format format, uint32_t reg_name_right_align_at=0, ExecutionContextScope *exe_scope=nullptr, bool print_flags=false, lldb::TargetSP target_sp=nullptr)
std::shared_ptr< lldb_private::Thread > ThreadSP
@ eLanguageTypeC
Non-standardized C, such as K&R.
std::shared_ptr< lldb_private::Stream > StreamSP
@ eEncodingUint
unsigned integer
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
std::shared_ptr< lldb_private::Target > TargetSP
Every register is described in detail including its name, alternate name (optional),...