[Lldb-commits] [PATCH] D94846: Allow breakpoints to be set on C++11 inline initializers

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 15 16:47:32 PST 2021


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

The inline initializers contribute code to the constructor(s).  You will step onto them in the source view as you step through the constructor, for instance.  But because their source lines are outside the function source range, lldb thought a breakpoint on the initializer line was crossing from one function to another, which file & line breakpoints don't allow.  That meant if you tried to set a breakpoint on one of these lines it doesn't create any locations.

This patch fixes that by asserting that if the LineEntry in one of the SymbolContexts that the search produced exactly matches the file & line specifications in the breakpoint, it has to be a valid place to set the breakpoint, and we should just set it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94846

Files:
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/test/API/lang/cpp/break-on-initializers/Makefile
  lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py
  lldb/test/API/lang/cpp/break-on-initializers/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94846.317111.patch
Type: text/x-patch
Size: 4554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210116/2c8054fb/attachment.bin>


More information about the lldb-commits mailing list