merge in latest Linton version
authorDonn Seeley <donn@ucbvax.Berkeley.EDU>
Tue, 12 Jan 1988 16:11:19 +0000 (08:11 -0800)
committerDonn Seeley <donn@ucbvax.Berkeley.EDU>
Tue, 12 Jan 1988 16:11:19 +0000 (08:11 -0800)
SCCS-vsn: old/dbx/Makefile 5.11
SCCS-vsn: old/dbx/asm.c 5.2
SCCS-vsn: old/dbx/asm.c 5.2
SCCS-vsn: old/dbx/c.c 5.7
SCCS-vsn: old/dbx/cerror.tahoe.s 5.2
SCCS-vsn: old/dbx/cerror.vax.s 5.2

usr/src/old/dbx/Makefile
usr/src/old/dbx/asm.c
usr/src/old/dbx/c.c
usr/src/old/dbx/cerror.tahoe.s
usr/src/old/dbx/cerror.vax.s

index f760994..522207e 100644 (file)
@@ -3,7 +3,7 @@
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    5.10 (Berkeley) %G%
+#      @(#)Makefile    5.11 (Berkeley) %G%
 #
 # make file for debugger "dbx"
 #
 #
 # make file for debugger "dbx"
 #
@@ -17,19 +17,17 @@ AOUT        = tdbx
 DESTDIR        =
 DEST   = /usr/ucb/dbx
 
 DESTDIR        =
 DEST   = /usr/ucb/dbx
 
-# Install the mail address of the person maintaining dbx below
-# as -DMAINTAINER.  A null string disables gripes.
-
 CC     = cc
 CC     = cc
-CFLAGS = '-DMAINTAINER=""' -O
+AS     = as
+#
+# if you want gripes
+# CFLAGS = -g '-DMAINTAINER="linton@shasta.stanford.edu"'
+#
+CFLAGS = -O # -g
 
 LD = cc
 
 LD = cc
-LDFLAGS        = 
-LIBRARIES =
-
-# LD   = /bin/oldld
-# LDFLAGS      = -X /lib/crt0.o
-# LIBRARIES = -lg -lc
+LDFLAGS        = # -g
+LIBRARIES = # -lPW for IRIS (System V)
 
 OBJ = \
     y.tab.o \
 
 OBJ = \
     y.tab.o \
@@ -134,7 +132,10 @@ SRC = \
 
 .s.o:
        @echo "assembling $*.s"
 
 .s.o:
        @echo "assembling $*.s"
-       @${CC}  -c $*.s
+       @rm -f tmp
+       @/lib/cpp $*.s | grep -v "^#" > tmp
+       @${AS} -o $*.o tmp
+       @rm -f tmp
 
 .c.h:
        ./makedefs -f $*.c $*.h
 
 .c.h:
        ./makedefs -f $*.c $*.h
@@ -173,10 +174,10 @@ runtime.c: runtime.${MACHINE}.c
        @ln -s runtime.${MACHINE}.c runtime.c
 
 makedefs: makedefs.c library.o cerror.o
        @ln -s runtime.${MACHINE}.c runtime.c
 
 makedefs: makedefs.c library.o cerror.o
-       ${CC} -O makedefs.c library.o cerror.o -o makedefs
+       ${CC} -g makedefs.c library.o cerror.o -o makedefs
 
 mkdate: mkdate.c
 
 mkdate: mkdate.c
-       ${CC} -O mkdate.c -o mkdate
+       ${CC} -g ${CFLAGS} mkdate.c -o mkdate
 
 print:
        @echo "don't print it, it's too long"
 
 print:
        @echo "don't print it, it's too long"
@@ -200,21 +201,27 @@ cleandefs:
 testinstall: ${AOUT} test install
 
 test:
 testinstall: ${AOUT} test install
 
 test:
-       @chdir tests; make
+       @cd tests; make
 
 install: ${AOUT}
 
 install: ${AOUT}
-       install -s ${AOUT} ${DESTDIR}/${DEST}
+       install -s ${AOUT} ${DESTDIR}${DEST}
 
 #
 # Create a tar file called "tape" containing relevant files.
 #
 
 
 #
 # Create a tar file called "tape" containing relevant files.
 #
 
-TAPE = tape
+TAPE = tape
 
 tape:
 
 tape:
