[Lldb-commits] [PATCH] D45592: Allow relative file paths when settings source breakpoints

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 12 14:12:37 PDT 2018


clayborg created this revision.
clayborg added reviewers: jingham, jasonmolenda, labath, lldb-commits.
Herald added subscribers: JDevlieghere, aprantl.

Many IDEs set breakpoints using absolute paths and this causes problems when the full path of the source file path doesn't match what is in the debug info. This can be due to different build systems and do or do not resolve symlinks. This patch allows relative breakpoint to be set correctly without needing to do any target.source-map tricks. If IDEs want to, they can send down relative paths like:

  ./main.c
  ./src/main.c
  src/main.c
  foo/bar/src/main.c

I used the breakpoint resolver to match on the file basename and then we weed out anything whose relative paths don't match. This will be a huge improvement for IDEs as they can specify as much of a relative path as desired to uniquely identify a source file in the current project.


https://reviews.llvm.org/D45592

Files:
  include/lldb/Breakpoint/BreakpointResolverFileLine.h
  packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  packages/Python/lldbsuite/test/lldbutil.py
  source/Breakpoint/BreakpointResolverFileLine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45592.142258.patch
Type: text/x-patch
Size: 6139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180412/dffe7561/attachment-0001.bin>


More information about the lldb-commits mailing list