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: reinhard . jessich
Subject: Re: [Simulavr-devel] gdb interrupt patch.
Date: Wed, 2 Jan 2002 14:51:33 +0100

I have test the patch now and it is as I expect that it is.
It is not a good idea to sent SIGILL to gdb if the 0x03 is detected.
The loop gets aborted, but not because of 0x03, but because of the
received $g#67. If you continue now in gdb it says:
"Can't send signals to this remote system.  SIGILL not sent." but it
continues and simulavr does also continue.

I send then a kill, and then simulavr crashes.
This is because gdb closes the pipe after the kill command and simulavr tries
to read from the pipe. It interpretes the kill command like the break command.
The solution is simple:
gdb_pre_parse_packet must return different return values for break and kill.
gdb_continue must simply terminate the loop and must send nothing to gdb if
it was a kill command.
In this case gdb_parse_packet must know that a kill command was received and
have to return -1. Remember at the beginning gdb_pre_parse_packet was called
from gdb_main_loop and now e are executing the return to this call.

I hope I am right. I have discovered this only with source reading and not with
the help of gdb. So it might be wrong.

I would suggest a return value -1 for kill and -2 for break. But thats your
decission. The best is a define or an enum. Then its readable and self
explaining and need no further comments. You should comment the fact that
gdb_parse_packet can return because of 2 different reasons. It is not so simple
to understand this by a novice.

I will not provide a patch, because you are working on this. I am still working
on some autoconf/automake extensions for the docu. I will finish this in the
night.

Then I will start to make a script to build gdb and simulavr from scratch. It
is not for me and not for you, but for the other people on the net, which are
not so familar with patch, configure and make.
This will take 2 days I think. Then I will play with the external interface of
simulavr.

Do you know where I can put the precompiled binaries?
I have not so much webspace. I think we can put them to savannah, but I don't
know it.

Reinhard

-- 
 Ing. Reinhard Jessich              mailto: address@hidden
 A-1190 Vienna, Goergengasse 2/2/1  phone: +43/1/3692600
 http://members.telering.at/jessich mobile: +43/664/1735439



reply via email to

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