-       @tar cf ${TAPE} \
-           Makefile History version READ_ME ${SRC} \
-           makedefs.c mkdate.c tests pchanges ptests
+       @tar c${TAPE} Makefile History READ_ME ${SRC} \
+           makedefs.c mkdate.c tests pc0mods dbx.1 newdbx.1 dbxstab.5
+
+#
+# without tests subdirectory
+#
+srconlytape:
+       @tar c${TAPE} Makefile History READ_ME ${SRC} \
+           makedefs.c mkdate.c dbx.1 newdbx.1 dbxstab.5
 
 #
 # Header dependencies are purposely incomplete since header files
 
 #
 # Header dependencies are purposely incomplete since header files
index 8845123..b3500ad 100644 (file)
@@ -5,10 +5,10 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)asm.c      5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)asm.c      5.2 (Berkeley) %G%";
 #endif not lint
 
 #endif not lint
 
-static char rcsid[] = "$Header: asm.c,v 1.5 84/12/26 10:38:19 linton Exp $";
+static char rcsid[] = "$Header: asm.c,v 1.2 87/03/25 19:24:09 donn Exp $";
 
 /*
  * Assembly language dependent symbol routines.
 
 /*
  * Assembly language dependent symbol routines.
@@ -44,6 +44,7 @@ public asm_init()
     language_setop(lang, L_TYPEMATCH, asm_typematch);
     language_setop(lang, L_BUILDAREF, asm_buildaref);
     language_setop(lang, L_EVALAREF, asm_evalaref);
     language_setop(lang, L_TYPEMATCH, asm_typematch);
     language_setop(lang, L_BUILDAREF, asm_buildaref);
     language_setop(lang, L_EVALAREF, asm_evalaref);
+    language_setop(lang, L_MODINIT, asm_modinit);
     language_setop(lang, L_HASMODULES, asm_hasmodules);
     language_setop(lang, L_PASSADDR, asm_passaddr);
 }
     language_setop(lang, L_HASMODULES, asm_hasmodules);
     language_setop(lang, L_PASSADDR, asm_passaddr);
 }
@@ -157,6 +158,12 @@ long i;
     push(long, base + i * size(t->type));
 }
 
     push(long, base + i * size(t->type));
 }
 
+public asm_modinit (typetable)
+Symbol typetable[];
+{
+    /* nothing for right now */
+}
+
 public boolean asm_hasmodules ()
 {
     return false;
 public boolean asm_hasmodules ()
 {
     return false;
index 6fc6f5a..4072d53 100644 (file)
@@ -5,10 +5,10 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)c.c        5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)c.c        5.7 (Berkeley) %G%";
 #endif not lint
 
 #endif not lint
 
