dap-mode icon indicating copy to clipboard operation
dap-mode copied to clipboard

dap-debug fails unless kicked by external process.

Open ReggieMarr opened this issue 1 year ago • 0 comments

I'm trying to debug some C code with the following registered template:

  (dap-register-debug-template
        "Zybo"
        (list
        :type "cppdbg"
        :name "ZYBO launch"
        :request "launch"
        :cwd "${workspaceFolder}"
        :program "${workspaceFolder}/myprogram.elf"
        :MIMode "gdb"
        :miDebuggerPath "/opt/software/Xilinx-ARM-toolchain-2017.2/SDK/2017.2/gnu/arm/lin/bin/arm-xilinx-eabi-gdb"
        :miDebuggerServerAddress "fedora:3000"))

Then I see the following message show up (which btw I cannot trace down exactly where this comes from)

Warning (emacs): Initialize request failed: Unable to start debugging. Unexpected GDB output from command "-target-select remote fedora:3000". Unknown remote qXfer reply: OK Disable showing Disable logging

Additionally I also see this in the out buffer:

=thread-group-added,id="i1"
GNU gdb (Sourcery CodeBench Lite 2015.05-16) 7.7.50.20140217-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-xilinx-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://sourcery.mentor.com/GNUToolchain/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"

It seems as though the sessions drawer has gotten kicked and my cursor moves to some file but the line isn't highlighted as it normally would be and I can't use dap-next or similar commands.

Then if I attempt to start a debugging session from the terminal like so:

repos/zybo-apps [ /opt/software/Xilinx-ARM-toolchain-2017.2/SDK/2017.2/gnu/arm/lin/bin/arm-xilinx-eabi-gdb -ex 'target remote fedora:3000' myprogram.elf
GNU gdb (Sourcery CodeBench Lite 2015.05-16) 7.7.50.20140217-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-xilinx-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://sourcery.mentor.com/GNUToolchain/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./myprogram.elf...done.
Remote debugging using fedora:3000

The dap-session gets "reactivated" in the sense that the session drawer is active, my cursor is placed on another line.

This is pretty puzzling behaviour to me so any help debugging is much appreciated.

ReggieMarr avatar May 05 '23 03:05 ReggieMarr