Allow calling printInOrder from debugger

This commit is contained in:
2024-05-14 15:29:34 -07:00
parent 93021d5b28
commit 862fc3297c
2 changed files with 16 additions and 8 deletions

View File

@@ -951,7 +951,13 @@ struct __attribute__((__visibility__("hidden"))) VersionedMap::Impl {
void firstGeq(const Key *key, const int64_t *version, Iterator *iterator,
int count) const;
Random random = seededRandom();
Random random =
#ifndef NDEBUG
{};
#else
seededRandom();
#endif
MemManager mm;
RootSet roots;
// Only meaningful within the callstack of `addMutations`
@@ -1325,13 +1331,13 @@ int64_t VersionedMap::getBytes() const { return impl->getBytes(); }
// GCOVR_EXCL_START
inline void VersionedMap::Impl::printInOrder(int64_t version) {
void VersionedMap::Impl::printInOrder(int64_t version) {
printInOrderHelper(version,
roots.getThreadSafeHandle().rootForVersion(version), 0);
}
inline void VersionedMap::Impl::printInOrderHelper(int64_t version,
uint32_t node, int depth) {
void VersionedMap::Impl::printInOrderHelper(int64_t version, uint32_t node,
int depth) {
if (node == 0) {
return;
}