mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-19 06:38:28 +00:00
[LanguageRuntime] Simplify CreateExceptionSearchFilter in derived classes
llvm-svn: 363109
This commit is contained in:
parent
082cd30327
commit
6691f1b6cd
@ -136,7 +136,9 @@ public:
|
||||
virtual lldb::BreakpointResolverSP
|
||||
CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp) = 0;
|
||||
|
||||
virtual lldb::SearchFilterSP CreateExceptionSearchFilter();
|
||||
virtual lldb::SearchFilterSP CreateExceptionSearchFilter() {
|
||||
return m_process->GetTarget().GetSearchFilterForModule(nullptr);
|
||||
}
|
||||
|
||||
virtual bool GetTypeBitSize(const CompilerType &compiler_type,
|
||||
uint64_t &size) {
|
||||
|
@ -475,16 +475,14 @@ BreakpointResolverSP ItaniumABILanguageRuntime::CreateExceptionResolver(
|
||||
lldb::SearchFilterSP ItaniumABILanguageRuntime::CreateExceptionSearchFilter() {
|
||||
Target &target = m_process->GetTarget();
|
||||
|
||||
FileSpecList filter_modules;
|
||||
if (target.GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple) {
|
||||
// Limit the number of modules that are searched for these breakpoints for
|
||||
// Apple binaries.
|
||||
FileSpecList filter_modules;
|
||||
filter_modules.Append(FileSpec("libc++abi.dylib"));
|
||||
filter_modules.Append(FileSpec("libSystem.B.dylib"));
|
||||
return target.GetSearchFilterForModuleList(&filter_modules);
|
||||
} else {
|
||||
return LanguageRuntime::CreateExceptionSearchFilter();
|
||||
}
|
||||
return target.GetSearchFilterForModuleList(&filter_modules);
|
||||
}
|
||||
|
||||
lldb::BreakpointSP ItaniumABILanguageRuntime::CreateExceptionBreakpoint(
|
||||
|
@ -453,13 +453,11 @@ bool AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing() {
|
||||
lldb::SearchFilterSP AppleObjCRuntime::CreateExceptionSearchFilter() {
|
||||
Target &target = m_process->GetTarget();
|
||||
|
||||
FileSpecList filter_modules;
|
||||
if (target.GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple) {
|
||||
FileSpecList filter_modules;
|
||||
filter_modules.Append(std::get<0>(GetExceptionThrowLocation()));
|
||||
return target.GetSearchFilterForModuleList(&filter_modules);
|
||||
} else {
|
||||
return LanguageRuntime::CreateExceptionSearchFilter();
|
||||
}
|
||||
return target.GetSearchFilterForModuleList(&filter_modules);
|
||||
}
|
||||
|
||||
ValueObjectSP AppleObjCRuntime::GetExceptionObjectForThread(
|
||||
|
@ -293,6 +293,3 @@ void LanguageRuntime::InitializeCommands(CommandObject *parent) {
|
||||
}
|
||||
}
|
||||
|
||||
lldb::SearchFilterSP LanguageRuntime::CreateExceptionSearchFilter() {
|
||||
return m_process->GetTarget().GetSearchFilterForModule(nullptr);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user