20#include "llvm/ADT/bit.h"
43 value = llvm::byteswap(value);
53 [](llvm::StringRef varname) {
55 return varname.size();
59 if (llvm::Error
error = vobj_sp->Dump(strm, dump_options))
65 bool prefix_with_name,
66 bool prefix_with_alt_name,
Format format,
67 uint32_t reg_name_right_align_at,
69 bool print_flags,
TargetSP target_sp) {
74 bool name_printed =
false;
81 if (reg_name_right_align_at && (prefix_with_name ^ prefix_with_alt_name))
82 format_string.
Printf(
"%%%us", reg_name_right_align_at);
84 format_string.
Printf(
"%%s");
85 std::string fmt = std::string(format_string.
GetString());
86 if (prefix_with_name) {
92 prefix_with_alt_name =
false;
96 if (prefix_with_alt_name) {
102 }
else if (!name_printed) {
127 llvm::dyn_cast_if_present<RegisterTypeFlags>(reg_info.
register_type);
128 if (!print_flags || !flags_type || !exe_scope || !target_sp ||
132 CompilerType register_compiler_type = target_sp->GetRegisterType(reg_info);
133 if (!register_compiler_type.
IsValid())
141 exe_scope, register_type_stream);
144 exe_scope, register_type_stream);
154 llvm::StringRef register_type_str =
155 register_type_stream.
GetString().drop_back();
162 while (register_type_str.size()) {
163 std::pair<llvm::StringRef, llvm::StringRef> split =
164 register_type_str.split(
'\n');
165 register_type_str = split.second;
169 s.
Printf(fmt.c_str(),
"");
180 if (register_type_str.size())
static llvm::raw_ostream & error(Stream &strm)
static void dump_type_value(const lldb_private::RegisterTypeFlags &flags_type, lldb_private::CompilerType &fields_compiler_type, T value, lldb_private::ExecutionContextScope *exe_scope, lldb_private::Stream &strm)
static std::string toString(const Checksum &checksum)
Generic representation of a type in a programming language.
A uniqued constant string class.
DumpValueObjectOptions & SetHideRootType(bool hide_root_type=false)
DumpValueObjectOptions & SetChildPrintingDecider(ChildPrintingDecider decider)
std::function< bool(llvm::StringRef)> ChildPrintingDecider
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual lldb::ProcessSP CalculateProcess()=0
T ReverseFieldOrder(T value) const
bool GetData(DataExtractor &data) const
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
uint32_t GetAsUInt32(uint32_t fail_value=UINT32_MAX, bool *success_ptr=nullptr) const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
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.
size_t EOL()
Output and End of Line character to the stream.
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS, ValueObjectManager *manager=nullptr)
These routines create ValueObjectConstResult ValueObjects from various data sources.
#define LLDB_INVALID_ADDRESS
lldb::ByteOrder InlHostByteOrder()
lldb::offset_t DumpDataExtractor(const DataExtractor &DE, Stream *s, lldb::offset_t offset, lldb::Format item_format, size_t item_byte_size, size_t item_count, size_t num_per_line, uint64_t base_addr, uint32_t item_bit_size, uint32_t item_bit_offset, ExecutionContextScope *exe_scope=nullptr, bool show_memory_tags=false)
Dumps item_count objects into the stream s.
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::ValueObject > ValueObjectSP
Format
Display format definitions.
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::Target > TargetSP
Every register is described in detail including its name, alternate name (optional),...
const char * alt_name
Alternate name of this register, can be NULL.
uint32_t byte_size
Size in bytes of the register.
const RegisterType * register_type
If not nullptr, a type defined by XML descriptions.
const char * name
Name of this register, can't be NULL.
lldb::Format format
Default display format.