Skip to content

Commit 33ff395

Browse files
committed
Update LLDBMemoryReader::queryDataLayout's DLQ_GetPtrAuthMask
to match the new mask illegal value, and simplfy by grabbing the Data mask which is more general than the Code mask and is used everywhere when we don't know the type of the data.
1 parent 91feb95 commit 33ff395

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@ bool LLDBMemoryReader::queryDataLayout(DataLayoutQueryType type, void *inBuffer,
2727
void *outBuffer) {
2828
switch (type) {
2929
case DLQ_GetPtrAuthMask: {
30-
// The MemoryReader API doesn't distinguish between the two, so
31-
// this configuration is not yet supported.
32-
if (m_process.GetCodeAddressMask() != m_process.GetDataAddressMask())
33-
return false;
34-
lldb::addr_t ptrauth_mask = m_process.GetCodeAddressMask();
35-
if (!ptrauth_mask)
30+
lldb::addr_t ptrauth_mask = m_process.GetDataAddressMask();
31+
if (ptrauth_mask == LLDB_INVALID_ADDRESS_MASK)
3632
return false;
3733
// The mask returned by the process masks out the non-addressable bits.
3834
uint64_t mask_pattern = ~ptrauth_mask;

0 commit comments

Comments
 (0)