How to recognize `exec-interrupt` via Python events

Simon Sobisch via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
It is possible that I've just overlooked something, but I can't seem to 
get an event triggered at all:

	gdb.events.stop.connect(stop_handler)

is triggered after each step/next, a expected; also on signals including 
SIGINT, also when pressing CTRL+C when the inferior is running, type can 
be checked with

	if type(event) is gdb.StopEvent

When the MI frontend (Vim in this case, but this should also apply to 
Emacs and others) executes `-exec-step` or `-exec-next` the event is 
triggered, when the inferior is running and a breakpoint/watchpint is 
triggered, too.
But when the inferior is running and `-exec-interrupt` is triggered then 
the python code seems to not get an event at all - do I need to connect 
to a different event registry?


The main _problem_ that this issue creates lies in the GDB python 
extension implementing an "auto-step" (starter code at [1]) and stopping 
when interrupted... but now I see that this does not work with clients 
that interrupt with `-exec-interrupt`, which _does_ stop the running 
process, but the python extension does not recognize it and steps 
further, so the interrupt is actually not working.


[1]: https://stackoverflow.com/a/67470758/5027456
Note: the new and better one catching more events and implementing a 
gdb.Parameter got lost there, I'll update that answerit when I know how 
to solve this issue.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.