Support for debugging go with gdb
This PR introduces configuration to debug Go applications with GDB, since Delve is not supported on OpenBSD.
https://github.com/svaante/dape/issues/94
At this moment, this PR has been tested on Fedora 40 with GDB 15.2.
For reasons unknown, the debugger fails to hit the breakpoint unless
:stopAtBeginningOfMainSubprogram is set to t.
It used to work with older version of dape, so could it be some sort of regression perhaps?
Debugging test using go-gdb-test target doesn't work because it can't stop at beginning of main.
go-gdb target works.
@svaante I'll probably need some assistance as I'm not familiar enough with DAP to land this.
Hey and thank you for your contribution!
For reasons unknown, the debugger fails to hit the breakpoint unless :stopAtBeginningOfMainSubprogram is set to t.
This is due to an GDB bug which dape has an workaround for but it has been fixed upstream in gdb so depending on the gdb defer-launch-attach needs to be set.
From dape-configs docs:
- defer-launch-attach: If launch/attach request should be sent
after initialize or configurationDone. If nil launch/attach are
sent after initialize request else it's sent after
configurationDone. This key exist to accommodate the two different
interpretations of the DAP specification.
See: GDB bug 32090.
How is your FSF status? This amount of code needs to be FSF assigned to be merged.
defer-launch-attachneeds to be set.
I missed that. I'll check that out and report back.
How is your FSF status?
I sent a message to assign@ today. You should be in CC just FYI.
Hi, what's the status on this PR? Just curious and trying to help move it along.