[Lldb-commits] [lldb] a5f1fff - [lldb/Reproducers] Add missing SBFile methods to the registry
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 4 15:10:23 PST 2020
Author: Jonas Devlieghere
Date: 2020-02-04T15:10:03-08:00
New Revision: a5f1fff9ddf07755c224ce1e84ed009ad9a232f9
URL: https://github.com/llvm/llvm-project/commit/a5f1fff9ddf07755c224ce1e84ed009ad9a232f9
DIFF: https://github.com/llvm/llvm-project/commit/a5f1fff9ddf07755c224ce1e84ed009ad9a232f9.diff
LOG: [lldb/Reproducers] Add missing SBFile methods to the registry
SBFile::Read and SBFile::Write were missing from the registry.
Added:
Modified:
lldb/include/lldb/Utility/ReproducerInstrumentation.h
lldb/source/API/SBFile.cpp
lldb/source/Utility/ReproducerInstrumentation.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index c7c68aec5380..2f8de5cbd3db 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -371,6 +371,7 @@ class Deserializer {
/// instead of treating it as pointer.
template <> const char *Deserializer::Deserialize<const char *>();
template <> const char **Deserializer::Deserialize<const char **>();
+template <> const uint8_t *Deserializer::Deserialize<const uint8_t *>();
template <> char *Deserializer::Deserialize<char *>();
/// Helpers to auto-synthesize function replay code. It deserializes the replay
diff --git a/lldb/source/API/SBFile.cpp b/lldb/source/API/SBFile.cpp
index ed4f6a81c57e..ff5714fdb857 100644
--- a/lldb/source/API/SBFile.cpp
+++ b/lldb/source/API/SBFile.cpp
@@ -144,6 +144,10 @@ template <> void RegisterMethods<SBFile>(Registry &R) {
LLDB_REGISTER_CONSTRUCTOR(SBFile, (int, const char *, bool));
LLDB_REGISTER_METHOD(SBFile&, SBFile, operator=,(const SBFile&));
LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Flush, ());
+ LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Read,
+ (uint8_t *, size_t, size_t *));
+ LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Write,
+ (const uint8_t *, size_t, size_t *));
LLDB_REGISTER_METHOD_CONST(bool, SBFile, IsValid, ());
LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator bool,());
LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator!,());
diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp
index cfb77c0d8c3a..eb41acb5a3f3 100644
--- a/lldb/source/Utility/ReproducerInstrumentation.cpp
+++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
@@ -23,6 +23,10 @@ void IndexToObject::AddObjectForIndexImpl(unsigned idx, void *object) {
m_mapping[idx] = object;
}
+template <> const uint8_t *Deserializer::Deserialize<const uint8_t *>() {
+ return Deserialize<uint8_t *>();
+}
+
template <> char *Deserializer::Deserialize<char *>() {
return const_cast<char *>(Deserialize<const char *>());
}
More information about the lldb-commits
mailing list