Adb naively tries to print the reserved operand with %f and gets a
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 19 Jul 1988 09:03:43 +0000 (01:03 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 19 Jul 1988 09:03:43 +0000 (01:03 -0800)
fault; from Donn Seeley

SCCS-vsn: old/adb/adb.vax/opset.c 4.7

usr/src/old/adb/adb.vax/opset.c

index 3c5fe0e..a94c97d 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)opset.c 4.6 %G%";
+static char sccsid[] = "@(#)opset.c 4.7 %G%";
 #endif /* lint */
 /*
  *     UNIX debugger
 #endif /* lint */
 /*
  *     UNIX debugger
@@ -475,9 +475,15 @@ bignumprint(nbytes, optype)
        valuep = snarf(nbytes);
        switch(A_TYPEXT(optype)){
        case TYPF:      
        valuep = snarf(nbytes);
        switch(A_TYPEXT(optype)){
        case TYPF:      
+               if ((valuep->num_num.numFf_float.Ff_ushort[0] & 0xff80) == 0x8000) {
+                       printf("0f::"); goto qprint;
+               }
                printf("0f%f", valuep->num_num.numFf_float.Ff_value);
                break;
        case TYPD:
                printf("0f%f", valuep->num_num.numFf_float.Ff_value);
                break;
        case TYPD:
+               if ((valuep->num_num.numFd_float.Fd_ushort[0] & 0xff80) == 0x8000) {
+                       printf("0d::"); goto qprint;
+               }
                printf("0d%f", valuep->num_num.numFd_float.Fd_value);
                break;
        case TYPG:
                printf("0d%f", valuep->num_num.numFd_float.Fd_value);
                break;
        case TYPG: