summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/StringExtractor.cpp
diff options
context:
space:
mode:
authorRavitheja Addepally <ravitheja.addepally@intel.com>2017-05-26 11:46:27 +0000
committerRavitheja Addepally <ravitheja.addepally@intel.com>2017-05-26 11:46:27 +0000
commite714c4f5350664bfb62b527e23fdf398a1be158b (patch)
treeefe5c9ffade6eb97349e82e392cf6e87ea814974 /lldb/source/Utility/StringExtractor.cpp
parent41450329f7322a83c980d1b15d1904a49bd4e259 (diff)
downloadbcm5719-llvm-e714c4f5350664bfb62b527e23fdf398a1be158b.tar.gz
bcm5719-llvm-e714c4f5350664bfb62b527e23fdf398a1be158b.zip
Implementation of remote packets for Trace data.
Summary: The changes consist of new packets for trace manipulation and trace collection. The new packets are also documented. The packets are capable of providing custom trace specific parameters to start tracing and also retrieve such configuration from the server. Reviewers: clayborg, lldb-commits, tberghammer, labath, zturner Reviewed By: clayborg, labath Subscribers: krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D32585 llvm-svn: 303972
Diffstat (limited to 'lldb/source/Utility/StringExtractor.cpp')
-rw-r--r--lldb/source/Utility/StringExtractor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp
index a94f6bcd008..cf5c7e22744 100644
--- a/lldb/source/Utility/StringExtractor.cpp
+++ b/lldb/source/Utility/StringExtractor.cpp
@@ -280,6 +280,15 @@ uint64_t StringExtractor::GetHexMaxU64(bool little_endian,
return result;
}
+bool StringExtractor::ConsumeFront(const llvm::StringRef &str) {
+ llvm::StringRef S = GetStringRef();
+ if (!S.startswith(str))
+ return false;
+ else
+ m_index += str.size();
+ return true;
+}
+
size_t StringExtractor::GetHexBytes(llvm::MutableArrayRef<uint8_t> dest,
uint8_t fail_fill_value) {
size_t bytes_extracted = 0;
OpenPOWER on IntegriCloud