microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
817 stars 218 forks source link

vscode debugger pauses on SIGINT after adding breakpoint (remote gdb) #1382

Closed FabioGNR closed 1 year ago

FabioGNR commented 1 year ago

When you add a breakpoint in vscode using ms-vscode.cpptools v1.13.9 the debugger pauses on SIGINT "Interrupted". I believe this was introduced with #1366. src/MICore/Debugger.cs contains var res = CmdAsync("-exec-interrupt", ResultClass.done); which to me would appear to always generate SIGINT, but I could be wrong here.

GDB version 10.2, target is ARM. Doing remote debugging on target from a Ubuntu 22 system.

I will try a smaller repro scenario which I can share.

FabioGNR commented 1 year ago

Small gist to repro: https://gist.github.com/FabioGNR/42a2f1c18e4c5820022f5f7242e978d7 It only happens with remote debug (i.e. gdbserver)

aallrd commented 1 year ago

Reproduced the issue with GDB 13.1 on RHEL 8.