If you try the following patch it will work (well, almost ;-) and
I bet it's not the solution!)
As you can see the signal received by the program as I
press ^C is SIGEMT (does it make sense ?)
Another thing : after compilint the cooperative kernel with
the -g compiler option even the listing works and so I tried
to put a breakpoint. It kind of worked, but the debugger reported
a SIGSEGV signal instead of a breakpoint, the breakpoint
was thereafter kind of disabled (didn't break).
After a new ^C the breakpoint worked again, but again for a
single time.
Hope it helps.
Ciao,
Lorenzo
Continuing.
>>> Here I pressed ^C
Program received signal SIGEMT, Emulation trap.
0x106bd in __syscall () at main.c:267
267 }
(gdb) list 172
167 *
168 * RETURNS:
169 * none
170 */
171 {
172 switch(num) {
173 case SYSSHOWNUM:
174 __shownum(parm1, parm2);
175 break;
176 };
(gdb) b 172
Note: breakpoints 1, 2 and 3 also set at pc 0x105a0.
Breakpoint 4 at 0x105a0: file main.c, line 172.
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
syscall (num=0, parm1=0, parm2=0) at main.c:172
172 switch(num) {
(gdb)
--- freemware/user/plugins/ice/remote-utils.c Sun Jan 9 20:48:19 2000
+++ freemware.work/user/plugins/ice/remote-utils.c Sun Jan 9 20:42:22
2000@@ -26,6 +26,7 @@
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include <signal.h>
+#include <errno.h>
static int kiodebug = 0;
static int remote_desc;
@@ -225,7 +226,9 @@
if (bufcnt-- > 0)
return *bufp++ & 0x7f;
- bufcnt = read (remote_desc, buf, sizeof (buf));
+ do {
+ bufcnt = read (remote_desc, buf, sizeof (buf));
+ } while ((bufcnt == -1) && (errno == EINTR));
if (bufcnt <= 0)
{