Changed the data types for the sdb class characters to be unsigned
authorRobert R. Henry <rrh@ucbvax.Berkeley.EDU>
Wed, 18 Aug 1982 04:26:40 +0000 (20:26 -0800)
committerRobert R. Henry <rrh@ucbvax.Berkeley.EDU>
Wed, 18 Aug 1982 04:26:40 +0000 (20:26 -0800)
characters; this fixed a bug that prevented the arguments to a function
from being printed symbolically.  The fix was done globally; it is not
known if the "fix" fixed other bugs

SCCS-vsn: old/sdb/access.c 4.2
SCCS-vsn: old/sdb/decode.c 4.2
SCCS-vsn: old/sdb/display.c 4.3
SCCS-vsn: old/sdb/docomm.c 4.2
SCCS-vsn: old/sdb/fio.c 4.2
SCCS-vsn: old/sdb/main.c 4.2
SCCS-vsn: old/sdb/message.c 4.2
SCCS-vsn: old/sdb/old.c 4.2
SCCS-vsn: old/sdb/pcs.c 4.2
SCCS-vsn: old/sdb/prvar.c 4.3
SCCS-vsn: old/sdb/rdwr.c 4.2
SCCS-vsn: old/sdb/re.c 4.2
SCCS-vsn: old/sdb/runpcs.c 4.2
SCCS-vsn: old/sdb/setup.c 4.3
SCCS-vsn: old/sdb/sub.c 4.2
SCCS-vsn: old/sdb/symt.c 4.3
SCCS-vsn: old/sdb/udef.c 4.2
SCCS-vsn: old/sdb/version.c 4.2
SCCS-vsn: old/sdb/xeq.c 4.3
SCCS-vsn: old/sdb/cdefs.h 4.2
SCCS-vsn: old/sdb/defs.h 4.2
SCCS-vsn: old/sdb/head.h 4.3
SCCS-vsn: old/sdb/mac.h 4.2
SCCS-vsn: old/sdb/machine.h 4.2
SCCS-vsn: old/sdb/mode.h 4.2
SCCS-vsn: old/sdb/old.h 4.2

26 files changed:
usr/src/old/sdb/access.c
usr/src/old/sdb/cdefs.h
usr/src/old/sdb/decode.c
usr/src/old/sdb/defs.h
usr/src/old/sdb/display.c
usr/src/old/sdb/docomm.c
usr/src/old/sdb/fio.c
usr/src/old/sdb/head.h
usr/src/old/sdb/mac.h
usr/src/old/sdb/machine.h
usr/src/old/sdb/main.c
usr/src/old/sdb/message.c
usr/src/old/sdb/mode.h
usr/src/old/sdb/old.c
usr/src/old/sdb/old.h
usr/src/old/sdb/pcs.c
usr/src/old/sdb/prvar.c
usr/src/old/sdb/rdwr.c
usr/src/old/sdb/re.c
usr/src/old/sdb/runpcs.c
usr/src/old/sdb/setup.c
usr/src/old/sdb/sub.c
usr/src/old/sdb/symt.c
usr/src/old/sdb/udef.c
usr/src/old/sdb/version.c
usr/src/old/sdb/xeq.c

index 6b72a12..062f8f1 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)access.c 4.1 %G%";
+static char sccsid[] = "@(#)access.c 4.2 %G%";
 #
 /*
  *
 #
 /*
  *
index aeb856f..bb4b7bf 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)cdefs.h 4.1 %G%" */
+/* "@(#)cdefs.h 4.2 %G%" */
 /* type modifiers */
 
 # define PTR  020
 /* type modifiers */
 
 # define PTR  020
index db0f39d..787c498 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)decode.c 4.1 %G%";
+static char sccsid[] = "@(#)decode.c 4.2 %G%";
 #include "head.h"
 
 /* decode() - read a line from standard input and decode it */
 #include "head.h"
 
 /* decode() - read a line from standard input and decode it */
