This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ctrl-C does not work


Marko Mlinar wrote:
> 
> Hello !
> 
> I am just finishing gdb port for or1k cpu. I've noticed that ctrl-c during
> program execution does not
> interrupt the target (I suppose this should occur during execution of
> or1k_target_wait() function).
> How can I turn this on?
> 

More or less guessing what you are doing, I believe you forgot to
set the signal handles for SIGINT to some function of yours that
calls your or1k_target_stop().  Assuming that you have a
or1k_target_stop() and that it works (and your target can be stopped). 

Don't forget to save the old handler and restore it.  You may want
to have a second handler for the case the target does not stop and
you want to close (abandon) the connection.  Look at remote.c for 
some inspiration.


-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]