Any solution to not being able to interrupt step in GDB ?

Antony KING antony.king@st.com
Wed Feb 27 22:46:00 GMT 2008


Daniel Jacobowitz wrote:
> On Wed, Feb 27, 2008 at 09:59:53PM +0000, Antony KING wrote:
>> Is there any clean solution I can use which allows me to break out this
>> loop if there is a pending SIGINT event waiting to be processed ? There
>> seems a be a need for a way to "stop stepping" when Ctrl-C is pressed.
>> One thought I have is to fake a target SIGINT signal by checking for a
>> pending SIGINT event after returning from target_wait() and modifying
>> ecs before calling handle_inferior_event().
> 
> I can refer you to the reply to the message you linked; which signal
> handler is running when not in your "sweet spot"?
> 

The signal handler is the restored default handler, "handle_sigint". My 
target interface only substitutes that default SIGINT handler when 
implementing the target_wait() functionality (it is modelled on remote.c).

My first thought was that QUIT should achieve the effect I need but 
quit_flag, as was pointed out, is not being set soon enough. Also, 
forcing an immediate_quit is not suitable since I would like to stop the 
stepping cleanly with a target SIGINT (plus it breaks my target 
interface, but that is my problem :-).

Cheers,

Antony



More information about the Gdb mailing list