summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/DataExtractor.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-07-16 03:19:08 +0000
committerGreg Clayton <gclayton@apple.com>2011-07-16 03:19:08 +0000
commit4df8ddfc97b7a47fbe123d4a4225dd0ec9ce0303 (patch)
tree0bc5b6963d33eca6cf882a19ce14bc299bea58f9 /lldb/source/Core/DataExtractor.cpp
parent0318036c4dd100b71ec1b59760c6c1f9710dc0b7 (diff)
downloadbcm5719-llvm-4df8ddfc97b7a47fbe123d4a4225dd0ec9ce0303.tar.gz
bcm5719-llvm-4df8ddfc97b7a47fbe123d4a4225dd0ec9ce0303.zip
Completed more work on the KDP darwin kernel debugging Process plug-in.
Implemented connect, disconnect, reattach, version, and hostinfo. Modified the ConnectionFileDescriptor class to be able to handle UDP. Added a new Stream subclass called StreamBuffer that is backed by a llvm::SmallVector for better efficiency. Modified the DataExtractor class to have a static function that can dump hex bytes into a stream. This is currently being used to dump incoming binary packet data in the KDP plug-in. llvm-svn: 135338
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r--lldb/source/Core/DataExtractor.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index aea0c471fcb..9518b44cffb 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -1789,4 +1789,19 @@ DataExtractor::DumpUUID (Stream *s, uint32_t offset) const
}
}
-
+void
+DataExtractor::DumpHexBytes (Stream *s,
+ const void *src,
+ size_t src_len,
+ addr_t base_addr)
+{
+ DataExtractor data (src, src_len, eByteOrderLittle, 4);
+ data.Dump (s,
+ 0, // Offset into "src"
+ eFormatBytes, // Dump as hex bytes
+ 1, // Size of each item is 1 for single bytes
+ src_len, // Number of bytes
+ 32, // Num bytes per line
+ base_addr, // Base address
+ 0, 0); // Bitfield info
+}
OpenPOWER on IntegriCloud