diff options
author | Greg Clayton <gclayton@apple.com> | 2013-02-26 00:21:38 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-02-26 00:21:38 +0000 |
commit | fac989114fa01ecb8301401f09621b482992551a (patch) | |
tree | 0a0503d02c6e6a8a0a4c87e1bdade0d5af03adee | |
parent | f4124aea41324be9fdc77630036fc0bc9776a5ad (diff) | |
download | bcm5719-llvm-fac989114fa01ecb8301401f09621b482992551a.tar.gz bcm5719-llvm-fac989114fa01ecb8301401f09621b482992551a.zip |
<rdar://problem/13289157>
Set the exception breakpoints more efficiently by specifying two module basenames as module filters for Apple vendor targets.
llvm-svn: 176063
-rw-r--r-- | lldb/include/lldb/Core/FileSpecList.h | 6 | ||||
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/lldb/include/lldb/Core/FileSpecList.h b/lldb/include/lldb/Core/FileSpecList.h index 52fa04d9c10..f94bdae83c0 100644 --- a/lldb/include/lldb/Core/FileSpecList.h +++ b/lldb/include/lldb/Core/FileSpecList.h @@ -176,6 +176,12 @@ public: size_t MemorySize () const; + bool + IsEmpty() const + { + return m_files.empty(); + } + //------------------------------------------------------------------ /// Get the number of files in the file list. /// diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index e8bdfadf689..b1abfae674a 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -413,11 +413,24 @@ ItaniumABILanguageRuntime::SetExceptionBreakpoints () if (!m_cxx_exception_bp_sp) { Target &target = m_process->GetTarget(); - + FileSpecList filter_modules; + // Limit the number of modules that are searched for these breakpoints for + // Apple binaries. + if (target.GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple) + { + filter_modules.Append(FileSpec("libc++abi.dylib", false)); + filter_modules.Append(FileSpec("libSystem.B.dylib", false)); + } BreakpointResolverSP exception_resolver_sp = CreateExceptionResolver (NULL, catch_bp, throw_bp, for_expressions); - SearchFilterSP filter_sp = target.GetSearchFilterForModule(NULL); + SearchFilterSP filter_sp; + + if (filter_modules.IsEmpty()) + filter_sp = target.GetSearchFilterForModule(NULL); + else + filter_sp = target.GetSearchFilterForModuleList(&filter_modules); m_cxx_exception_bp_sp = target.CreateBreakpoint (filter_sp, exception_resolver_sp, is_internal); + printf("exception breakpoint with %zu locations\n", m_cxx_exception_bp_sp->GetNumLocations());/// REMOVE THIS PRIOR TO CHECKIN if (m_cxx_exception_bp_sp) m_cxx_exception_bp_sp->SetBreakpointKind("c++ exception"); } |