20#include "llvm/ADT/bit.h"
42 value = llvm::byteswap(value);
53 return varname.GetLength();
57 if (llvm::Error
error = vobj_sp->Dump(strm, dump_options))
58 strm <<
"error: " << toString(std::move(
error));
63 bool prefix_with_name,
64 bool prefix_with_alt_name,
Format format,
65 uint32_t reg_name_right_align_at,
67 bool print_flags,
TargetSP target_sp) {
72 bool name_printed =
false;
79 if (reg_name_right_align_at && (prefix_with_name ^ prefix_with_alt_name))
80 format_string.
Printf(
"%%%us", reg_name_right_align_at);
82 format_string.
Printf(
"%%s");
83 std::string fmt = std::string(format_string.
GetString());
84 if (prefix_with_name) {
90 prefix_with_alt_name =
false;
94 if (prefix_with_alt_name) {
100 }
else if (!name_printed) {
124 if (!print_flags || !reg_info.
flags_type || !exe_scope || !target_sp ||
149 llvm::StringRef fields_str = fields_stream.
GetString().drop_back();
156 while (fields_str.size()) {
157 std::pair<llvm::StringRef, llvm::StringRef> split = fields_str.split(
'\n');
158 fields_str = split.second;
160 s.
Printf(fmt.c_str(),
"");
171 if (fields_str.size())
static llvm::raw_ostream & error(Stream &strm)
static void dump_type_value(lldb_private::CompilerType &fields_type, T value, lldb_private::ExecutionContextScope *exe_scope, const lldb_private::RegisterInfo ®_info, lldb_private::Stream &strm)
Generic representation of a type in a programming language.
A uniqued constant string class.
DumpValueObjectOptions & SetHideRootType(bool hide_root_type=false)
std::function< bool(ConstString)> ChildPrintingDecider
DumpValueObjectOptions & SetChildPrintingDecider(ChildPrintingDecider decider)
"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 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)
#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 RegisterFlags * flags_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.