[lldb/Reproducers] Add missing SBFile methods to the registry

SBFile::Read and SBFile::Write were missing from the registry.
This commit is contained in:
Jonas Devlieghere 2020-02-04 15:09:53 -08:00
parent c348fb1786
commit a5f1fff9dd
3 changed files with 9 additions and 0 deletions

View File

@ -371,6 +371,7 @@ private:
/// 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

View File

@ -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!,());

View File

@ -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 *>());
}