35#pragma mark ThreadPlanTracer
51 return target_sp->GetDebugger().GetAsyncOutputStream();
66 bool show_frame_index =
false;
67 bool show_fullpaths =
false;
72 stream_sp->Printf(
"\n");
85#pragma mark ThreadPlanAssemblyTracer
100 nullptr,
nullptr,
nullptr,
nullptr);
106 if (
auto target_sp =
m_process.CalculateTarget()) {
107 auto type_system_or_err =
109 if (
auto err = type_system_or_err.takeError()) {
112 "Unable to get integer pointer type from TypeSystem: {0}");
114 if (
auto ts = *type_system_or_err)
117 target_sp->GetArchitecture().GetAddressByteSize() * 8));
141 bool addr_valid =
false;
142 uint8_t buffer[16] = {0};
143 addr_valid =
m_process.GetTarget().ResolveLoadAddress(
pc, pc_addr);
148 stream_sp->PutCString(
" ");
153 m_process.ReadMemory(
pc, buffer,
sizeof(buffer), err);
159 bool data_from_file =
false;
168 const uint32_t max_opcode_byte_size =
171 if (instruction_list.
GetSize()) {
172 const bool show_bytes =
true;
173 const bool show_address =
true;
174 const bool show_control_flow_kind =
true;
178 m_process.GetTarget().GetDebugger().GetDisassemblyFormat();
179 instruction->
Dump(stream_sp.get(), max_opcode_byte_size, show_address,
180 show_bytes, show_control_flow_kind,
nullptr,
nullptr,
181 nullptr, &disassemble_format, 0);
189 if (abi && intptr_type.
IsValid()) {
191 const int num_args = 1;
193 for (
int arg_index = 0; arg_index < num_args; ++arg_index) {
201 for (
int arg_index = 0; arg_index < num_args; ++arg_index) {
203 "\n\targ[%d]=%llx", arg_index,
206 if (arg_index + 1 < num_args)
207 stream_sp->PutCString(
", ");
219 reg_num < num_registers; ++reg_num) {
226 stream_sp->PutCString(
"\n\t");
#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.
static lldb::DisassemblerSP FindPlugin(const ArchSpec &arch, const char *flavor, const char *cpu, const char *features, const char *plugin_name)
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()
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.
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 Success() const
Test for success condition.
Defines a symbol context baton that can be handed other debug core functions.
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()
lldb::StreamSP GetLogStreamSP()
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
See comment on m_scalar to understand what GetScalar returns.
@ 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),...