@@ -130,12 +130,6 @@ void PlatformAIX::GetStatus(Stream &strm) {
130130#endif
131131}
132132
133- void PlatformAIX::CalculateTrapHandlerSymbolNames () {
134- m_trap_handlers.push_back (ConstString (" _sigtramp" ));
135- m_trap_handlers.push_back (ConstString (" __kernel_rt_sigreturn" ));
136- m_trap_handlers.push_back (ConstString (" __restore_rt" ));
137- }
138-
139133void PlatformAIX::CalculateTrapHandlerSymbolNames () {}
140134
141135lldb::UnwindPlanSP
@@ -160,168 +154,5 @@ MmapArgList PlatformAIX::GetMmapArgumentList(const ArchSpec &arch, addr_t addr,
160154}
161155
162156CompilerType PlatformAIX::GetSiginfoType (const llvm::Triple &triple) {
163- if (!m_type_system_up)
164- m_type_system_up.reset (new TypeSystemClang (" siginfo" , triple));
165- TypeSystemClang *ast = m_type_system_up.get ();
166-
167- bool si_errno_then_code = true ;
168-
169- switch (triple.getArch ()) {
170- case llvm::Triple::mips:
171- case llvm::Triple::mipsel:
172- case llvm::Triple::mips64:
173- case llvm::Triple::mips64el:
174- // mips has si_code and si_errno swapped
175- si_errno_then_code = false ;
176- break ;
177- default :
178- break ;
179- }
180-
181- // generic types
182- CompilerType int_type = ast->GetBasicType (eBasicTypeInt);
183- CompilerType uint_type = ast->GetBasicType (eBasicTypeUnsignedInt);
184- CompilerType short_type = ast->GetBasicType (eBasicTypeShort);
185- CompilerType long_type = ast->GetBasicType (eBasicTypeLong);
186- CompilerType voidp_type = ast->GetBasicType (eBasicTypeVoid).GetPointerType ();
187-
188- // platform-specific types
189- CompilerType &pid_type = int_type;
190- CompilerType &uid_type = uint_type;
191- CompilerType &clock_type = long_type;
192- CompilerType &band_type = long_type;
193-
194- CompilerType sigval_type = ast->CreateRecordType (
195- nullptr , OptionalClangModuleID (), lldb::eAccessPublic, " __lldb_sigval_t" ,
196- llvm::to_underlying (clang::TagTypeKind::Union), lldb::eLanguageTypeC);
197- ast->StartTagDeclarationDefinition (sigval_type);
198- ast->AddFieldToRecordType (sigval_type, " sival_int" , int_type,
199- lldb::eAccessPublic, 0 );
200- ast->AddFieldToRecordType (sigval_type, " sival_ptr" , voidp_type,
201- lldb::eAccessPublic, 0 );
202- ast->CompleteTagDeclarationDefinition (sigval_type);
203-
204- CompilerType sigfault_bounds_type = ast->CreateRecordType (
205- nullptr , OptionalClangModuleID (), lldb::eAccessPublic, " " ,
206- llvm::to_underlying (clang::TagTypeKind::Union), lldb::eLanguageTypeC);
207- ast->StartTagDeclarationDefinition (sigfault_bounds_type);
208- ast->AddFieldToRecordType (sigfault_bounds_type, " _addr_bnd" ,
209- ast->CreateStructForIdentifier (ConstString (),
210- {
211- {" _lower" , voidp_type},
212- {" _upper" , voidp_type},
213- }),
214- lldb::eAccessPublic, 0 );
215- ast->AddFieldToRecordType (sigfault_bounds_type, " _pkey" , uint_type,
216- lldb::eAccessPublic, 0 );
217- ast->CompleteTagDeclarationDefinition (sigfault_bounds_type);
218-
219- // siginfo_t
220- CompilerType siginfo_type = ast->CreateRecordType (
221- nullptr , OptionalClangModuleID (), lldb::eAccessPublic, " __lldb_siginfo_t" ,
222- llvm::to_underlying (clang::TagTypeKind::Struct), lldb::eLanguageTypeC);
223- ast->StartTagDeclarationDefinition (siginfo_type);
224- ast->AddFieldToRecordType (siginfo_type, " si_signo" , int_type,
225- lldb::eAccessPublic, 0 );
226-
227- if (si_errno_then_code) {
228- ast->AddFieldToRecordType (siginfo_type, " si_errno" , int_type,
229- lldb::eAccessPublic, 0 );
230- ast->AddFieldToRecordType (siginfo_type, " si_code" , int_type,
231- lldb::eAccessPublic, 0 );
232- } else {
233- ast->AddFieldToRecordType (siginfo_type, " si_code" , int_type,
234- lldb::eAccessPublic, 0 );
235- ast->AddFieldToRecordType (siginfo_type, " si_errno" , int_type,
236- lldb::eAccessPublic, 0 );
237- }
238-
239- // the structure is padded on 64-bit arches to fix alignment
240- if (triple.isArch64Bit ())
241- ast->AddFieldToRecordType (siginfo_type, " __pad0" , int_type,
242- lldb::eAccessPublic, 0 );
243-
244- // union used to hold the signal data
245- CompilerType union_type = ast->CreateRecordType (
246- nullptr , OptionalClangModuleID (), lldb::eAccessPublic, " " ,
247- llvm::to_underlying (clang::TagTypeKind::Union), lldb::eLanguageTypeC);
248- ast->StartTagDeclarationDefinition (union_type);
249-
250- ast->AddFieldToRecordType (
251- union_type, " _kill" ,
252- ast->CreateStructForIdentifier (ConstString (),
253- {
254- {" si_pid" , pid_type},
255- {" si_uid" , uid_type},
256- }),
257- lldb::eAccessPublic, 0 );
258-
259- ast->AddFieldToRecordType (
260- union_type, " _timer" ,
261- ast->CreateStructForIdentifier (ConstString (),
262- {
263- {" si_tid" , int_type},
264- {" si_overrun" , int_type},
265- {" si_sigval" , sigval_type},
266- }),
267- lldb::eAccessPublic, 0 );
268-
269- ast->AddFieldToRecordType (
270- union_type, " _rt" ,
271- ast->CreateStructForIdentifier (ConstString (),
272- {
273- {" si_pid" , pid_type},
274- {" si_uid" , uid_type},
275- {" si_sigval" , sigval_type},
276- }),
277- lldb::eAccessPublic, 0 );
278-
279- ast->AddFieldToRecordType (
280- union_type, " _sigchld" ,
281- ast->CreateStructForIdentifier (ConstString (),
282- {
283- {" si_pid" , pid_type},
284- {" si_uid" , uid_type},
285- {" si_status" , int_type},
286- {" si_utime" , clock_type},
287- {" si_stime" , clock_type},
288- }),
289- lldb::eAccessPublic, 0 );
290-
291- ast->AddFieldToRecordType (
292- union_type, " _sigfault" ,
293- ast->CreateStructForIdentifier (ConstString (),
294- {
295- {" si_addr" , voidp_type},
296- {" si_addr_lsb" , short_type},
297- {" _bounds" , sigfault_bounds_type},
298- }),
299- lldb::eAccessPublic, 0 );
300-
301- ast->AddFieldToRecordType (
302- union_type, " _sigpoll" ,
303- ast->CreateStructForIdentifier (ConstString (),
304- {
305- {" si_band" , band_type},
306- {" si_fd" , int_type},
307- }),
308- lldb::eAccessPublic, 0 );
309-
310- // NB: SIGSYS is not present on ia64 but we don't seem to support that
311- ast->AddFieldToRecordType (
312- union_type, " _sigsys" ,
313- ast->CreateStructForIdentifier (ConstString (),
314- {
315- {" _call_addr" , voidp_type},
316- {" _syscall" , int_type},
317- {" _arch" , uint_type},
318- }),
319- lldb::eAccessPublic, 0 );
320-
321- ast->CompleteTagDeclarationDefinition (union_type);
322- ast->AddFieldToRecordType (siginfo_type, " _sifields" , union_type,
323- lldb::eAccessPublic, 0 );
324-
325- ast->CompleteTagDeclarationDefinition (siginfo_type);
326- return siginfo_type;
157+ return CompilerType ();
327158}
0 commit comments