From Russ Cox:
authorwarren.toomey <warren.toomey@44b2186c-a14b-0410-8c95-595313601b93>
Mon, 19 May 2008 13:46:53 +0000 (13:46 +0000)
committerwarren.toomey <warren.toomey@44b2186c-a14b-0410-8c95-595313601b93>
Mon, 19 May 2008 13:46:53 +0000 (13:46 +0000)
In v7trap.c, the case S_BREAK body is wrong:

<       i=0; break;
---
>       i=sarg1; break;

since (in V6 at least) the break system
call does not return anything -- it leaves r0
untouched.  If break zeros r0, then db mysteriously
fails to load the symbols from binaries.

v7trap.c

index 6d40d41..00a2f31 100644 (file)
--- a/v7trap.c
+++ b/v7trap.c
@@ -1,8 +1,8 @@
 /* v7trap.c - Deal with V7 trap instructions. V5 and V6 syscalls are also
  * done here, because the syscall interface is nearly the same as V7.
  *
- * $Revision: 1.49 $
- * $Date: 2008/05/19 13:24:35 $
+ * $Revision: 1.50 $
+ * $Date: 2008/05/19 13:45:58 $
  */
 #include "defines.h"
 #include <sys/stat.h>
@@ -125,7 +125,7 @@ v7trap()
     case S_LOCK:
     case S_STIME:
     case S_BREAK:
-       i=0; break;
+       i=sarg1; break;
     case S_SYNC:
        sync(); i=0; break;