dcwbrown / dwire-debug

Simple stand-alone debugger for AVR DebugWIRE chips connected directly to an FT232R/CH340/DigiSpark/LittleWire on Linux or Windows.
GNU General Public License v2.0
189 stars 32 forks source link

GDBserver response when breakpoint reached #33

Open ccrause opened 6 years ago

ccrause commented 6 years ago

I'm testing dwire-debug with the Lazarus IDE using gdb for debugging. When hitting a breakpoint the IDE would pop up an error notification that a External: 0 was received. According to https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets gdb expects a SIGTRAP (= 5) response when the target reached a breakpoint.

I've modified the responses for '?', 'c', 's' commands to "S05" in handle_command (rsp.c) and the Lazarus IDE now behaves as expected during debugging. Since this is the expected response I suggest the source gets updated accordingly.

Great work by the way.