Open
Description
Environment
- OS and version: Windows 111
- VS Code: 1.96.4
- C/C++ extension:1.23.4
- GDB / LLDB version:13.2
Bug Summary and Steps to Reproduce
Bug Summary:
SourceMapping is not working if I tried to map a folder inside the project root directory.
Ie: : is working but /src:/src is not working.
Steps to reproduce:
- I've used a C/C++ project built using eclipse. I build it inside a folder and moved the entire folder to another location.
- Created a launch configuration for qemu using the relocated project and it's elf
- Mapped source till /src folder and debug
- I got The editor could not be opened because the file was not found in the editor. I was expecting the editor opens the mapped source file.
Debugger Configurations
{
"configurations": [
{
"logging": { "engineLogging": true, "trace": true, "traceResponse": true },
"name": "test-qemu",
"type": "cppdbg",
"request": "launch",
"program": "c:\\Users\\Ashling\\AppData\\Local\\Ashling\\qemu32_baremetal\\Debug\\qemu32_baremetal.elf",
"args": [],
"stopAtConnect": true,
"stopAtEntry": true,
"cwd": "c:\\Users\\Ashling\\AppData\\Local\\Ashling\\qemu32_baremetal",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "riscv32-unknown-elf-gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set RISC-V architecture",
"text": "set arch riscv:rv32",
"ignoreFailures": true
},
{
"description": "Set remote timeout",
"text": "set remotetimeout 250",
"ignoreFailures": true
},
{
"description": "Disable thread event printing",
"text": "set print thread-events off",
"ignoreFailures": true
}
],
"postRemoteConnectCommands": [
{
"description": "Remove the default `break -f main` inserted by cppdbg (github issue: vscode-cpptools#8011)",
"text": "delete 1",
"ignoreFailures": true
},
{
"description": "Load command",
"text": "load",
"ignoreFailures": true
}
],
"miDebuggerServerAddress": "localhost:1234",
"serverLaunchTimeout": 5000,
"debugServerArgs": "--gdb tcp::1234 --machine virt --nographic -S --bios none -d cpu_reset",
"debugServerPath": "qemu-system-riscv32.exe",
"filterStderr": true,
"hardwareBreakpoints": {
"require": false,
"limit": 4
},
"symbolLoadInfo": {
"loadAll": true,
"exceptionList": ""
},
"sourceFileMap": {
"C:\\workspace_ms\\qemu32_baremetal\\qemu32_baremetal\\src": "c:\\Users\\Ashling\\AppData\\Local\\Ashling\\qemu32_baremetal\\src"
}
}
]
}
Debugger Logs
Attached in the issue.
Other Extensions
No response
Additional Information
If I map without /src folder, it's working.