[lldb] Add more dylib paths for exception breakpoints
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Wed, 24 Aug 2022 20:03:29 +0000 (16:03 -0400)
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Thu, 25 Aug 2022 10:46:04 +0000 (06:46 -0400)
commitbaeb17cdfa4bba8985ebb9809edf7eb82c636bc4
treef5f8e7994c50ca1f54aeb7f5012151272d7ce1f3
parente3e9082b013ba948e3df6d4a2536df9d04656e76
[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
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp