Fixed the trap debugging primitive
authorStephen Adams <edu/mit/csail/zurich/adams>
Tue, 15 Jul 1997 22:31:53 +0000 (22:31 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Tue, 15 Jul 1997 22:31:53 +0000 (22:31 +0000)
INSTRUCTION-ADDRESS->COMPILED-CODE-BLOCK to handle integer arguments
correctly.

v7/src/microcode/pruxenv.c

index 1b151dc4ce75239b31820914fa660da173a1872e..55de6d7edd23a167108975c273d66f01cc394be0 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: pruxenv.c,v 1.16 1995/07/27 00:37:51 adams Exp $
+$Id: pruxenv.c,v 1.17 1997/07/15 22:31:53 adams Exp $
 
 Copyright (c) 1990-1995 Massachusetts Institute of Technology
 
@@ -258,9 +258,11 @@ DEFINE_PRIMITIVE ("INSTRUCTION-ADDRESS->COMPILED-CODE-BLOCK",
 {
   PRIMITIVE_HEADER (1);
   {
-      extern SCHEME_OBJECT find_ccblock();
-      long the_pc = (long) OBJECT_ADDRESS(ARG_REF(1));
-      PRIMITIVE_RETURN (find_ccblock(the_pc));
+      extern SCHEME_OBJECT find_ccblock(long);
+      long the_pc = (INTEGER_P (ARG_REF (1)))
+       ? (integer_to_long (ARG_REF (1)))
+       : ((long) OBJECT_ADDRESS (ARG_REF (1)));
+      PRIMITIVE_RETURN (find_ccblock (the_pc));
   }
 }