[Lldb-commits] [PATCH] D129307: Add a new breakpoint partial match settings

jeffrey tan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 7 10:03:02 PDT 2022


yinghuitan created this revision.
yinghuitan added reviewers: clayborg, labath, jingham, jdoerfert, JDevlieghere, aadsm, kusmour.
Herald added a project: All.
yinghuitan requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Some build system (like Buck) would normalize file paths into relative paths 
in debug info to support hermetic/stable build caching.
This requires IDE/debugger users to configure correct source mapping if they
are using full path for file line breakpoint.

We are seeing many users fail to bind/resolve breakpoints due to 
incorrect/missing source map.

This patch adds a new partial match setting (target.breakpoint-partial-match) 
 which enables matching breakpoint request by partial suffix.
The number of suffix directories required to match is controlled by another
setting (target.breakpoint-partial-match-dir-count). The default value is zero
which means matching base file name only.

This mimic what most command line lldb users/testcases are doing -- they use 
base file name for setting file line breakpoint.

This setting will greatly improve breakpoint reliability in lldb-vscode useage
and can help post-mortem/off-host debugging which the file path in debug info
may not match the source location in the debug machine.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129307

Files:
  lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
  lldb/include/lldb/Target/Target.h
  lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
  lldb/source/Target/Target.cpp
  lldb/source/Target/TargetProperties.td
  lldb/test/API/breakpoint/Makefile
  lldb/test/API/breakpoint/TestBreakpointPartialMatch.py
  lldb/test/API/breakpoint/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129307.442965.patch
Type: text/x-patch
Size: 28385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220707/3f845fb0/attachment-0001.bin>


More information about the lldb-commits mailing list