Re: Canceling a long running gdb/mi command

Dmitry Neverov via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAEY59_+K1Ej+QHOP03gE=FMrtxFqcw6Bhe1FXZTpzaQksqcDLw@mail.gmail.com>
I've tried to send SIGINT before asking and got an impression
that it doesn't cancel the gdb/mi command.

I was wrong, it works, but one might need to send several
SIGINTs. In my case, the first exception thrown by quit() was
caught and ignored in cp-support.c replace_typedefs(), and the
gdb/mi command continued running. The second one was caught
and handled in cp-support.c inspect_type() which made a slow
-var_list_children command to complete.

This also happens in a terminal, sometimes more than one Ctrl-C is
needed to cancel a command.

Is it by design and clients should send SIGINTs repeatedly?

Do I understand correctly, that it is safe to send a SIGINT when
no gdb/mi command is running? Meaning it won't terminate
gdb. I've tried and it works, but maybe I was lucky.
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.