-/* $OpenBSD: db_interface.c,v 1.26 2019/11/07 14:44:52 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.27 2022/04/12 19:44:31 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.8 1999/10/12 17:08:57 jdolecek Exp $ */
/*
void
db_machine_init()
{
- db_machine_commands_install(db_machine_command_table);
}
-/* $OpenBSD: db_interface.c,v 1.37 2021/08/31 14:37:49 mlarkin Exp $ */
+/* $OpenBSD: db_interface.c,v 1.38 2022/04/12 19:44:31 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
{
#ifdef MULTIPROCESSOR
int i;
-#endif
- db_machine_commands_install(db_machine_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < MAXCPUS; i++) {
if (cpu_info[i] != NULL)
cpu_info[i]->ci_ddb_paused = CI_DDB_RUNNING;
-/* $OpenBSD: db_interface.c,v 1.17 2021/03/25 04:12:00 jsg Exp $ */
+/* $OpenBSD: db_interface.c,v 1.18 2022/04/12 19:44:31 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.34 2003/10/26 23:11:15 chris Exp $ */
/*
*/
db_uh.uh_handler = db_trapper;
install_coproc_handler_static(0, &db_uh);
-
- db_machine_commands_install(db_machine_command_table);
}
u_int
-/* $OpenBSD: db_interface.c,v 1.10 2021/05/30 15:05:32 visa Exp $ */
+/* $OpenBSD: db_interface.c,v 1.11 2022/04/12 19:44:31 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.34 2003/10/26 23:11:15 chris Exp $ */
/*
{
#ifdef MULTIPROCESSOR
int i;
-#endif
- db_machine_commands_install(db_machine_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < MAXCPUS; i++) {
if (cpu_info[i] != NULL)
cpu_info[i]->ci_ddb_paused = CI_DDB_RUNNING;
-/* $OpenBSD: db_interface.c,v 1.42 2019/11/06 07:34:35 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.43 2022/04/12 19:44:31 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.22 1996/05/03 19:42:00 christos Exp $ */
/*
{
#ifdef MULTIPROCESSOR
int i;
-#endif /* MULTIPROCESSOR */
- db_machine_commands_install(db_machine_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < MAXCPUS; i++) {
if (cpu_info[i] != NULL)
cpu_info[i]->ci_ddb_paused = CI_DDB_RUNNING;
-/* $OpenBSD: db_interface.c,v 1.26 2021/03/11 11:16:58 jsg Exp $ */
+/* $OpenBSD: db_interface.c,v 1.27 2022/04/12 19:44:31 naddy Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
/* COMMAND TABLE / INIT */
/************************/
-struct db_command db_machine_cmds[] = {
+struct db_command db_machine_command_table[] = {
#ifdef MULTIPROCESSOR
{ "ddbcpu", m88k_db_cpu_cmd, 0, NULL },
#endif
void
db_machine_init()
{
- db_machine_commands_install(db_machine_cmds);
#ifdef MULTIPROCESSOR
__mp_lock_init(&ddb_mp_lock);
#endif
-/* $OpenBSD: db_machdep.c,v 1.57 2021/05/30 15:05:32 visa Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.58 2022/04/12 19:44:32 naddy Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
}
-struct db_command mips_db_command_table[] = {
+struct db_command db_machine_command_table[] = {
{ "tlb", db_dump_tlb_cmd, 0, NULL },
{ "trap", db_trap_trace_cmd, 0, NULL },
#ifdef MULTIPROCESSOR
extern char *ssym;
#ifdef MULTIPROCESSOR
int i;
-#endif
- db_machine_commands_install(mips_db_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < ncpus; i++) {
get_cpu_info(i)->ci_ddb = CI_DDB_RUNNING;
}
-/* $OpenBSD: db_interface.c,v 1.8 2022/01/28 18:37:40 gkoehler Exp $ */
+/* $OpenBSD: db_interface.c,v 1.9 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.12 2001/07/22 11:29:46 wiz Exp $ */
/*
{
#ifdef MULTIPROCESSOR
int i;
-#endif
- db_machine_commands_install(db_machine_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < ncpus; i++) {
cpu_info[i].ci_ddb_paused = CI_DDB_RUNNING;
}
-/* $OpenBSD: db_interface.c,v 1.4 2021/05/30 15:05:33 visa Exp $ */
+/* $OpenBSD: db_interface.c,v 1.5 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.12 2001/07/22 11:29:46 wiz Exp $ */
/*
}
}
- db_machine_commands_install(db_machine_command_table);
#ifdef MULTIPROCESSOR
for (i = 0; i < ncpus; i++) {
cpu_info[i].ci_ddb_paused = CI_DDB_RUNNING;
-/* $OpenBSD: db_interface.c,v 1.6 2021/07/11 12:21:52 jasper Exp $ */
+/* $OpenBSD: db_interface.c,v 1.7 2022/04/12 19:44:32 naddy Exp $ */
/*
* Copyright (c) 1996 Scott K. Stevens
{
#ifdef MULTIPROCESSOR
int i;
-#endif
- db_machine_commands_install(db_machine_command_table);
-#ifdef MULTIPROCESSOR
for (i = 0; i < MAXCPUS; i++) {
if (cpu_info[i] != NULL)
cpu_info[i]->ci_ddb_paused = CI_DDB_RUNNING;
-/* $OpenBSD: db_interface.c,v 1.13 2019/11/07 16:08:08 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.14 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.37 2006/09/06 00:11:49 uwe Exp $ */
/*-
void
db_machine_init(void)
{
-
- db_machine_commands_install(db_machine_command_table);
}
void
-/* $OpenBSD: db_interface.c,v 1.56 2021/05/30 15:05:33 visa Exp $ */
+/* $OpenBSD: db_interface.c,v 1.57 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */
/*
void
db_machine_init(void)
{
- db_machine_commands_install(db_machine_command_table);
}
-/* $OpenBSD: db_command.c,v 1.92 2021/11/16 13:53:14 bluhm Exp $ */
+/* $OpenBSD: db_command.c,v 1.93 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
struct db_command db_command_table[] = {
#ifdef DB_MACHINE_COMMANDS
/* this must be the first entry, if it exists */
- { "machine", NULL, 0, NULL},
+ { "machine", NULL, 0, db_machine_command_table },
#endif
{ "kill", db_kill_cmd, 0, NULL },
{ "print", db_print_cmd, 0, NULL },
{ NULL, NULL, 0, NULL }
};
-#ifdef DB_MACHINE_COMMANDS
-
-/* this function should be called to install the machine dependent
- commands. It should be called before the debugger is enabled */
-void
-db_machine_commands_install(struct db_command *ptr)
-{
- db_command_table[0].more = ptr;
-}
-
-#endif
-
struct db_command *db_last_command = NULL;
void
-/* $OpenBSD: db_command.h,v 1.33 2019/11/07 13:16:25 mpi Exp $ */
+/* $OpenBSD: db_command.h,v 1.34 2022/04/12 19:44:32 naddy Exp $ */
/* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */
/*
void db_skip_to_eol(void);
void db_command_loop(void);
void db_command(struct db_command **, struct db_command *);
-void db_machine_commands_install(struct db_command *);
extern vaddr_t db_dot, db_last_addr, db_prev, db_next;
#define CS_SET_DOT 0x100 /* set dot after command */
struct db_command *more; /* another level of command */
};
+
+#ifdef DB_MACHINE_COMMANDS
+extern struct db_command db_machine_command_table[];
+#endif