index 7597832..4a95220 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)defs.h 4.1 %G%" */
+/* "@(#)defs.h 4.2 %G%" */
 #
 /*
  *
 #
 /*
  *
index ef6f9f0..8caedc7 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)display.c 4.2 %G%";
+static char sccsid[] = "@(#)display.c 4.3 %G%";
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
@@ -44,7 +44,7 @@ nextframe() {
 /*  MACHINE DEPENDENT */
 ADDR
 formaddr(class, addr)
 /*  MACHINE DEPENDENT */
 ADDR
 formaddr(class, addr)
-register char class;
+u_char class;
 ADDR addr; {
 if (debug) printf("formaddr(%o, %d)\n", class & 0377, addr);
        switch(class & STABMASK) {
 ADDR addr; {
 if (debug) printf("formaddr(%o, %d)\n", class & 0377, addr);
        switch(class & STABMASK) {
@@ -363,7 +363,7 @@ prbkpt() {
 idbkpt() {
        register BKPTR bkptr;
        register int yesflg, cnt;
 idbkpt() {
        register BKPTR bkptr;
        register int yesflg, cnt;
-       register char c;
+       char c;
        
        cnt = 0;
 
        
        cnt = 0;
 
@@ -415,7 +415,7 @@ prframe() {
 prfrx(top) {
        int narg;
        long offset;
 prfrx(top) {
        int narg;
        long offset;
-       register char class;
+       u_char class;
        register int endflg;
        char *p;
        struct proct *procp;
        register int endflg;
        char *p;
        struct proct *procp;
@@ -466,7 +466,6 @@ prfrx(top) {
                                }
                        }
                }
                                }
                        }
                }
-
                narg = get(argp, DSP);
                if (narg & ~0xff) narg = 0;
                argp += WORDSIZE;
                narg = get(argp, DSP);
                if (narg & ~0xff) narg = 0;
                argp += WORDSIZE;
index 33cd469..cb42c50 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)docomm.c 4.1 %G%";
+static char sccsid[] = "@(#)docomm.c 4.2 %G%";
 #include <signal.h>
 #include "head.h"
 #include <a.out.h>
 #include <signal.h>
 #include "head.h"
 #include <a.out.h>
index 4b59a3d..8dab068 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)fio.c 4.1 %G%";
+static char sccsid[] = "@(#)fio.c 4.2 %G%";
 /*
  * sdb - a symbolic debugger for unix - source file access routines.
  */
 /*
  * sdb - a symbolic debugger for unix - source file access routines.
  */
index 29f2396..6b6098b 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)head.h 4.2 %G%" */
+/* "@(#)head.h 4.3 %G%" */
 #include <sys/vm.h>
 #define        PAGSIZ  (CLSIZE*NBPG)
 #include <stdio.h>
 #include <sys/vm.h>
 #define        PAGSIZ  (CLSIZE*NBPG)
 #include <stdio.h>
@@ -41,7 +41,7 @@ char  sl_name[8];
 #else
 char   *sl_name;
 #endif
 #else
 char   *sl_name;
 #endif
-char   sl_class;
+u_char sl_class;
 short  sl_type;
 int    sl_size, sl_addr;
 int    subflag;
 short  sl_type;
 int    sl_size, sl_addr;
 int    subflag;
@@ -68,7 +68,7 @@ ADDR  callpc, frame, argp;    /* current stack frame */
 char   odesc[10];              /* descriptor of last displayed variable */
 ADDR   oaddr;                  /* address of last displayed variable */
 char   otype;                  /* type of last displayed variable */
 char   odesc[10];              /* descriptor of last displayed variable */
 ADDR   oaddr;                  /* address of last displayed variable */
 char   otype;                  /* type of last displayed variable */
-char   oclass;                 /* class of last displayed variable */
+u_char oclass;                 /* class of last displayed variable */
 char   oincr;                  /* size of last displayed variable */
 struct sgttyb sdbttym, userttym;
                                /* tty modes for sdb and user */
 char   oincr;                  /* size of last displayed variable */
 struct sgttyb sdbttym, userttym;
                                /* tty modes for sdb and user */
index f12045f..07e3ca8 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)mac.h 4.1 %G%" */
+/* "@(#)mac.h 4.2 %G%" */
 #
 /*
  *     UNIX debugger
 #
 /*
  *     UNIX debugger
index fddaeda..0dd1b45 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)machine.h 4.1 %G%" */
+/* "@(#)machine.h 4.2 %G%" */
 /*
  *     UNIX/vax debugger
  */
 /*
  *     UNIX/vax debugger
  */
index 8e66d83..293a86a 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)main.c 4.1 %G%";
+static char sccsid[] = "@(#)main.c 4.2 %G%";
 #
 /*
  *
 #
 /*
  *
index 300e8e3..9017aa1 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)message.c 4.1 %G%";
+static char sccsid[] = "@(#)message.c 4.2 %G%";
 #
 /*
  *
 #
 /*
  *
index f2c0f20..3946169 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)mode.h 4.1 %G%" */
+/* "@(#)mode.h 4.2 %G%" */
 #include "machine.h"
 /*
  *     UNIX debugger
 #include "machine.h"
 /*
  *     UNIX debugger
index 7458fa8..5c18247 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)old.c 4.1 %G%";
+static char sccsid[] = "@(#)old.c 4.2 %G%";
 /*
  * sdb - a symbolic debugger for UNIX.
  */
 /*
  * sdb - a symbolic debugger for UNIX.
  */
