summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2017-03-04 01:15:24 +0000
committerJim Ingham <jingham@apple.com>2017-03-04 01:15:24 +0000
commitc963f20e4c74c747bbfdd6d6666c3a69f269754b (patch)
treea5137953756010ea11942ab6f4b5e4110adf6503 /lldb/source/Plugins/Process/MacOSX-Kernel
parent2e9c9220b695f2d5eea4cb37002939d6ba21c171 (diff)
downloadbcm5719-llvm-c963f20e4c74c747bbfdd6d6666c3a69f269754b.tar.gz
bcm5719-llvm-c963f20e4c74c747bbfdd6d6666c3a69f269754b.zip
Fix the macOS build all the way after r296909.
llvm-svn: 296938
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp163
1 files changed, 91 insertions, 72 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 0a480cf280d..12269410d97 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -859,15 +859,17 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
const uint32_t count = packet.GetByteSize() - offset;
s.Printf(" (error = 0x%8.8x:\n", error);
if (count > 0)
- packet.Dump(&s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatBytesWithASCII, // Format to use
- 1, // Size of each item in bytes
- count, // Number of items
- 16, // Number per line
- m_last_read_memory_addr, // Don't show addresses before
- // each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatBytesWithASCII, // Format to use
+ 1, // Size of each item
+ // in bytes
+ count, // Number of items
+ 16, // Number per line
+ m_last_read_memory_addr, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
case KDP_READREGS: {
@@ -875,15 +877,19 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
const uint32_t count = packet.GetByteSize() - offset;
s.Printf(" (error = 0x%8.8x regs:\n", error);
if (count > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- m_addr_byte_size, // Size of each item in bytes
- count / m_addr_byte_size, // Number of items
- 16 / m_addr_byte_size, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatHex, // Format to use
+ m_addr_byte_size, // Size of each item
+ // in bytes
+ count / m_addr_byte_size, // Number of items
+ 16 / m_addr_byte_size, // Number per line
+ LLDB_INVALID_ADDRESS,
+ // Don't
+ // show addresses before
+ // each line
+ 0, 0); // No bitfields
} break;
case KDP_KERNELVERSION: {
@@ -906,29 +912,32 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
const uint32_t count = packet.GetByteSize() - offset;
s.Printf(" (error = 0x%8.8x io:\n", error);
if (count > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- 1, // Size of each item in bytes
- count, // Number of items
- 16, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatHex, // Format to use
+ 1, // Size of each item in bytes
+ count, // Number of items
+ 16, // Number per line
+ LLDB_INVALID_ADDRESS, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
case KDP_DUMPINFO: {
const uint32_t count = packet.GetByteSize() - offset;
s.Printf(" (count = %u, bytes = \n", count);
if (count > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- 1, // Size of each item in bytes
- count, // Number of items
- 16, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatHex, // Format to use
+ 1, // Size of each item in
+ // bytes
+ count, // Number of items
+ 16, // Number per line
+ LLDB_INVALID_ADDRESS, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
@@ -1026,15 +1035,18 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
const uint32_t nbytes = packet.GetByteSize() - offset;
s.Printf(" (cpu = %u, flavor = %u, regs = \n", cpu, flavor);
if (nbytes > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- m_addr_byte_size, // Size of each item in bytes
- nbytes / m_addr_byte_size, // Number of items
- 16 / m_addr_byte_size, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within
+ // "packet"
+ eFormatHex, // Format to use
+ m_addr_byte_size, // Size of each item in
+ // bytes
+ nbytes / m_addr_byte_size, // Number of items
+ 16 / m_addr_byte_size, // Number per line
+ LLDB_INVALID_ADDRESS, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
case KDP_BREAKPOINT_SET:
@@ -1129,15 +1141,17 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
s.Printf(" (address=0x%8.8x, lcpu=0x%4.4x, nbytes=0x%8.8x)", lcpu,
address, nbytes);
if (nbytes > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- 1, // Size of each item in bytes
- nbytes, // Number of items
- 16, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatHex, // Format to use
+ 1, // Size of each item in
+ // bytes
+ nbytes, // Number of items
+ 16, // Number per line
+ LLDB_INVALID_ADDRESS, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
case KDP_READIOPORT: {
@@ -1155,22 +1169,24 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
s.Printf(" (lcpu = %u, addr = 0x%4.4x, nbytes = %u, bytes = \n", lcpu,
address, nbytes);
if (nbytes > 0)
- packet.Dump(
- &s, // Stream to dump to
- offset, // Offset within "packet"
- eFormatHex, // Format to use
- 1, // Size of each item in bytes
- nbytes, // Number of items
- 16, // Number per line
- LLDB_INVALID_ADDRESS, // Don't show addresses before each line
- 0, 0); // No bitfields
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ offset, // Offset within "packet"
+ eFormatHex, // Format to use
+ 1, // Size of each item in
+ // bytes
+ nbytes, // Number of items
+ 16, // Number per line
+ LLDB_INVALID_ADDRESS, // Don't show addresses
+ // before each line
+ 0, 0); // No bitfields
} break;
case KDP_DUMPINFO: {
const uint32_t count = packet.GetByteSize() - offset;
s.Printf(" (count = %u, bytes = \n", count);
if (count > 0)
- packet.Dump(
+ DumpDataExtractor(packet,
&s, // Stream to dump to
offset, // Offset within "packet"
eFormatHex, // Format to use
@@ -1191,14 +1207,17 @@ void CommunicationKDP::DumpPacket(Stream &s, const DataExtractor &packet) {
if (error_desc) {
s.PutCString(error_desc);
- packet.Dump(&s, // Stream to dump to
- 0, // Offset into "packet"
- eFormatBytes, // Dump as hex bytes
- 1, // Size of each item is 1 for single bytes
- packet.GetByteSize(), // Number of bytes
- UINT32_MAX, // Num bytes per line
- LLDB_INVALID_ADDRESS, // Base address
- 0, 0); // Bitfield info set to not do anything bitfield related
+ DumpDataExtractor(packet,
+ &s, // Stream to dump to
+ 0, // Offset into "packet"
+ eFormatBytes, // Dump as hex bytes
+ 1, // Size of each item is 1 for
+ // single bytes
+ packet.GetByteSize(), // Number of bytes
+ UINT32_MAX, // Num bytes per line
+ LLDB_INVALID_ADDRESS, // Base address
+ 0, 0); // Bitfield info set to not do
+ // anything bitfield related
}
}
OpenPOWER on IntegriCloud