diff -r 289bb81748e0 cnd.debugger.gdb2/src/org/netbeans/modules/cnd/debugger/gdb2/Gdb.java --- a/cnd.debugger.gdb2/src/org/netbeans/modules/cnd/debugger/gdb2/Gdb.java Sat Jan 21 18:06:45 2012 +0100 +++ b/cnd.debugger.gdb2/src/org/netbeans/modules/cnd/debugger/gdb2/Gdb.java Wed Jan 25 20:35:41 2012 +1300 @@ -478,6 +478,7 @@ return; } tentativeGdb.setExecutor(executor); + tentativeGdb.setPid(pid); } /* OLD @@ -678,7 +679,15 @@ * Interrupt the program (note that unlike almost every other debugging * action, we're NOT asking dbx to do it - this we're actually doing * ourselves!! + * + * On embedded targets SIGINT must be set to GDB, not the target process + * Target PID is returned as 42000 from gdb. */ + private int gdbpid; + void setPid(int pid) { + gdbpid = pid; + } + boolean pause(int pid, boolean silentStop) { // The following predicate is _not_ the same as isReceptive() if (debugger.state().isRunning && debugger.state().isProcess) { @@ -686,7 +695,7 @@ try { signalled = true; this.silentStop = silentStop; - signaller.interrupt(pid); + signaller.interrupt(pid != 42000 ? pid : gdbpid); } catch(java.io.IOException e) { ErrorManager.getDefault().annotate(e, "Sending kill signal to process failed"); // NOI18N