Stop the lower process in GDB WITHOUT a signal?

Is there a way to stop the bottom without using Ctrl + C (or the equivalent signal sent from another process?) I use the Windows platform and control GDB from another process, so without presenting the signals, it seems that there is no good way to disrupt the execution of my program when it will work without any breakpoints.

EDIT FOR CLARITY:

There are 2 processes involved. There is process A, which is the parent of GDB. GDB controls the process, but it is on the remote host, and we will call this process C.

When I tell GDB to “start”, it starts process C on the remote host and blocks until a breakpoint is reached, process C encounters an error or a fatal signal, or GDB itself receives an interrupt signal. If you're working interactively, you simply press CTRL + C on the GDB management console, which GDB interprets as SIGINT (somehow), starting GDB to stop process C. Since I actually control GDB process A (and not doing it interactively in the shell) I cannot press Ctrl + C very well, and since Windows does not have its own concept of “Signals”, as you have on UNIX, I cannot understand how to interrupt GDB when it blocks waiting for process C to interrupt or hit breakpoints.

+3
source share
1 answer

Have you tried to look at the remote control protocols? for example, EMACS uses MI to manage GDB, you should check how / if they offer such a mechanism ctrl-Cand how they implement it.

EDIT: seems -exec-interruptto interrupt execution.

+1
source

Source: https://habr.com/ru/post/1712168/


All Articles