Hi rekisum,
the debug interrupt button works under linux. If you hit stop the program will be interrupted and if you press again stop the debugger will be stopped. This does not work for windows. If you want to interrupt the debug process under windows there is only the workaround to send an user command to the debugger
interpreter-exec mi interrupt
Bye,
Mario
Hi Jens,
Ok so when you are debugging a windows program, the SIGTRAP signal occurs because a DebugBreakProcess Kernel32 call has been issued to the GDB child process (program being debugged), causing a debug exception. In this case, GDB receives this exception in the form of the SIGTRAP signal:
long pid = m_State.GetDriver()->GetChildPID();
if (DebugBreakProcessFunc && pid > 0)
{
Log(_("Trying to pause the running process..."));
HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
if (proc)
{
DebugBreakProcessFunc(proc); // yay!
CloseHandle(proc);
done = true;
}
else
Log(_("Failed."));
}
When you connect to a remote host e.g target remote localhost:2000 (in the case of OpenOCD), GDB does not have a child process. Therefore the DebugBreak mechanism is unsuitable in this case.
If you run pure GDB from the command line, to break GDB you can press ctrl-C. But I am unsuccessfull in doing this programatically.
Martin.