[Lldb-commits] [PATCH] D132598: [lldb] Add more dylib paths for exception breakpoints

Felipe de Azevedo Piovezan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 24 13:09:18 PDT 2022


fdeazeve created this revision.
Herald added a project: All.
fdeazeve requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132598

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


Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -453,6 +453,8 @@
     // 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);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132598.455340.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220824/d2706d7d/attachment.bin>


More information about the lldb-commits mailing list