42 const bool format_as_words = (
m_data.inst.length % 4) == 0;
44 while (i <
m_data.inst.length) {
47 if (format_as_words) {
49 s->
Printf(
"%2.2x%2.2x%2.2x%2.2x",
m_data.inst.bytes[i + 3],
67 for (uint32_t i = 0; i <
m_data.inst.length; ++i) {
78 if (bytes_written_so_far < min_byte_width)
79 s->
Printf(
"%*s", min_byte_width - bytes_written_so_far,
"");
106 const void *buf =
nullptr;
112 swap_buf[0] =
m_data.inst.bytes[2];
113 swap_buf[1] =
m_data.inst.bytes[3];
114 swap_buf[2] =
m_data.inst.bytes[0];
115 swap_buf[3] =
m_data.inst.bytes[1];
128 *(uint16_t *)swap_buf = llvm::byteswap<uint16_t>(
m_data.inst16);
132 swap_buf[0] =
m_data.inst.bytes[1];
133 swap_buf[1] =
m_data.inst.bytes[0];
134 swap_buf[2] =
m_data.inst.bytes[3];
135 swap_buf[3] =
m_data.inst.bytes[2];
142 *(uint32_t *)swap_buf = llvm::byteswap<uint32_t>(
m_data.inst32);
146 *(uint32_t *)swap_buf = llvm::byteswap<uint64_t>(
m_data.inst64);
155 if (buf !=
nullptr) {
158 buffer_sp = std::make_shared<DataBufferHeap>(buf, byte_size);
uint32_t GetByteSize() const
bool GetEndianSwap() const
lldb::ByteOrder m_byte_order
const void * GetOpcodeDataBytes() const
union lldb_private::Opcode::@156232132041300233024301123342201147024264135026 m_data
int Dump(Stream *s, uint32_t min_byte_width) const
lldb::ByteOrder GetDataByteOrder() const
uint32_t GetData(DataExtractor &data) 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 GetWrittenBytes() const
lldb::ByteOrder InlHostByteOrder()
A class that represents a running process on the host machine.
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP