[Bug 31707] New: Settings breakpoints using absolute file path that contains symlinks does not work

Bug ID 31707
Summary Settings breakpoints using absolute file path that contains symlinks does not work
Product lldb
Version unspecified
Hardware Macintosh
OS MacOS X
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter alexandru.croitor@qt.io
CC llvm-bugs@lists.llvm.org
Classification Unclassified

Consider I have a C++ file at: /Users/alex/Dev/project/main.cpp

and I compiled the file there with:

clang++ -g -O0 ./main.cpp

Now if I try to set a breakpoint with:

br set -f /Users/alex/Dev/project/main.cpp -l 10

the breakpoint will work.
But if I try to set a breakpoint with:

br set -f /Volumes/Macintosh\ HD/Users/alex/Dev/project/main.cpp -l 10

the breakpoint will not work, because it differs from the DWARF written
filepath.

Machintosh HD is a symlink to /

$ ls -al /Volumes/
lrwxr-xr-x   1 root  admin      1 Dec 23 07:40 Macintosh HD -> /

Should lldb maybe consider using the canonical path to a given file, when
setting a breakpoint?

(lldb) version
lldb-360.99.0
  clang revision a41b64721d4be78870711cbb7b5af156a9e1f4ad
  llvm revision 3c45ea423a9e3d27eaf77af0639a73e0c56d9a35