Fix DataExtractor failures.
Some code that doesn't get compiled on Windows had some references that needed updating, and I missed those. llvm-svn: 296930
This commit is contained in:
parent
07215cce89
commit
9739a552c2
|
@ -83,6 +83,9 @@ DumpDataExtractor(const DataExtractor &DE, Stream *s, lldb::offset_t offset,
|
|||
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);
|
||||
|
||||
void DumpHexBytes(Stream *s, const void *src, size_t src_len,
|
||||
uint32_t bytes_per_line, lldb::addr_t base_addr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -786,3 +786,17 @@ lldb::offset_t lldb_private::DumpDataExtractor(
|
|||
}
|
||||
return offset; // Return the offset at which we ended up
|
||||
}
|
||||
|
||||
void lldb_private::DumpHexBytes(Stream *s, const void *src, size_t src_len,
|
||||
uint32_t bytes_per_line,
|
||||
lldb::addr_t base_addr) {
|
||||
DataExtractor data(src, src_len, lldb::eByteOrderLittle, 4);
|
||||
DumpDataExtractor(data, s,
|
||||
0, // Offset into "src"
|
||||
lldb::eFormatBytes, // Dump as hex bytes
|
||||
1, // Size of each item is 1 for single bytes
|
||||
src_len, // Number of bytes
|
||||
bytes_per_line, // Num bytes per line
|
||||
base_addr, // Base address
|
||||
0, 0); // Bitfield info
|
||||
}
|
||||
|
|
|
@ -30,19 +30,6 @@
|
|||
|
||||
using namespace lldb_private;
|
||||
|
||||
static void DumpHexBytes(Stream *s, const void *src, size_t src_len,
|
||||
uint32_t bytes_per_line, lldb::addr_t base_addr) {
|
||||
DataExtractor data(src, src_len, lldb::eByteOrderLittle, 4);
|
||||
DumpDataExtractor(data, s,
|
||||
0, // Offset into "src"
|
||||
lldb::eFormatBytes, // Dump as hex bytes
|
||||
1, // Size of each item is 1 for single bytes
|
||||
src_len, // Number of bytes
|
||||
bytes_per_line, // Num bytes per line
|
||||
base_addr, // Base address
|
||||
0, 0); // Bitfield info
|
||||
}
|
||||
|
||||
uint32_t Materializer::AddStructMember(Entity &entity) {
|
||||
uint32_t size = entity.GetSize();
|
||||
uint32_t alignment = entity.GetAlignment();
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
// Other libraries and framework includes
|
||||
#include "lldb/Core/DataBufferHeap.h"
|
||||
#include "lldb/Core/DataExtractor.h"
|
||||
#include "lldb/Core/DumpDataExtractor.h"
|
||||
#include "lldb/Core/State.h"
|
||||
#include "lldb/Core/UUID.h"
|
||||
#include "lldb/Host/FileSpec.h"
|
||||
|
@ -259,8 +260,7 @@ bool CommunicationKDP::CheckForPacket(const uint8_t *src, size_t src_len,
|
|||
if (src && src_len > 0) {
|
||||
if (log && log->GetVerbose()) {
|
||||
PacketStreamType log_strm;
|
||||
DataExtractor::DumpHexBytes(&log_strm, src, src_len, UINT32_MAX,
|
||||
LLDB_INVALID_ADDRESS);
|
||||
DumpHexBytes(&log_strm, src, src_len, UINT32_MAX, LLDB_INVALID_ADDRESS);
|
||||
log->Printf("CommunicationKDP::%s adding %u bytes: %s", __FUNCTION__,
|
||||
(uint32_t)src_len, log_strm.GetData());
|
||||
}
|
||||
|
@ -976,8 +976,7 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
|
|||
const uint32_t size = packet.GetU32(&offset);
|
||||
s.Printf(" (addr = 0x%8.8x, size = %u, bytes = \n", addr, size);
|
||||
if (size > 0)
|
||||
DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size,
|
||||
32, addr);
|
||||
DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr);
|
||||
} break;
|
||||
|
||||
case KDP_READMEM64: {
|
||||
|
@ -1002,8 +1001,7 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
|
|||
s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u, bytes = \n", addr,
|
||||
size);
|
||||
if (size > 0)
|
||||
DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size,
|
||||
32, addr);
|
||||
DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr);
|
||||
} break;
|
||||
|
||||
case KDP_WRITEPHYSMEM64: {
|
||||
|
@ -1013,8 +1011,7 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
|
|||
s.Printf(" (addr = 0x%16.16llx, size = %u, lcpu = %u, bytes = \n",
|
||||
addr, size, lcpu);
|
||||
if (size > 0)
|
||||
DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size,
|
||||
32, addr);
|
||||
DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr);
|
||||
} break;
|
||||
|
||||
case KDP_READREGS: {
|
||||
|
|
Loading…
Reference in New Issue