Lorenzo Campedelli wrote:

> If you try the following patch it will work (well, almost ;-) and
> I bet it's not the solution!)

By now, I've made system calls restartable.
But thanks for the patch, anyway !!!

> As you can see the signal received by the program as I
> press ^C is SIGEMT (does it make sense ?)

Whoops !!  Sorry, made a little mistake.  The patch attached
will set it right (Ulrich please add this to previous patch
if you load it into CVS).

> Another thing : after compilint the cooperative kernel with
> the -g  compiler option even the listing works and so I tried
> to put a breakpoint.

Breakpoints don't work yet... we first need a structure
for allocating interrupts to plugins.  The debugger
plugin itself has no problems with breakpoints, but int1
and int3 are not forwarded to it correctly yet.

Ramon
diff -Nur freemware-old/user/plugins/ice/low-freemware.c 
freemware/user/plugins/ice/low-freemware.c
--- freemware-old/user/plugins/ice/low-freemware.c      Sun Jan  9 23:37:29 2000
+++ freemware/user/plugins/ice/low-freemware.c  Sun Jan  9 23:29:42 2000
@@ -68,24 +68,24 @@
 
     switch (context.event_info & 0xff)
     {
-    case 0  : sigval = SIGFPE;  break; /* divide by zero              */
-    case 1  : sigval = SIGTRAP; break; /* debug exception             */
-    case 2  : sigval = SIGBUS;  break; /* NMI fault                   */
-    case 3  : sigval = SIGTRAP; break; /* breakpoint                  */
-    case 4  : sigval = SIGUSR1; break; /* into instruction (overflow) */
-    case 5  : sigval = SIGUSR1; break; /* bound instruction           */
-    case 6  : sigval = SIGILL;  break; /* Invalid opcode              */
-    case 7  : sigval = SIGFPE;  break; /* coprocessor not available   */
-    case 8  : sigval = SIGEMT;  break; /* double fault                */
-    case 9  : sigval = SIGSEGV; break; /* coprocessor segment overrun */
-    case 10 : sigval = SIGSEGV; break; /* Invalid TSS                 */
-    case 11 : sigval = SIGSEGV; break; /* Segment not present         */
-    case 12 : sigval = SIGSEGV; break; /* stack exception             */
-    case 13 : sigval = SIGSEGV; break; /* general protection          */
-    case 14 : sigval = SIGSEGV; break; /* page fault                  */
-    case 16 : sigval = SIGEMT;  break; /* coprocessor error           */
-    case -1 : sigval = SIGINT;  break; /* break command from gdb      */
-    default : sigval = SIGEMT;  break; /* "software generated"        */
+    case 0    : sigval = SIGFPE;  break; /* divide by zero              */
+    case 1    : sigval = SIGTRAP; break; /* debug exception             */
+    case 2    : sigval = SIGBUS;  break; /* NMI fault                   */
+    case 3    : sigval = SIGTRAP; break; /* breakpoint                  */
+    case 4    : sigval = SIGUSR1; break; /* into instruction (overflow) */
+    case 5    : sigval = SIGUSR1; break; /* bound instruction           */
+    case 6    : sigval = SIGILL;  break; /* Invalid opcode              */
+    case 7    : sigval = SIGFPE;  break; /* coprocessor not available   */
+    case 8    : sigval = SIGEMT;  break; /* double fault                */
+    case 9    : sigval = SIGSEGV; break; /* coprocessor segment overrun */
+    case 10   : sigval = SIGSEGV; break; /* Invalid TSS                 */
+    case 11   : sigval = SIGSEGV; break; /* Segment not present         */
+    case 12   : sigval = SIGSEGV; break; /* stack exception             */
+    case 13   : sigval = SIGSEGV; break; /* general protection          */
+    case 14   : sigval = SIGSEGV; break; /* page fault                  */
+    case 16   : sigval = SIGEMT;  break; /* coprocessor error           */
+    case 0xff : sigval = SIGINT;  break; /* break command from gdb      */
+    default   : sigval = SIGEMT;  break; /* "software generated"        */
     }
 
     return gdb_converse (sigval, status);
diff -Nur freemware-old/user/plugins/ice/remote-utils.c 
freemware/user/plugins/ice/remote-utils.c
--- freemware-old/user/plugins/ice/remote-utils.c       Sun Jan  9 23:37:29 2000
+++ freemware/user/plugins/ice/remote-utils.c   Sun Jan  9 23:29:12 2000
@@ -196,7 +196,7 @@
        return;
     }
 
-    context.event_info = -1;
+    context.event_info = 0xff;
     break_vm = 1;
     return;
 }

Reply via email to