index 2af37e1..be2879a 100644 (file)
@@ -1,4 +1,4 @@
-/* "@(#)old.h 4.1 %G%" */
+/* "@(#)old.h 4.2 %G%" */
 #ifndef VMUNIX
 struct brbuf {
        int     nl, nr;
 #ifndef VMUNIX
 struct brbuf {
        int     nl, nr;
index a729d2f..10b8f55 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)pcs.c 4.1 %G%";
+static char sccsid[] = "@(#)pcs.c 4.2 %G%";
 #
 /*
  *
 #
 /*
  *
index cd99ab0..c99d1fc 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)prvar.c 4.2 %G%";
+static char sccsid[] = "@(#)prvar.c 4.3 %G%";
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
@@ -26,7 +26,7 @@ STRING        errflg;
  */
 outvar(proc, var, fmt, metaflag, addr, class, subflag, prnamep,
                comblk, prvar)
  */
 outvar(proc, var, fmt, metaflag, addr, class, subflag, prnamep,
                comblk, prvar)
-ADDR addr; char *proc, *var, *fmt, *prnamep, *comblk; int class; {
+ADDR addr; char *proc, *var, *fmt, *prnamep, *comblk; u_char class; {
        char *p, *q, *r, *oldpr;
        register int match;
        long soffset, goffset;
        char *p, *q, *r, *oldpr;
        register int match;
        long soffset, goffset;
@@ -225,6 +225,7 @@ prdebug() {
  *  type == 1 => use addr for value to print
  */
 dispf(addr, desc, class, type, size, subflag, space)
  *  type == 1 => use addr for value to print
  */
 dispf(addr, desc, class, type, size, subflag, space)
+u_char class;
 char *desc; short type; ADDR addr; {
        dispx(addr, desc, class, type, size, subflag, DSP);
        printf("\n");
 char *desc; short type; ADDR addr; {
        dispx(addr, desc, class, type, size, subflag, DSP);
        printf("\n");
@@ -233,6 +234,7 @@ char *desc; short type; ADDR addr; {
 /* display addr in instruction space using format desc or class s */
 /*  returns -1 if bad address */
 dispi(addr, desc, class, type, size, subflag, space)
 /* display addr in instruction space using format desc or class s */
 /*  returns -1 if bad address */
 dispi(addr, desc, class, type, size, subflag, space)
+u_char class;
 char *desc; short type; ADDR addr; {
        register i;
        i = dispx(addr, desc, class, type, size, subflag, ISP);
 char *desc; short type; ADDR addr; {
        register i;
        i = dispx(addr, desc, class, type, size, subflag, ISP);
@@ -242,6 +244,7 @@ char *desc; short type; ADDR addr; {
 
 char   pd[3];
 dispx(addr, desc, class, type, size, subflag, space)
 
 char   pd[3];
 dispx(addr, desc, class, type, size, subflag, space)
+u_char class;
 char *desc; short type; ADDR addr; {
        int i, sflag;
        char *p;
 char *desc; short type; ADDR addr; {
        int i, sflag;
        char *p;
@@ -382,7 +385,7 @@ char *desc; short type; ADDR addr; {
 
        case 'g':
                dbl.ww.w1 = value;
 
        case 'g':
                dbl.ww.w1 = value;
-               dbl.ww.w2 = (class == (char) N_RSYM) ?
+               dbl.ww.w2 = (class == N_RSYM) ?
                        *(ADDR *)(((ADDR) &u)+R0+(WORDSIZE)*(addr+1)) :
                        getval(addr+WORDSIZE, 'd', space);
                printf("%.13g", dbl.d);
                        *(ADDR *)(((ADDR) &u)+R0+(WORDSIZE)*(addr+1)) :
                        getval(addr+WORDSIZE, 'd', space);
                printf("%.13g", dbl.d);
@@ -441,6 +444,7 @@ char *desc; short type; ADDR addr; {
 
 /* print variable as in prvar */
 printit(metaflag, prvar, addr, desc, class, type, size, subflag, space) 
 
 /* print variable as in prvar */
 printit(metaflag, prvar, addr, desc, class, type, size, subflag, space) 
+u_char class;
 char *desc; short type; ADDR addr; {
        if (prvar == 0)
                return;
 char *desc; short type; ADDR addr; {
        if (prvar == 0)
                return;
index 5f5457e..ba17df4 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)rdwr.c 4.1 %G%";
+static char sccsid[] = "@(#)rdwr.c 4.2 %G%";
 /*
  * sdb - a symbolic debugger for unix - source file access routines.
  */
 /*
  * sdb - a symbolic debugger for unix - source file access routines.
  */
index a7c48e3..f7db903 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)re.c 4.1 %G%";
+static char sccsid[] = "@(#)re.c 4.2 %G%";
 #include "head.h"
 #define        CBRA    1
 #define        CCHR    2
 #include "head.h"
 #define        CBRA    1
 #define        CCHR    2
index c677148..bb57ff7 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)runpcs.c 4.1 %G%";
+static char sccsid[] = "@(#)runpcs.c 4.2 %G%";
 #
 /*
  *
 #
 /*
  *
index ccc6647..a1c8000 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)setup.c 4.2 %G%";
+static char sccsid[] = "@(#)setup.c 4.3 %G%";
 #
 /*
  *
 #
 /*
  *
index 8f7a200..9a65f49 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)sub.c 4.1 %G%";
+static char sccsid[] = "@(#)sub.c 4.2 %G%";
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
@@ -204,6 +204,7 @@ char *pat, *str; {
 
 /* gets indirect address for pointers and subscripts */
 getindir(class, addr, type) 
 
 /* gets indirect address for pointers and subscripts */
 getindir(class, addr, type) 
+u_char class;
 ADDR addr; {
        if (ISARY(type)) return(addr);
        if (class == N_RSYM)
 ADDR addr; {
        if (ISARY(type)) return(addr);
        if (class == N_RSYM)
index 5793a6e..b8a2a6f 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)symt.c 4.2 %G%";
+static char sccsid[] = "@(#)symt.c 4.3 %G%";
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
@@ -58,7 +58,7 @@ initfp() {
 
        long soffset;
        int i, gflag = 0;
 
        long soffset;
        int i, gflag = 0;
-       char class;
+       u_char class;
        register char *p, *q;
        
 #ifdef FLEXNAMES
        register char *p, *q;
        
 #ifdef FLEXNAMES
@@ -151,8 +151,7 @@ initfp() {
                                if (bread(&sbuf, &stentry, sizeof stentry) 
                                                < sizeof stentry)
                                        error("Bad N_SO entry (1)");
                                if (bread(&sbuf, &stentry, sizeof stentry) 
                                                < sizeof stentry)
                                        error("Bad N_SO entry (1)");
-                               if ((stentry.n_type & STABMASK) !=
-                                               (unsigned char) class)
+                               if ((stentry.n_type & STABMASK) != class)
                                        error("Bad N_SO entry (2)");
                                soffset += sizeof stentry;
                        }
                                        error("Bad N_SO entry (2)");
                                soffset += sizeof stentry;
                        }
@@ -299,7 +298,8 @@ slooknext(pat, poffset, stelt, comblk)
 long poffset; char *pat, *comblk; {
        register int i;
        register long offset;
 long poffset; char *pat, *comblk; {
        register int i;
        register long offset;
-       char class, *q;
+       char    *q;
+       u_char  class;
        struct nlist stentry;
        struct proct *procp, *p;
        
        struct nlist stentry;
        struct proct *procp, *p;
        
@@ -411,7 +411,8 @@ globallookup(pat, filestart, stelt)
 char *pat; long filestart; {
        register int offset, i;
        struct nlist stentry;
 char *pat; long filestart; {
        register int offset, i;
        struct nlist stentry;
-       int class, clevel;
+       int     clevel;
+       u_char  class;
        
        if (debug) printf("globallookup(%s,%d)\n", pat,filestart);
        blseek(&sbuf, filestart, 0);
        
        if (debug) printf("globallookup(%s,%d)\n", pat,filestart);
        blseek(&sbuf, filestart, 0);
@@ -700,8 +701,7 @@ long offset; char *file; {
                                if (bread(&sbuf, &stentry, sizeof stentry) 
                                                < sizeof stentry)
                                        error("Bad N_SO entry (1)");
                                if (bread(&sbuf, &stentry, sizeof stentry) 
                                                < sizeof stentry)
                                        error("Bad N_SO entry (1)");
-                               if ((stentry.n_type & STABMASK) != 
-                                               (unsigned char) N_SOL)
+                               if ((stentry.n_type & STABMASK) != (u_char)N_SOL)
                                        error("Bad N_SO entry (2)");
                        }
 #else
                                        error("Bad N_SO entry (2)");
                        }
 #else
@@ -838,7 +838,7 @@ long offset; {
 char pctypes[] = {N_GSYM, N_STSYM, N_LCSYM, N_RSYM, N_SSYM, N_LSYM,
                        N_PSYM, 0};
 varclass(class)
 char pctypes[] = {N_GSYM, N_STSYM, N_LCSYM, N_RSYM, N_SSYM, N_LSYM,
                        N_PSYM, 0};
 varclass(class)
-char class; {
+u_char class; {
        char *p;
 
        for (p=pctypes; *p; p++) {
        char *p;
 
        for (p=pctypes; *p; p++) {
index 42f4f6b..fe87107 100644 (file)
@@ -1,3 +1,3 @@
-static char sccsid[] = "@(#)udef.c 4.1 %G%";
+static char sccsid[] = "@(#)udef.c 4.2 %G%";
 #include <sys/param.h>
 char           u[ctob(UPAGES)]; /* struct user u */
 #include <sys/param.h>
 char           u[ctob(UPAGES)]; /* struct user u */
index 91c30ba..1dfe77a 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)version.c 4.1 %G%";
+static char sccsid[] = "@(#)version.c 4.2 %G%";
 version() {
        error("Version 2.6 - February 1, 1980");
 }
 version() {
        error("Version 2.6 - February 1, 1980");
 }
index ae89eeb..1f7e232 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)xeq.c 4.2 %G%";
+static char sccsid[] = "@(#)xeq.c 4.3 %G%";
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>
 #include "head.h"
 #include <a.out.h>
 #include <stab.h>