Open ysndr opened 3 years ago
Does the binary have debug info available?
I suggest you check whether the binary has debug symbols available as described here.
Can you reproduce this issue with command-line lldb?
Hello i have same problem, I have app with debug symbols and the manualy breatpoint works, below logs: (lldb) image list [ 0] B55E7D3C-6FAB-68C9-5CA6-52E35A527247-9710E64A 0x00400000 /home/hofman/.lldb/module_cache/remote-linux/.cache/B55E7D3C-6FAB-68C9-5CA6-52E35A527247-9710E64A/shell_no_disp [ 1] 1EBCDD24-EA61-2A06-F8EC-B3C08916B592-4419CCB1 0xb6fd5000 /home/hofman/.lldb/module_cache/remote-linux/.cache/1EBCDD24-EA61-2A06-F8EC-B3C08916B592-4419CCB1/ld-2.31.so [ 2] DDE929F5-691F-4CDC-5729-E0FA40DA2109-82DF6FB5 0xb6ffd000 [vdso] (0x00000000b6ffd000) [ 3] 1EBCDD24-EA61-2A06-F8EC-B3C08916B592-4419CCB1 0xb6fd5000 /home/hofman/.lldb/module_cache/remote-linux/.cache/1EBCDD24-EA61-2A06-F8EC-B3C08916B592-4419CCB1/ld-2.31.so [ 4] 15EA10DE 0xb6ffd000 linux-vdso.so.1 (0x00000000b6ffd000) [ 5] C2A566BA-68C2-AA15-8DF3-860CBAC2EAF5-C8D20829 0xb6f9b000 /home/hofman/.lldb/module_cache/remote-linux/.cache/C2A566BA-68C2-AA15-8DF3-860CBAC2EAF5-C8D20829/libgcc_s.so.1 [ 6] 18964F13-411A-3342-C383-0F94774D498D-6865CDC3 0xb6f85000 /home/hofman/.lldb/module_cache/remote-linux/.cache/18964F13-411A-3342-C383-0F94774D498D-6865CDC3/librt.so.1 [ 7] 392A9E57-1D2A-6A19-684B-EAB3A9E02FC8-C3B699CE 0xb6f5f000 /home/hofman/.lldb/module_cache/remote-linux/.cache/392A9E57-1D2A-6A19-684B-EAB3A9E02FC8-C3B699CE/libpthread.so.0 [ 8] 12DE54C2-BABF-5058-1F31-0CF32F8CE093-8AE7D269 0xb6f4c000 /home/hofman/.lldb/module_cache/remote-linux/.cache/12DE54C2-BABF-5058-1F31-0CF32F8CE093-8AE7D269/libdl.so.2 [ 9] 7F958815-7C43-DE02-A089-D766FE7CC1A0-FA70ED45 0xb6e4e000 /home/hofman/.lldb/module_cache/remote-linux/.cache/7F958815-7C43-DE02-A089-D766FE7CC1A0-FA70ED45/libc.so.6 (lldb) breakpoint list --verbose No breakpoints currently set. (lldb) breakpoint set --file main.rs --line 99 warning: failed to set breakpoint site at 0x40ef4c for breakpoint 1.1: error sending the breakpoint request Breakpoint 1: where = shell_no_disp`shell_no_disp::main::h11683534d7e13078 + 16 at main.rs:99:5, address = 0x0040ef4c (lldb) breakpoint list --verbose Current breakpoints: 1: file = 'main.rs', line = 99, exact_match = 0 1.1: module = /home/hofman/.lldb/module_cache/remote-linux/.cache/B55E7D3C-6FAB-68C9-5CA6-52E35A527247-9710E64A/shell_no_disp compile unit = main.rs function = shell_no_disp::main::h11683534d7e13078 location = /project/src/main.rs:99:5 address = 0x0040ef4c resolved = false hardware = false hit count = 0
(lldb) run Process 3619 launched: '/home/hofman/.lldb/module_cache/remote-linux/.cache/B55E7D3C-6FAB-68C9-5CA6-52E35A527247-9710E64A/shell_no_disp' (arm) Process 3619 stopped
VS code setup bp, but no hit. do u have some advice ? Executing script: postRunCommands Current breakpoints: 1: file = '/home/hofman/ProjektyIMA/shell_no_disp/src/main.rs', line = 98, exact_match = 0
2: file = '/home/hofman/ProjektyIMA/shell_no_disp/src/main.rs', line = 108, exact_match = 0
launch.json "version": "0.2.0", "configurations": [
{
"name": "Remote launch",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/target/arm-unknown-linux-gnueabihf/debug/shell_no_disp", // Local path.
"initCommands": [
"platform select remote-linux", // Execute `platform list` for a list of available remote platform plugins.
"platform connect connect://192.168.203.77:1234",
"settings set target.inherit-env false", // See the note below.
],
"postRunCommands": [
"breakpoint list --verbose"
],
}
I found a problem, when i build with cargo build its ok, if i am using cross build docker container , its not working ? do u have any idea, whats might be wrong ?
OS: MacOS 10.14.6 VSCode version:
Version: 1.56.2 Commit: 054a9295330880ed74ceaedda236253b4f39a335 Date: 2021-05-12T17:44:30.902Z (3 wks ago) Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 Extension version: 1.6.4 Compiler: Rust nighly Build target: x86_64-darwin
When debugging rust projects that expose both a binary and a library, breakpoints in the binary are greyed out, and do not break.
Debug log