Debug.Signal() is a new method that signals a debugged gambas process with SIGUSR2 to ask him to pause.

[GB.DEBUG]
* NEW: Debug.Signal() is a new method that signals a debugged gambas
  process with SIGUSR2 to ask him to pause.
This commit is contained in:
gambas 2022-02-02 20:57:31 +01:00
parent 44bf72261c
commit 9280365122
2 changed files with 10 additions and 0 deletions

View file

@ -289,6 +289,12 @@ BEGIN_PROPERTY(Debug_Fifo)
END_PROPERTY
BEGIN_METHOD(Debug_Signal, GB_INTEGER pid)
kill(VARG(pid), SIGUSR2);
END_METHOD
GB_DESC CDebugDesc[] =
{
@ -306,6 +312,8 @@ GB_DESC CDebugDesc[] =
GB_STATIC_METHOD("Write", NULL, Debug_Write, "(Data)s"),
GB_STATIC_METHOD("Signal", NULL, Debug_Signal, "(ProcessId)i"),
GB_STATIC_PROPERTY_READ("Fifo", "s", Debug_Fifo),
GB_EVENT("Read", NULL, "(Data)s", &EVENT_Read),

View file

@ -1305,6 +1305,8 @@ void DEBUG_main(bool error)
static DEBUG_COMMAND Command[] =
{
// "p" and "i" are reserved for remote debugging.
{ "q", TC_NONE, command_quit, FALSE },
{ "n", TC_NEXT, command_next, FALSE },
{ "s", TC_STEP, command_step, FALSE },