-static char rcsid[] = "$Header: c.c,v 1.5 84/12/26 10:38:23 linton Exp $";
+static char rcsid[] = "$Header: c.c,v 1.4 88/01/12 00:46:21 donn Exp $";
 
 /*
  * C-dependent symbol routines.
 
 /*
  * C-dependent symbol routines.
@@ -28,7 +28,7 @@ static char rcsid[] = "$Header: c.c,v 1.5 84/12/26 10:38:23 linton Exp $";
 #include "machine.h"
 
 #ifndef public
 #include "machine.h"
 
 #ifndef public
-# include "tree.h"
+#   include "tree.h"
 #endif
 
 #define isdouble(range) ( \
 #endif
 
 #define isdouble(range) ( \
@@ -38,6 +38,7 @@ static char rcsid[] = "$Header: c.c,v 1.5 84/12/26 10:38:23 linton Exp $";
 #define isrange(t, name) (t->class == RANGE and istypename(t->type, name))
 
 private Language langC;
 #define isrange(t, name) (t->class == RANGE and istypename(t->type, name))
 
 private Language langC;
+private Language langCplpl;
 
 /*
  * Initialize C language information.
 
 /*
  * Initialize C language information.
@@ -54,6 +55,16 @@ public c_init()
     language_setop(langC, L_MODINIT, c_modinit);
     language_setop(langC, L_HASMODULES, c_hasmodules);
     language_setop(langC, L_PASSADDR, c_passaddr);
     language_setop(langC, L_MODINIT, c_modinit);
     language_setop(langC, L_HASMODULES, c_hasmodules);
     language_setop(langC, L_PASSADDR, c_passaddr);
+
+    langCplpl = language_define("c++", "..c");
+    language_setop(langCplpl, L_PRINTDECL, c_printdecl);
+    language_setop(langCplpl, L_PRINTVAL, c_printval);
+    language_setop(langCplpl, L_TYPEMATCH, c_typematch);
+    language_setop(langCplpl, L_BUILDAREF, c_buildaref);
+    language_setop(langCplpl, L_EVALAREF, c_evalaref);
+    language_setop(langCplpl, L_MODINIT, c_modinit);
+    language_setop(langCplpl, L_HASMODULES, c_hasmodules);
+    language_setop(langCplpl, L_PASSADDR, c_passaddr);
 }
 
 /*
 }
 
 /*
@@ -146,7 +157,7 @@ Integer indent;
 
        case TYPE:
        case VAR:
 
        case TYPE:
        case VAR:
-           if (s->class != TYPE and s->level < 0) {
+           if (s->class != TYPE and s->storage == INREG) {
                printf("register ");
            }
            if (s->type->class == ARRAY) {
                printf("register ");
            }
            if (s->type->class == ARRAY) {
@@ -448,9 +459,7 @@ Symbol s;
 
        case FIELD:
            if (isbitfield(s)) {
 
        case FIELD:
            if (isbitfield(s)) {
-               i = 0;
-               popn(size(s), &i);
-               i = extractfield(i, s);
+               i = extractField(s);
                t = rtype(s->type);
                if (t->class == SCAL) {
                    printEnum(i, t);
                t = rtype(s->type);
                if (t->class == SCAL) {
                    printEnum(i, t);
@@ -498,7 +507,7 @@ Symbol s;
            } else if (s == t_real->type or isdouble(s)) {
                switch (s->symvalue.rangev.lower) {
                    case sizeof(float):
            } else if (s == t_real->type or isdouble(s)) {
                switch (s->symvalue.rangev.lower) {
                    case sizeof(float):
-                       prtreal(pop(float));
+                       prtreal((double) (pop(float)));
                        break;
 
                    case sizeof(double):
                        break;
 
                    case sizeof(double):
index 32a4290..b328b9b 100644 (file)
@@ -1,29 +1,29 @@
-#
-# Copyright (c) 1985 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
-#
-#      @(#)cerror.tahoe.s      5.1 (Berkeley) %G%
-#
-#
-# modified version of cerror
-#
-# The idea is that every time an error occurs in a system call
-# I want a special function "syserr" called.  This function will
-# either print a message and exit or do nothing depending on
-# defaults and use of "onsyserr".
-#
+/*
+ * Copyright (c) 1985 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)cerror.tahoe.s      5.2 (Berkeley) %G%
+ *
+ *
+ * modified version of cerror
+ *
+ * The idea is that every time an error occurs in a system call
+ * I want a special function "syserr" called.  This function will
+ * either print a message and exit or do nothing depending on
+ * defaults and use of "onsyserr".
+ */
 
 .globl cerror
 .comm  _errno,4
 
 cerror:
        movl    r0,_errno
 
 .globl cerror
 .comm  _errno,4
 
 cerror:
        movl    r0,_errno
-       callf   $0,_syserr      # new code
+       callf   $0,_syserr      /* new code */
        mnegl   $1,r0
        ret
 
        mnegl   $1,r0
        ret
 
-.globl __mycerror              # clumsy way to get this loaded
+.globl __mycerror              /* clumsy way to get this loaded */
 
 __mycerror:
        .word   0
 
 __mycerror:
        .word   0
index 4e04ffd..a09c64c 100644 (file)
@@ -1,31 +1,30 @@
-#!/bin/csh -f
-#
-# Copyright (c) 1983 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
-#
-#      @(#)cerror.vax.s        5.1 (Berkeley) %G%
-#
-# static char rcsid[] = "$Header: cerror.s,v 1.5 84/12/26 10:38:33 linton Exp $";
-#
-# modified version of cerror
-#
-# The idea is that every time an error occurs in a system call
-# I want a special function "syserr" called.  This function will
-# either print a message and exit or do nothing depending on
-# defaults and use of "onsyserr".
-#
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)cerror.vax.s        5.2 (Berkeley) %G%
+ *
+ * static char rcsid[] = "$Header: cerror.s,v 1.1 87/03/25 19:27:44 donn Rel $";
+ *
+ * modified version of cerror
+ *
+ * The idea is that every time an error occurs in a system call
+ * I want a special function "syserr" called.  This function will
+ * either print a message and exit or do nothing depending on
+ * defaults and use of "onsyserr".
+ */
 
 .globl cerror
 .comm  _errno,4
 
 cerror:
        movl    r0,_errno
 
 .globl cerror
 .comm  _errno,4
 
 cerror:
        movl    r0,_errno
-       calls   $0,_syserr      # new code
+       calls   $0,_syserr      /* new code */
        mnegl   $1,r0
        ret
 
        mnegl   $1,r0
        ret
 
-.globl __mycerror              # clumsy way to get this loaded
+.globl __mycerror              /* clumsy way to get this loaded */
 
 __mycerror:
        .word   0
 
 __mycerror:
        .word   0