Open DeadRabbits307 opened 5 years ago
can you try to update gdb? The internal problem to GDB seems like it could be a reason (in the mi interface there could be bugs)
I tried another setup (without cross compile effort: both x86_64) with a newer version of gdb:
Host: Windows 10 with VS Code 1.36.0 and Native Debug 0.23.1 Terminal: WSL (Arch Linux) with gdb 8.2.1 and architecture x86_64
Target: VMware Player running Manjaro 1800 gdbserver 8.3 architectur x86_64
Here the same: running gdb in the terminal (without VS code/native debug) using gdb's command r/restart everything works fine
Using VS Code following output:
hm I think that's another issue (because /usr/bin/gdb doesn't exist in the scope of the debugger extension, which is its own process)
How would the correct gdbpath
entry look like?
as you are on windows you need a gdb.exe and point to that with your gdbpath variable (as C:... path)
@WebFreak001 you are right.
In the setup of https://github.com/WebFreak001/code-debug/issues/183#issue-464114349 I used aarch64-linux-gdb
version 7.11.1
Nearly same setup but with aarch64-linux-gnu-gdb
version 8.3 it works; only the autorun
entry must be changed to "b main"
(entry is important, because otherwise gdb
would not stop; breakpoints set by VS code are evaluated/set after(!) the commands listed in autorun
).
Is it possible to have extended-remote
also "directly" (like the remote:true
option)? Using the target option like in the first post leads to
Failed to attach: Unrecognized argument "-p" (from file-symbol-file "-p")
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-added","output":[["id","i1"]]}]}
GDB -> App: {"token":1,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
GDB -> App: {"token":2,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["source-path","X:\\my\\src;$cdir;$cwd"]]}}
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"tsv-created","output":[["name","trace_timestamp"],["initial","0"]]}]}
GDB -> App: {"token":3,"outOfBandRecord":[],"resultRecords":{"resultClass":"connected","results":[]}}
GDB -> App: {"token":4,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Unrecognized argument \"-p\""]]}}
Setup: gdbserver version: 7.11.1 ("gdbserver was configured as "aarch64-buildroot-linux-uclibc"") aarch64-linux-gdb version: 7.11.1 VS Code version: 1.34.0 native debug version: 0.23.1
On the target (embedded Linux OS build with buildroot) I start
gdbserver
as following:$ gdbserver --multi :2345
My launch.json:
With this launch.json debugging with VS code is possible, but without the "restart" and "stop" functionality.
Activating a "Start Debugging" following outputs are produced:
target:
host:
Without the "run" autorun-option, following host output is printed:
On the other hand, running gdb in the terminal (without VS code/native debug) using gdb's command
r/restart
everything works fine:target:
host:
Therefore: Do I have a wrong launch.json file or are modifications to native debug necessary?