Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ DynamicLoader *DynamicLoaderDarwinKernel::CreateInstance(Process *process,
case llvm::Triple::IOS:
case llvm::Triple::TvOS:
case llvm::Triple::WatchOS:
case llvm::Triple::XROS:
case llvm::Triple::BridgeOS:
case llvm::Triple::DriverKit:
case llvm::Triple::XROS:
if (triple_ref.getVendor() != llvm::Triple::Apple) {
return nullptr;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints(Process *process) {
Status read_err;
addr_t kernel_addresses_64[] = {
0xfffffff000002010ULL,
0xfffffe0000004010ULL, // newest arm64 devices, large memory support
0xfffffff000004010ULL, // newest arm64 devices
0xffffff8000004010ULL, // 2014-2015-ish arm64 devices
0xffffff8000002010ULL, // oldest arm64 devices
Expand Down Expand Up @@ -1092,7 +1094,7 @@ void DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded() {
static ConstString arm64_T1Sz_value("gT1Sz");
const Symbol *symbol =
m_kernel.GetModule()->FindFirstSymbolWithNameAndType(
kext_summary_symbol, eSymbolTypeData);
kext_summary_symbol, eSymbolTypeAny);
if (symbol) {
m_kext_summary_header_ptr_addr = symbol->GetAddress();
// Update all image infos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ bool DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(
image_infos[i].os_type = llvm::Triple::WatchOS;
else if (os_name == "bridgeos")
image_infos[i].os_type = llvm::Triple::BridgeOS;
else if (os_name == "driverkit")
image_infos[i].os_type = llvm::Triple::DriverKit;
else if (os_name == "xros")
image_infos[i].os_type = llvm::Triple::XROS;
else if (os_name == "maccatalyst") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ DynamicLoader *DynamicLoaderMacOS::CreateInstance(Process *process,
case llvm::Triple::IOS:
case llvm::Triple::TvOS:
case llvm::Triple::WatchOS:
case llvm::Triple::XROS:
case llvm::Triple::BridgeOS:
case llvm::Triple::DriverKit:
case llvm::Triple::XROS:
create = triple_ref.getVendor() == llvm::Triple::Apple;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ DynamicLoader *DynamicLoaderMacOSXDYLD::CreateInstance(Process *process,
case llvm::Triple::IOS:
case llvm::Triple::TvOS:
case llvm::Triple::WatchOS:
case llvm::Triple::XROS:
case llvm::Triple::BridgeOS:
case llvm::Triple::DriverKit:
case llvm::Triple::XROS:
create = triple_ref.getVendor() == llvm::Triple::Apple;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ PlatformSP PlatformDarwinKernel::CreateInstance(bool force,
case llvm::Triple::XROS:
case llvm::Triple::TvOS:
case llvm::Triple::BridgeOS:
case llvm::Triple::DriverKit:
break;
// Only accept "vendor" for vendor if the host is Apple and it "unknown"
// wasn't specified (it was just returned because it was NOT specified)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ SystemRuntime *SystemRuntimeMacOSX::CreateInstance(Process *process) {
case llvm::Triple::IOS:
case llvm::Triple::TvOS:
case llvm::Triple::WatchOS:
case llvm::Triple::XROS:
case llvm::Triple::BridgeOS:
case llvm::Triple::DriverKit:
case llvm::Triple::XROS:
create = triple_ref.getVendor() == llvm::Triple::Apple;
break;
default:
Expand Down
6 changes: 6 additions & 0 deletions lldb/source/Utility/ArchSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,12 @@ bool ArchSpec::IsMatch(const ArchSpec &rhs, MatchType match) const {
rhs_triple_os == llvm::Triple::IOS &&
rhs_triple_env == llvm::Triple::MacABI))
return true;
// x86_64-apple-driverkit, x86_64-apple-macosx are compatible, no match.
if ((lhs_triple_os == llvm::Triple::DriverKit &&
rhs_triple_os == llvm::Triple::MacOSX) ||
(lhs_triple_os == llvm::Triple::MacOSX &&
rhs_triple_os == llvm::Triple::DriverKit))
return true;
}

// x86_64-apple-ios-macabi and x86_64-apple-ios are not compatible.
Expand Down
6 changes: 6 additions & 0 deletions lldb/unittests/Utility/ArchSpecTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ TEST(ArchSpecTest, Compatibility) {
B.MergeFrom(A);
ASSERT_TRUE(B.IsExactMatch(C));
}
{
ArchSpec A("x86_64-apple-driverkit19.0");
ArchSpec B("x86_64-apple-macosx10.15.0");
ASSERT_FALSE(A.IsExactMatch(B));
ASSERT_TRUE(A.IsCompatibleMatch(B));
}
}

TEST(ArchSpecTest, OperatorBool) {
Expand Down