Skip to content

Commit c4fbbcc

Browse files
committed
fix issues in LLDBMemoryReader::queryDataLayout
1 parent ccfcdc6 commit c4fbbcc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lldb/source/Target/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class LLDBMemoryReader : public swift::remote::MemoryReader {
292292
} else {
293293
*result = 0;
294294
}
295-
break;
295+
return true;
296296
}
297297
case DLQ_GetPointerSize: {
298298
auto result = static_cast<uint8_t *>(outBuffer);
@@ -304,6 +304,15 @@ class LLDBMemoryReader : public swift::remote::MemoryReader {
304304
*result = m_process.GetAddressByteSize(); // FIXME: sizeof(size_t)
305305
return true;
306306
}
307+
case DLQ_GetLeastValidPointerValue: {
308+
auto *result = (uint64_t *)outBuffer;
309+
auto &triple = m_process.GetTarget().GetArchitecture().GetTriple();
310+
if (triple.isOSDarwin() && triple.isArch64Bit())
311+
*result = 0x100000000;
312+
else
313+
*result = 0x1000;
314+
return true;
315+
}
307316
}
308317

309318
return false;

0 commit comments

Comments
 (0)