Author: Felipe de Azevedo Piovezan
Date: 2022-08-25T06:46:04-04:00
New Revision: baeb17cdfa4bba8985ebb9809edf7eb82c636bc4

URL: 
https://github.com/llvm/llvm-project/commit/baeb17cdfa4bba8985ebb9809edf7eb82c636bc4
DIFF: 
https://github.com/llvm/llvm-project/commit/baeb17cdfa4bba8985ebb9809edf7eb82c636bc4.diff

LOG: [lldb] Add more dylib paths for exception breakpoints

When setting a breakpoint upon throwing exceptions, LLDB only
searches for the libc++abi code inside dylibs named:
  1. libc++abi.dylib
  2. libSystem.B.dylib

However, this fails to account for libs with a version number. For
example, when building the libcxx and libcxxabi runtimes, the following
dylibs are generated:

build/lib/libc++abi.1.0.dylib
build/lib/libc++abi.1.dylib -> libc++abi.1.0.dylib
build/lib/libc++abi.dylib -> libc++abi.1.dylib

If we are debugging a program linked against any of the "versioned"
libs, the breakpoint doesn't work. This commit adds these names to the
search list.

Differential Revision: https://reviews.llvm.org/D132598

Added: 
    

Modified: 
    
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp

Removed: 
    


################################################################################
diff  --git 
a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
 
b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 1595335cfe330..563f2de8f190d 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -453,6 +453,8 @@ lldb::SearchFilterSP 
ItaniumABILanguageRuntime::CreateExceptionSearchFilter() {
     // Apple binaries.
     filter_modules.EmplaceBack("libc++abi.dylib");
     filter_modules.EmplaceBack("libSystem.B.dylib");
+    filter_modules.EmplaceBack("libc++abi.1.0.dylib");
+    filter_modules.EmplaceBack("libc++abi.1.dylib");
   }
   return target.GetSearchFilterForModuleList(&filter_modules);
 }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to