Skip to content

Commit 3e2adb9

Browse files
Removed some Linux specific changes
1 parent 16107a4 commit 3e2adb9

File tree

1 file changed

+0
-101
lines changed

1 file changed

+0
-101
lines changed

lldb/source/Plugins/Platform/AIX/PlatformAIX.cpp

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ void PlatformAIX::Initialize() {
8080
PlatformPOSIX::Initialize();
8181

8282
if (g_initialize_count++ == 0) {
83-
#if defined(_AIX)
8483
PlatformSP default_platform_sp(new PlatformAIX(true));
8584
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
8685
Platform::SetHostPlatform(default_platform_sp);
87-
#endif
8886
PluginManager::RegisterPlugin(
8987
PlatformAIX::GetPluginNameStatic(false),
9088
PlatformAIX::GetPluginDescriptionStatic(false),
@@ -115,10 +113,6 @@ PlatformAIX::PlatformAIX(bool is_host)
115113
}
116114
} else {
117115
m_supported_architectures = CreateArchList(
118-
{llvm::Triple::x86_64, llvm::Triple::x86, llvm::Triple::arm,
119-
llvm::Triple::aarch64, llvm::Triple::mips64, llvm::Triple::mips64,
120-
llvm::Triple::hexagon, llvm::Triple::mips, llvm::Triple::mips64el,
121-
llvm::Triple::mipsel, llvm::Triple::systemz},
122116
llvm::Triple::AIX);
123117
}
124118
}
@@ -200,93 +194,9 @@ void PlatformAIX::CalculateTrapHandlerSymbolNames() {
200194
m_trap_handlers.push_back(ConstString("__restore_rt"));
201195
}
202196

203-
static lldb::UnwindPlanSP GetAArch64TrapHanlderUnwindPlan(ConstString name) {
204-
UnwindPlanSP unwind_plan_sp;
205-
if (name != "__kernel_rt_sigreturn")
206-
return unwind_plan_sp;
207-
208-
UnwindPlan::RowSP row = std::make_shared<UnwindPlan::Row>();
209-
row->SetOffset(0);
210-
211-
// In the signal trampoline frame, sp points to an rt_sigframe[1], which is:
212-
// - 128-byte siginfo struct
213-
// - ucontext struct:
214-
// - 8-byte long (uc_flags)
215-
// - 8-byte pointer (uc_link)
216-
// - 24-byte stack_t
217-
// - 128-byte signal set
218-
// - 8 bytes of padding because sigcontext has 16-byte alignment
219-
// - sigcontext/mcontext_t
220-
// [1]
221-
// https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/signal.c
222-
int32_t offset = 128 + 8 + 8 + 24 + 128 + 8;
223-
// Then sigcontext[2] is:
224-
// - 8 byte fault address
225-
// - 31 8 byte registers
226-
// - 8 byte sp
227-
// - 8 byte pc
228-
// [2]
229-
// https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/sigcontext.h
230-
231-
// Skip fault address
232-
offset += 8;
233-
row->GetCFAValue().SetIsRegisterPlusOffset(arm64_dwarf::sp, offset);
234-
235-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x0, 0 * 8, false);
236-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x1, 1 * 8, false);
237-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x2, 2 * 8, false);
238-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x3, 3 * 8, false);
239-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x4, 4 * 8, false);
240-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x5, 5 * 8, false);
241-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x6, 6 * 8, false);
242-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x7, 7 * 8, false);
243-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x8, 8 * 8, false);
244-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x9, 9 * 8, false);
245-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x10, 10 * 8, false);
246-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x11, 11 * 8, false);
247-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x12, 12 * 8, false);
248-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x13, 13 * 8, false);
249-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x14, 14 * 8, false);
250-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x15, 15 * 8, false);
251-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x16, 16 * 8, false);
252-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x17, 17 * 8, false);
253-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x18, 18 * 8, false);
254-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x19, 19 * 8, false);
255-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x20, 20 * 8, false);
256-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x21, 21 * 8, false);
257-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x22, 22 * 8, false);
258-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x23, 23 * 8, false);
259-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x24, 24 * 8, false);
260-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x25, 25 * 8, false);
261-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x26, 26 * 8, false);
262-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x27, 27 * 8, false);
263-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x28, 28 * 8, false);
264-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::fp, 29 * 8, false);
265-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::x30, 30 * 8, false);
266-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::sp, 31 * 8, false);
267-
row->SetRegisterLocationToAtCFAPlusOffset(arm64_dwarf::pc, 32 * 8, false);
268-
269-
// The sigcontext may also contain floating point and SVE registers.
270-
// However this would require a dynamic unwind plan so they are not included
271-
// here.
272-
273-
unwind_plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
274-
unwind_plan_sp->AppendRow(row);
275-
unwind_plan_sp->SetSourceName("AArch64 AIX sigcontext");
276-
unwind_plan_sp->SetSourcedFromCompiler(eLazyBoolYes);
277-
// Because sp is the same throughout the function
278-
unwind_plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
279-
unwind_plan_sp->SetUnwindPlanForSignalTrap(eLazyBoolYes);
280-
281-
return unwind_plan_sp;
282-
}
283-
284197
lldb::UnwindPlanSP
285198
PlatformAIX::GetTrapHandlerUnwindPlan(const llvm::Triple &triple,
286199
ConstString name) {
287-
if (triple.isAArch64())
288-
return GetAArch64TrapHanlderUnwindPlan(name);
289-
290200
return {};
291201
}
292202

@@ -451,17 +361,6 @@ CompilerType PlatformAIX::GetSiginfoType(const llvm::Triple &triple) {
451361
}),
452362
lldb::eAccessPublic, 0);
453363

454-
// NB: SIGSYS is not present on ia64 but we don't seem to support that
455-
ast->AddFieldToRecordType(
456-
union_type, "_sigsys",
457-
ast->CreateStructForIdentifier(ConstString(),
458-
{
459-
{"_call_addr", voidp_type},
460-
{"_syscall", int_type},
461-
{"_arch", uint_type},
462-
}),
463-
lldb::eAccessPublic, 0);
464-
465364
ast->CompleteTagDeclarationDefinition(union_type);
466365
ast->AddFieldToRecordType(siginfo_type, "_sifields", union_type,
467366
lldb::eAccessPublic, 0);

0 commit comments

Comments
 (0)