From 8804952612609239040025330591356571302187 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 31 May 2023 20:55:14 -0400 Subject: API to read raw undo buffer (for DHView) --- database.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'database.cpp') diff --git a/database.cpp b/database.cpp index 887cdea7..dd258967 100644 --- a/database.cpp +++ b/database.cpp @@ -276,6 +276,17 @@ DataBuffer Snapshot::GetFileContentsHash() } +DataBuffer Snapshot::GetUndoData() +{ + BNDataBuffer* buffer = BNGetSnapshotUndoData(m_object); + if (buffer == nullptr) + { + throw DatabaseException("BNGetSnapshotUndoData"); + } + return DataBuffer(buffer); +} + + vector Snapshot::GetUndoEntries() { return GetUndoEntries([](size_t, size_t) { return true; }); -- cgit v1.3.1