simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] gdb interrupt patch.


From: Theodore A. Roth
Subject: Re: [Simulavr-devel] gdb interrupt patch.
Date: Wed, 2 Jan 2002 10:00:46 -0700 (MST)

On Wed, 2 Jan 2002, address@hidden wrote:

:)On Wed, 02 Jan 2002, Theodore A. Roth wrote:
:)> Give it a whirl and tell me what I messed up. ;)
:)I haven't compiled it until now, but I think it will work. I am sure
:)you have tested it.
:)
:)I have done code reading only and I thing you have forgotten to add a
:)return -2; and remove the gdb_send_reply( fd, "S04" ); in the case
:)block if 0x03 is received in gdb_pre_parse_packet.
:)
:)Maybe I am wrong, but gdb send 0x03 only in case of a break (or does
:)send it more?) and then I can't see how you break the loop in
:)gdb_continue, if you return 0 instead of a negative value.
:)
:)I think I should test it and not thinking about a problem, that
:)doesn't exist.
:)
:)I am happy to see, that you have found the bug with the not
:)uninstalled signal handler. I started to write an email concerning
:)this bug. Now it is fixed, but. As far as I remember, you should
:)install the ignore function to a signal handler after you have got it.
:)So
:)
:)static void catch_sigint( int sig )
:){
:)    if (sig == SIGINT)
:)    {
:)        signal(SIGINT, SIG_IGN);
:)        __got_SIGINT++;
:)    }
:)}
:)
:)the correct code.

That might make more sense. In reality, all the signal stuff is just a 
hack for now. I want to reimplement it all correctly using sigaction(). 
Maybe I should start working on that now.

:)
:)For the short term this is enough, but for the long term I think we should
:)handle all signals on a central point and remember them in the core. I am sure
:)there will be other loops in the future, which must be breaked if someone
:)enters <cntr-c>. But we should implement what we need, at the point when we
:)need it, not now.

I'll need to think a bit harder on this. I don't have a well formulated 
opinion or plan of attack yet.

Ted




reply via email to

[Prev in Thread] Current Thread [Next in Thread]