diff options
Diffstat (limited to 'lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp')
-rw-r--r-- | lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp index ccfbeec3d589..804532acf9f7 100644 --- a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp +++ b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp @@ -817,6 +817,16 @@ ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl( lldb::addr_t ABIMacOSX_arm64::FixAddress(addr_t pc, addr_t mask) { lldb::addr_t pac_sign_extension = 0x0080000000000000ULL; + // Darwin systems originally couldn't determine the proper value + // dynamically, so the most common value was hardcoded. This has + // largely been cleaned up, but there are still a handful of + // environments that assume the default value is set to this value + // and there's no dynamic value to correct it. + // When no mask is specified, set it to 39 bits of addressing (0..38). + if (mask == 0) { + // ~((1ULL<<39)-1) + mask = 0xffffff8000000000; + } return (pc & pac_sign_extension) ? pc | mask : pc & (~mask); } |