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 217 forks source link

Can't interupt the target process after attach on Linux+GDB #20

Open gregg-miskelly opened 9 years ago

gregg-miskelly commented 9 years ago

After attaching to a process on Linux+GDB (Ubuntu 7.7.1-0ubuntu5~14.04.2), we don't have a way of breaking into the target process.

The result of this bug is that we can't get into break state to set breakpoints, or any of the other tasks we might want. So only breakpoints set before start debugging will work.

The only way I found that we could work around this is to -

  1. Configure gdb to stop on SIGINT using: handle SIGINT stop
  2. Using kill from the shell to interrupt the target: kill -TRAP

Some of the things I tried:

  1. Enabling target-async before the attach. I tried both on the command line and before issuing the command.
  2. Sending Ctrl-C. My debuggee has signal handlers installed, which could be the problem, but I couldn't get this to work.
hth313 commented 7 years ago

At the vscode-cpptools I filed the following: https://github.com/Microsoft/vscode-cpptools/issues/334 which may be related.

I tried browsing around in the git history, but I could not find a particular commit related to this issue, so I do not know for sure.