codelldb icon indicating copy to clipboard operation
codelldb copied to clipboard

Source mapping does not work due to the case sensitivity

Open nedsociety opened this issue 3 years ago • 1 comments

OS: Windows 21H2 VSCode version: 1.72.2 CodeLLDB version: v1.8.1 Compiler: clang Debuggee: i686-windows-gnu

I've added a following line to launch.json so that it may recognize sources from cross-compiled binary:

"sourceMap": {"/workspaces/ProjectName": "${workspaceFolder}"},

Now using b command from debug console works well and opens the correct source. However I can't set breakpoint from source files using F9 key.

Further investigation suggests that the cause is case sensitivity. When I check the lldb source mapping it starts with D:\:

> settings show target.source-map
target.source-map
 (path-map) =
[0] "\workspaces\ProjectName" -> "D:\Path-to-the-Project"

But F9'ing a source line sets a broken breakpoint that starts with d:\:

> b
...
file = 'd:\Path-to-the-Project\source.cpp', line = 58, exact_match = 0, locations = 0 (pending)

When I try to manually set a breakpoint, only one that starts with D:\ correctly inverse-map the location:

> b d:\Path-to-the-Project\source.cpp:58
Breakpoint 19:

no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

> b D:\Path-to-the-Project\source.cpp:58
Breakpoint 20: where = target.dll`targetfunc() + 9 at source.cpp:58:20, address = 0x5113c219

nedsociety avatar Oct 21 '22 14:10 nedsociety

This is LLDB functionality, I can't fix it.

vadimcn avatar Oct 21 '22 15:10 vadimcn