[Lldb-commits] [lldb] r363109 - [LanguageRuntime] Simplify CreateExceptionSearchFilter in derived classes
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 11 15:52:09 PDT 2019
Author: xiaobai
Date: Tue Jun 11 15:52:08 2019
New Revision: 363109
URL: http://llvm.org/viewvc/llvm-project?rev=363109&view=rev
Log:
[LanguageRuntime] Simplify CreateExceptionSearchFilter in derived classes
Modified:
lldb/trunk/include/lldb/Target/LanguageRuntime.h
lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
lldb/trunk/source/Target/LanguageRuntime.cpp
Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=363109&r1=363108&r2=363109&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Tue Jun 11 15:52:08 2019
@@ -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) {
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=363109&r1=363108&r2=363109&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Tue Jun 11 15:52:08 2019
@@ -475,16 +475,14 @@ BreakpointResolverSP ItaniumABILanguageR
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(
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=363109&r1=363108&r2=363109&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Tue Jun 11 15:52:08 2019
@@ -453,13 +453,11 @@ bool AppleObjCRuntime::CalculateHasNewLi
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(
Modified: lldb/trunk/source/Target/LanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=363109&r1=363108&r2=363109&view=diff
==============================================================================
--- lldb/trunk/source/Target/LanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/LanguageRuntime.cpp Tue Jun 11 15:52:08 2019
@@ -293,6 +293,3 @@ void LanguageRuntime::InitializeCommands
}
}
-lldb::SearchFilterSP LanguageRuntime::CreateExceptionSearchFilter() {
- return m_process->GetTarget().GetSearchFilterForModule(nullptr);
-}
More information about the lldb-commits
mailing list