This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Ctrl-C does not work
- To: Marko Mlinar <markom at opencores dot org>
- Subject: Re: Ctrl-C does not work
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 22 Oct 2001 17:06:28 -0400
- CC: gdb at sources dot redhat dot com
- Organization: Red Hat , Inc. - Toronto
- References: <007d01c152e7$294427a0$0301010a@tyr>
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