[Lldb-commits] [PATCH] D135921: [WIP][lldb][Breakpoint] Fix setting breakpoints on templates by basename
Michael Buch via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 13 14:34:58 PDT 2022
Michael137 created this revision.
Michael137 added reviewers: aprantl, labath, jingham.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This patch fixes a regression with setting breakpoints on template
functions by name. E.g.,:
$ cat main.cpp
template<typename T>
struct Foo {
template<typename U>
void func() {}
};
int main() {
Foo<int> f;
f.func<double>();
}
(lldb) br se -n func
This has regressed since `3339000e0bda696c2e29173d15958c0a4978a143`
where we started using the `CPlusPlusNameParser` for getting the
basename of the function symbol and match it exactly against
the name in the breakpoint command. The parser will include template
parameters in the basename, so the exact match will always fail
**Testing**
- Added API tests
- Added unit-tests
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135921
Files:
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
lldb/test/API/functionalities/breakpoint/cpp/Makefile
lldb/test/API/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
lldb/test/API/functionalities/breakpoint/cpp/main.cpp
lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135921.467608.patch
Type: text/x-patch
Size: 7759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221013/17f17db0/attachment.bin>
More information about the lldb-commits
mailing list