diff options
34 files changed, 354 insertions, 157 deletions
diff --git a/sys/arch/i386/i386/db_disasm.c b/sys/arch/i386/i386/db_disasm.c index 8e467cbd16c..22b4df8706f 100644 --- a/sys/arch/i386/i386/db_disasm.c +++ b/sys/arch/i386/i386/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.2 1996/02/28 14:38:40 mickey Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.3 1996/03/11 11:16:40 mickey Exp $ */ /* * Mach Operating System @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,10 +22,10 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * - * Id: db_disasm.c,v 2.3 91/02/05 17:11:03 mrt (CMU) + * Id: db_disasm.c,v 2.6 92/01/03 20:05:00 dbg (CMU) */ /* @@ -281,6 +281,25 @@ struct inst db_inst_0fcx[] = { /*cf*/ { "bswap", FALSE, LONG, op1(Ri), 0 }, }; +struct inst db_inst_0fdx[] = { +/*c0*/ { "cmpxchg",TRUE, BYTE, op2(R, E), 0 }, +/*c1*/ { "cmpxchg",TRUE, LONG, op2(R, E), 0 }, +/*c2*/ { "", FALSE, NONE, 0, 0 }, +/*c3*/ { "", FALSE, NONE, 0, 0 }, +/*c4*/ { "", FALSE, NONE, 0, 0 }, +/*c5*/ { "", FALSE, NONE, 0, 0 }, +/*c6*/ { "", FALSE, NONE, 0, 0 }, +/*c7*/ { "", FALSE, NONE, 0, 0 }, +/*c8*/ { "", FALSE, NONE, 0, 0 }, +/*c9*/ { "", FALSE, NONE, 0, 0 }, +/*ca*/ { "", FALSE, NONE, 0, 0 }, +/*cb*/ { "", FALSE, NONE, 0, 0 }, +/*cc*/ { "", FALSE, NONE, 0, 0 }, +/*cd*/ { "", FALSE, NONE, 0, 0 }, +/*ce*/ { "", FALSE, NONE, 0, 0 }, +/*cf*/ { "", FALSE, NONE, 0, 0 }, +}; + struct inst *db_inst_0f[] = { db_inst_0f0x, 0, @@ -295,7 +314,7 @@ struct inst *db_inst_0f[] = { db_inst_0fax, db_inst_0fbx, db_inst_0fcx, - 0, + db_inst_0fdx, 0, 0 }; diff --git a/sys/arch/i386/i386/db_interface.c b/sys/arch/i386/i386/db_interface.c index cb652d436e0..9c632b7a239 100644 --- a/sys/arch/i386/i386/db_interface.c +++ b/sys/arch/i386/i386/db_interface.c @@ -1,3 +1,4 @@ +/* $OpenBSD: db_interface.c,v 1.2 1996/03/11 11:16:42 mickey Exp $ */ /* $NetBSD: db_interface.c,v 1.18 1995/10/10 04:45:03 mycroft Exp $ */ /* @@ -11,7 +12,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +23,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU) */ @@ -35,13 +36,12 @@ #include <sys/proc.h> #include <sys/reboot.h> #include <sys/systm.h> /* just for boothowto --eichin */ -#include <setjmp.h> #include <vm/vm.h> #include <machine/db_machdep.h> -extern jmp_buf *db_recover; +extern label_t *db_recover; int db_active = 0; diff --git a/sys/arch/i386/i386/db_trace.c b/sys/arch/i386/i386/db_trace.c index 377392cd9a0..7ea0e5a9a10 100644 --- a/sys/arch/i386/i386/db_trace.c +++ b/sys/arch/i386/i386/db_trace.c @@ -1,3 +1,4 @@ +/* $OpenBSD: db_trace.c,v 1.2 1996/03/11 11:16:44 mickey Exp $ */ /* $NetBSD: db_trace.c,v 1.17 1995/10/11 04:19:35 mycroft Exp $ */ /* @@ -11,7 +12,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +23,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ #include <sys/param.h> diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c index 5fc57423379..6b3818082e5 100644 --- a/sys/arch/i386/i386/gdt.c +++ b/sys/arch/i386/i386/gdt.c @@ -1,4 +1,5 @@ -/* $OpenBSD: gdt.c,v 1.3 1996/02/28 14:38:41 mickey Exp $ */ +/* $OpenBSD: gdt.c,v 1.4 1996/03/11 11:16:46 mickey Exp $ */ +/* $NetBSD: gdt.c,v 1.5 1995/11/17 06:47:27 jtc Exp $ */ /* * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -103,7 +104,6 @@ gdt_compact() int slot = NGDT, oslot; for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { - PHOLD(p); pcb = &p->p_addr->u_pcb; oslot = IDXSEL(pcb->pcb_tss_sel); if (oslot >= gdt_count) { @@ -125,7 +125,6 @@ gdt_compact() dynamic_gdt[oslot].gd.gd_type = SDT_SYSNULL; pcb->pcb_ldt_sel = GSEL(slot, SEL_KPL); } - PRELE(p); } for (; slot < gdt_count; slot++) if (dynamic_gdt[slot].gd.gd_type == SDT_SYSNULL) diff --git a/sys/arch/i386/i386/linux_machdep.c b/sys/arch/i386/i386/linux_machdep.c index 27b1616907b..b38e48cf9ed 100644 --- a/sys/arch/i386/i386/linux_machdep.c +++ b/sys/arch/i386/i386/linux_machdep.c @@ -1,3 +1,4 @@ +/* $OpenBSD: linux_machdep.c,v 1.3 1996/03/11 11:16:48 mickey Exp $ */ /* $NetBSD: linux_machdep.c,v 1.24 1996/01/04 22:21:57 jtc Exp $ */ /* @@ -502,6 +503,9 @@ linux_machdepioctl(p, v, retval) break; #endif default: +#ifdef DIAGNOSTIC + printf("linux_machdepioctl: invalid ioctl %08x\n", com); +#endif return EINVAL; } SCARG(&bia, com) = com; diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 051e811cc43..b20bc98824d 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.7 1996/03/03 03:02:34 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.8 1996/03/11 11:16:50 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.191 1996/03/01 21:49:49 scottr Exp $ */ /*- @@ -703,8 +703,8 @@ boot(howto) extern int cold; if (cold) { - printf("hit reset please"); - for(;;); + howto |= RB_HALT; + goto haltsys; } boothowto = howto; if ((howto&RB_NOSYNC) == 0 && waittime < 0) { @@ -717,8 +717,9 @@ boot(howto) resettodr(); } splhigh(); +haltsys: + doshutdownhooks(); if (howto & RB_HALT) { - doshutdownhooks(); printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); @@ -729,7 +730,6 @@ boot(howto) dumppcb.pcb_cr3 = rcr3(); dumpsys(); } - doshutdownhooks(); } printf("rebooting...\n"); cpu_reset(); diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c index cb6e4e58595..c6f72f28591 100644 --- a/sys/ddb/db_access.c +++ b/sys/ddb/db_access.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_access.c,v 1.2 1996/02/20 13:35:30 mickey Exp $ */ +/* $OpenBSD: db_access.c,v 1.3 1996/03/11 11:15:52 mickey Exp $ */ /* * Mach Operating System @@ -23,7 +23,7 @@ * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_access.h b/sys/ddb/db_access.h index f85e6825528..30384ef45b3 100644 --- a/sys/ddb/db_access.h +++ b/sys/ddb/db_access.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_access.h,v 1.2 1996/02/20 13:35:30 mickey Exp $ */ +/* $OpenBSD: db_access.h,v 1.3 1996/03/11 11:15:55 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c index a2fc4a78062..165d69fe518 100644 --- a/sys/ddb/db_aout.c +++ b/sys/ddb/db_aout.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_aout.c,v 1.3 1996/02/20 13:35:31 mickey Exp $ */ +/* $OpenBSD: db_aout.c,v 1.4 1996/03/11 11:15:57 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ #include <sys/types.h> diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index 45de1e72b26..6219806c6b4 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_break.c,v 1.2 1996/02/20 13:35:32 mickey Exp $ */ +/* $OpenBSD: db_break.c,v 1.3 1996/03/11 11:15:58 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 @@ -324,7 +324,7 @@ db_map_current(map) return ((map == NULL) || (map == kernel_map) || (((thread = current_thread()) != NULL) && - (map == thread->task->map))); + (map == thread->proc->map))); #else return (1); #endif @@ -346,7 +346,7 @@ db_map_addr(addr) if ((VM_MIN_ADDRESS <= addr) && (addr < VM_MAX_ADDRESS) && ((thread = current_thread()) != NULL)) - return thread->task->map; + return thread->proc->map; else #endif return kernel_map; diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index afd3b9d2949..25a4de55d1b 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_break.h,v 1.2 1996/02/20 13:35:33 mickey Exp $ */ +/* $OpenBSD: db_break.h,v 1.3 1996/03/11 11:16:00 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index b1d11187a0d..4eca40e357b 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_command.c,v 1.3 1996/02/20 13:35:33 mickey Exp $ */ +/* $OpenBSD: db_command.c,v 1.4 1996/03/11 11:16:01 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,14 +22,15 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ /* * Command dispatcher. */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/proc.h> #include <sys/reboot.h> diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index b321b03feec..a98028acd65 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_command.h,v 1.2 1996/02/20 13:35:34 mickey Exp $ */ +/* $OpenBSD: db_command.h,v 1.3 1996/03/11 11:16:03 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 4ed910b2ce7..4f673d9141c 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_examine.c,v 1.2 1996/02/20 13:35:35 mickey Exp $ */ +/* $OpenBSD: db_examine.c,v 1.3 1996/03/11 11:16:05 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c index 90dd30ca696..9aead4c2b02 100644 --- a/sys/ddb/db_expr.c +++ b/sys/ddb/db_expr.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_expr.c,v 1.2 1996/02/20 13:35:35 mickey Exp $ */ +/* $OpenBSD: db_expr.c,v 1.3 1996/03/11 11:16:06 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index 6254cedc949..9c19f79e6d8 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,5 @@ -/* $OpenBSD: db_extern.h,v 1.1 1996/02/20 13:35:36 mickey Exp $ */ +/* $OpenBSD: db_extern.h,v 1.2 1996/03/11 11:16:07 mickey Exp $ */ +/* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* * Copyright (c) 1995 Christos Zoulas. All rights reserved. diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index fd9e51e9ced..55c01a0f917 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_input.c,v 1.2 1996/02/20 13:35:37 mickey Exp $ */ +/* $OpenBSD: db_input.c,v 1.3 1996/03/11 11:16:09 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 @@ -34,6 +34,7 @@ #include <machine/db_machdep.h> +#include <ddb/db_var.h> #include <ddb/db_output.h> #include <ddb/db_command.h> #include <ddb/db_sym.h> @@ -54,6 +55,14 @@ char * db_lbuf_start; /* start of input line buffer */ char * db_lbuf_end; /* end of input line buffer */ char * db_lc; /* current character */ char * db_le; /* one past last character */ +#if DB_HISTORY_SIZE != 0 +char db_history[DB_HISTORY_SIZE]; /* start of history buffer */ +int db_history_size = DB_HISTORY_SIZE;/* size of history buffer */ +char * db_history_curr = db_history; /* start of current line */ +char * db_history_last = db_history; /* start of last line */ +char * db_history_prev = (char *) 0; /* start of previous line */ +#endif + #define CTRL(c) ((c) & 0x1f) #define isspace(c) ((c) == ' ' || (c) == '\t') @@ -105,6 +114,31 @@ db_delete(n, bwd) db_le -= n; } +void +db_delete_line(void) +{ + db_delete(db_le - db_lc, DEL_FWD); + db_delete(db_lc - db_lbuf_start, DEL_BWD); + db_le = db_lc = db_lbuf_start; +} + +#if DB_HISTORY_SIZE != 0 +#define INC_DB_CURR() \ + do { \ + db_history_curr++; \ + if (db_history_curr > \ + db_history + db_history_size - 1) \ + db_history_curr = db_history; \ + } while (0) +#define DEC_DB_CURR() \ + do { \ + db_history_curr--; \ + if (db_history_curr < db_history) \ + db_history_curr = db_history + \ + db_history_size - 1; \ + } while (0) +#endif + /* returns TRUE at end-of-line */ int db_inputchar(c) @@ -155,6 +189,10 @@ db_inputchar(c) if (db_lc < db_le) db_delete(db_le - db_lc, DEL_FWD); break; + case CTRL('u'): + /* delete line */ + db_delete_line(); + break; case CTRL('t'): /* twiddle last 2 characters */ if (db_lc >= db_lbuf_start + 2) { @@ -167,17 +205,106 @@ db_inputchar(c) cnputc(db_lc[-1]); } break; +#if DB_HISTORY_SIZE != 0 + case CTRL('p'): + DEC_DB_CURR(); + while (db_history_curr != db_history_last) { + DEC_DB_CURR(); + if (*db_history_curr == '\0') + break; + } + db_delete_line(); + if (db_history_curr == db_history_last) { + INC_DB_CURR(); + db_le = db_lc = db_lbuf_start; + } else { + register char *p; + INC_DB_CURR(); + for (p = db_history_curr, db_le = db_lbuf_start;*p; ) { + *db_le++ = *p++; + if (p == db_history + db_history_size) + p = db_history; + } + db_lc = db_le; + } + db_putstring(db_lbuf_start, db_le - db_lbuf_start); + break; + case CTRL('n'): + while (db_history_curr != db_history_last) { + if (*db_history_curr == '\0') + break; + INC_DB_CURR(); + } + if (db_history_curr != db_history_last) { + INC_DB_CURR(); + db_delete_line(); + if (db_history_curr != db_history_last) { + register char *p; + for (p = db_history_curr, + db_le = db_lbuf_start; *p;) { + *db_le++ = *p++; + if (p == db_history + db_history_size) + p = db_history; + } + db_lc = db_le; + } + db_putstring(db_lbuf_start, db_le - db_lbuf_start); + } + break; +#endif case CTRL('r'): db_putstring("^R\n", 3); if (db_le > db_lbuf_start) { - db_putstring(db_lbuf_start, db_le - db_lbuf_start); - db_putnchars(BACKUP, db_le - db_lc); + db_putstring(db_lbuf_start, db_le - db_lbuf_start); + db_putnchars(BACKUP, db_le - db_lc); } break; case '\n': case '\r': +#if DB_HISTORY_SIZE != 0 + /* + * Check whether current line is the same + * as previous saved line. If it is, don`t + * save it. + */ + if (db_history_curr == db_history_prev) { + register char *pp, *pc; + + /* + * Is it the same? + */ + for (pp = db_history_prev, pc = db_lbuf_start; + pc != db_le && *pp; ) { + if (*pp != *pc) + break; + if (++pp == db_history + db_history_size) + pp = db_history; + pc++; + } + if (!*pp && pc == db_le) { + /* + * Repeated previous line. Don`t save. + */ + db_history_curr = db_history_last; + *db_le++ = c; + return TRUE; + } + } + if (db_le != db_lbuf_start) { + register char *p; + db_history_prev = db_history_last; + for (p = db_lbuf_start; p != db_le; p++) { + *db_history_last++ = *p; + if (db_history_last == + db_history + db_history_size) + db_history_last = db_history; + } + *db_history_last++ = '\0'; + } + db_history_curr = db_history_last; +#endif *db_le++ = c; - return (1); + return TRUE; default: if (db_le == db_lbuf_end) { cnputc('\007'); @@ -195,7 +322,7 @@ db_inputchar(c) } break; } - return (0); + return FALSE; } int @@ -206,7 +333,7 @@ db_readline(lstart, lsize) db_force_whitespace(); /* synch output position */ db_lbuf_start = lstart; - db_lbuf_end = lstart + lsize; + db_lbuf_end = lstart + lsize - 1; db_lc = lstart; db_le = lstart; @@ -220,7 +347,7 @@ db_readline(lstart, lsize) } void -db_check_interrupt() +db_check_interrupt(void) { register int c; @@ -236,10 +363,9 @@ db_check_interrupt() case CTRL('s'): do { c = cnmaygetc(); - if (c == CTRL('c')) { - db_error((char *)0); + if (c == CTRL('c')) + db_error(NULL); /*NOTREACHED*/ - } } while (c != CTRL('q')); break; diff --git a/sys/ddb/db_interface.h b/sys/ddb/db_interface.h index 6f1642934ac..e8026df69d4 100644 --- a/sys/ddb/db_interface.h +++ b/sys/ddb/db_interface.h @@ -1,4 +1,5 @@ -/* $OpenBSD: db_interface.h,v 1.1 1996/02/20 13:35:37 mickey Exp $ */ +/* $OpenBSD: db_interface.h,v 1.2 1996/03/11 11:16:10 mickey Exp $ */ +/* $NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp & */ /* * Copyright (c) 1995 Christos Zoulas. All rights reserved. diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index 8eaa29c7123..957e348d1b1 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_lex.c,v 1.2 1996/02/20 13:35:38 mickey Exp $ */ +/* $OpenBSD: db_lex.c,v 1.3 1996/03/11 11:16:12 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 @@ -33,6 +33,7 @@ * Lexical analyzer. */ #include <sys/param.h> +#include <sys/proc.h> #include <machine/db_machdep.h> diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h index 611c35949f8..443db5ac2d8 100644 --- a/sys/ddb/db_lex.h +++ b/sys/ddb/db_lex.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_lex.h,v 1.2 1996/02/20 13:35:39 mickey Exp $ */ +/* $OpenBSD: db_lex.h,v 1.3 1996/03/11 11:16:13 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 0bc996c4f9e..f9d5d940c24 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_output.c,v 1.3 1996/02/20 13:35:39 mickey Exp $ */ +/* $OpenBSD: db_output.c,v 1.4 1996/03/11 11:16:15 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,14 +22,15 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ /* * Printf and character output for debugger. */ #include <sys/param.h> +#include <sys/proc.h> #include <machine/stdarg.h> diff --git a/sys/ddb/db_output.h b/sys/ddb/db_output.h index 3ae835735dd..7385a3ce1d9 100644 --- a/sys/ddb/db_output.h +++ b/sys/ddb/db_output.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_output.h,v 1.3 1996/02/20 13:35:40 mickey Exp $ */ +/* $OpenBSD: db_output.h,v 1.4 1996/03/11 11:16:17 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 8/90 diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index bb9c579d4d0..ad89a8503b3 100644 --- a/sys/ddb/db_print.c +++ b/sys/ddb/db_print.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_print.c,v 1.2 1996/02/20 13:35:40 mickey Exp $ */ +/* $OpenBSD: db_print.c,v 1.3 1996/03/11 11:16:18 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 31450884afc..97954824a11 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_run.c,v 1.2 1996/02/20 13:35:41 mickey Exp $ */ +/* $OpenBSD: db_run.c,v 1.3 1996/03/11 11:16:20 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_run.h b/sys/ddb/db_run.h index 8c4d8fae1e8..7cfba079923 100644 --- a/sys/ddb/db_run.h +++ b/sys/ddb/db_run.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_run.h,v 1.2 1996/02/20 13:35:42 mickey Exp $ */ +/* $OpenBSD: db_run.h,v 1.3 1996/03/11 11:16:21 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index ef2d473cec2..b2abad54a7d 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_sym.c,v 1.4 1996/02/20 13:35:42 mickey Exp $ */ +/* $OpenBSD: db_sym.c,v 1.5 1996/03/11 11:16:23 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ #include <sys/param.h> diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h index 41dd4f51ba8..cd2321ffe6c 100644 --- a/sys/ddb/db_sym.h +++ b/sys/ddb/db_sym.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_sym.h,v 1.2 1996/02/20 13:35:43 mickey Exp $ */ +/* $OpenBSD: db_sym.h,v 1.3 1996/03/11 11:16:25 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: Alessandro Forin, Carnegie Mellon University * Date: 8/90 diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c index 7cfca6eb20f..92a8c23e85c 100644 --- a/sys/ddb/db_trap.c +++ b/sys/ddb/db_trap.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_trap.c,v 1.2 1996/02/20 13:35:44 mickey Exp $ */ +/* $OpenBSD: db_trap.c,v 1.3 1996/03/11 11:16:26 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_var.h b/sys/ddb/db_var.h new file mode 100644 index 00000000000..a51c7dff108 --- /dev/null +++ b/sys/ddb/db_var.h @@ -0,0 +1,43 @@ +/* $OpenBSD: db_var.h,v 1.1 1996/03/11 11:16:27 mickey Exp $ */ + +/* + * Copyright (c) 1996 Michael Shalayeff. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Michael Shalayeff. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Different parameters/structures/functions + */ + +#ifndef _DDB_DB_VAR_H_ +#define _DDB_DB_VAR_H_ + +#ifndef DB_HISTORY_SIZE +#define DB_HISTORY_SIZE 4000 +#endif + +#endif /* _DDB_DB_VAR_H_ */ diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c index 24a077a9145..c59af61c14f 100644 --- a/sys/ddb/db_variables.c +++ b/sys/ddb/db_variables.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_variables.c,v 1.2 1996/02/20 13:35:45 mickey Exp $ */ +/* $OpenBSD: db_variables.c,v 1.3 1996/03/11 11:16:28 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ #include <sys/param.h> diff --git a/sys/ddb/db_variables.h b/sys/ddb/db_variables.h index 984882ed836..c0e71eb1d26 100644 --- a/sys/ddb/db_variables.h +++ b/sys/ddb/db_variables.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_variables.h,v 1.2 1996/02/20 13:35:46 mickey Exp $ */ +/* $OpenBSD: db_variables.h,v 1.3 1996/03/11 11:16:30 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c index d7e5fd76a14..e6021c9f0b1 100644 --- a/sys/ddb/db_watch.c +++ b/sys/ddb/db_watch.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_watch.c,v 1.2 1996/02/20 13:35:46 mickey Exp $ */ +/* $OpenBSD: db_watch.c,v 1.3 1996/03/11 11:16:31 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: Richard P. Draves, Carnegie Mellon University * Date: 10/90 diff --git a/sys/ddb/db_watch.h b/sys/ddb/db_watch.h index 088ea2f5215..dbc407d7aa3 100644 --- a/sys/ddb/db_watch.h +++ b/sys/ddb/db_watch.h @@ -1,8 +1,8 @@ -/* $OpenBSD: db_watch.h,v 1.2 1996/02/20 13:35:47 mickey Exp $ */ +/* $OpenBSD: db_watch.h,v 1.3 1996/03/11 11:16:32 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 10/90 diff --git a/sys/ddb/db_write_cmd.c b/sys/ddb/db_write_cmd.c index ed103f3006a..01c00d16214 100644 --- a/sys/ddb/db_write_cmd.c +++ b/sys/ddb/db_write_cmd.c @@ -1,8 +1,8 @@ -/* $OpenBSD: db_write_cmd.c,v 1.2 1996/02/20 13:35:48 mickey Exp $ */ +/* $OpenBSD: db_write_cmd.c,v 1.3 1996/03/11 11:16:33 mickey Exp $ */ /* * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University + * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +22,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 |