--- Gnu-Mach/ddb/db_cond.c 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/ddb/db_cond.c 2020/09/02 04:48:23 1.1.1.4 @@ -1,30 +1,29 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * 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 "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ -#include "mach_kdb.h" #if MACH_KDB #include @@ -33,7 +32,11 @@ #include #include #include +#include +#include +#include +#include #define DB_MAX_COND 10 /* maximum conditions to be set */ @@ -45,8 +48,7 @@ struct db_cond { } db_cond[DB_MAX_COND]; void -db_cond_free(bkpt) - db_thread_breakpoint_t bkpt; +db_cond_free(db_thread_breakpoint_t bkpt) { if (bkpt->tb_cond > 0) { db_cond[bkpt->tb_cond-1].c_size = 0; @@ -56,10 +58,9 @@ db_cond_free(bkpt) } boolean_t -db_cond_check(bkpt) - db_thread_breakpoint_t bkpt; +db_cond_check(db_thread_breakpoint_t bkpt) { - register struct db_cond *cp; + struct db_cond *cp; db_expr_t value; int t; jmp_buf_t db_jmpbuf; @@ -102,10 +103,10 @@ db_cond_check(bkpt) void db_cond_print(bkpt) - db_thread_breakpoint_t bkpt; + const db_thread_breakpoint_t bkpt; { - register char *p, *ep; - register struct db_cond *cp; + char *p, *ep; + struct db_cond *cp; if (bkpt->tb_cond <= 0) return; @@ -120,11 +121,11 @@ db_cond_print(bkpt) } void -db_cond_cmd() +db_cond_cmd(void) { - register c; - register struct db_cond *cp; - register char *p; + int c; + struct db_cond *cp; + char *p; db_expr_t value; db_thread_breakpoint_t bkpt; @@ -178,4 +179,4 @@ db_cond_cmd() bkpt->tb_cond = (cp - db_cond) + 1; } -#endif MACH_KDB +#endif /* MACH_KDB */