-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Open
Copy link
Labels
Description
Hello! Trying to debug a core dump that works with GDB and Vscode but it does not with lldb-dap / lldb.
- Working config with vscode - gdb
{
"name": "(gdb) Launch Core Dump",
"type": "cppdbg",
"request": "launch",
"program": "/mnt/disk1/sad/bin/AsdfApp",
"args": ["-g "],
"stopAtEntry": false,
"coreDumpPath": "${workspaceFolder}/coreDump",
"sourceFileMap": {
"/asdshell": "${workspaceFolder}",
},
"additionalSOLibSearchPath": "/mnt/disk1/asd/app/lib",
"cwd": "${workspaceFolder}",
"miDebuggerPath": "/usr/bin/gdb-multiarch",
"MIMode": "gdb",
"logging": {
"engineLogging":"verbose",
"trace": true,
"traceResponse": true,
},
}- Trying to mimick functionality with lldb-dap:
{
"name": "(lldb-dap) Launch Core Dump",
"type": "lldb-dap",
"request": "attach",
"coreFile": "${workspaceFolder}/coreDump",
"program": "/mnt/disk1/asd/app/bin/AsdfApp",
"sourceMap": [
["/asdshell", "${workspaceFolder}"]
],
"preRunCommands":[
"target symbols add /mnt/disk1/asd/app/bin/asdasda.debug",
],
"initCommands":[
"settings set target.source-map /asdshell ${workspaceFolder}",
"settings set target.exec-search-paths /mnt/disk1/asd/app/lib:${input:asdfSysPath}/sysroots/x86-asd-linux/",
],
"internalConsoleOptions": "openOnFirstSessionStart"
}The warning message with loading target symbols from .debug:
Running preRunCommands:
(lldb) target symbols add /mnt/disk1/rcs/app/bin/DispApp.debug
symbol file '/mnt/disk1/asd/app/bin/asdasddas.debug' has been added to '/mnt/disk1/asd/app/bin/asdasd'
warning: (i386) /mnt/disk1/asd/app/bin/asdasdsda 0x000cfcbd: DW_AT_specification(0x000000000009349e) has no decl
Info from breakpoints:
breakpoint list --verbose
(lldb) breakpoint list --verbose
Current breakpoints:
1: file = '/asdshell/asd/Main/Whatever/Source/WhateverInit.cpp, line = 13, exact_match = 0
2: file = '/asdshell/asd/Main/Whatever/Source/WhateverInit.cpp', line = 98, exact_match = 0
If I try to put the breakpoint other file it shows:
warning: failed to set breakpoint site at 0xc8b5630 for breakpoint 3.1: error: elf-core does not support enabling breakpoints
warning: failed to set breakpoint site at 0xc8b56ce for breakpoint 3.2: error: elf-core does not support enabling breakpoints
Show source map:
settings show target.source-map
(lldb) settings show target.source-map
target.source-map (path-map) =
[0] "/asdshell" -> "/home/borjamf/workspace/asd_shell"
I'll be happy to provide any info! Thanks a lot.
