The powerpc and sparc64 MD `reboot' commands should never have existed
since they just duplicated the MI `reset' command. Instead of removing them, make `reboot' an MI alias for `reboot' since this gives a better way of killing the `r' alias for `reset'. Remove the `registers' command that was used to kill the alias. Turn the powerpc and sparc64 MD `halt' command into an MI command. A copy of sparc64/db_interface.c grew in sun4v just after I found the extra reboot commands. It has not been changed, and is now not identical. Duplicated commands come out duplicated in ddb's online help, but cause large problems when used (e.g., on i386's with 2 halt's and an hwatch, typing h doesn' give the expected message about an ambiguous command, but hangs like the halt command or a looping parseri would).
This commit is contained in:
parent
57e72b9534
commit
e4b732cff1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163192
@ -68,6 +68,7 @@ SET_DECLARE(db_show_cmd_set, struct command);
|
||||
|
||||
static db_cmdfcn_t db_fncall;
|
||||
static db_cmdfcn_t db_gdb;
|
||||
static db_cmdfcn_t db_halt;
|
||||
static db_cmdfcn_t db_kill;
|
||||
static db_cmdfcn_t db_reset;
|
||||
static db_cmdfcn_t db_stack_trace;
|
||||
@ -134,7 +135,8 @@ static struct command db_commands[] = {
|
||||
{ "show", 0, 0, &db_show_table },
|
||||
{ "ps", db_ps, 0, 0 },
|
||||
{ "gdb", db_gdb, 0, 0 },
|
||||
{ "registers", db_show_regs, 0, 0 },
|
||||
{ "halt", db_halt, 0, 0 },
|
||||
{ "reboot", db_reset, 0, 0 },
|
||||
{ "reset", db_reset, 0, 0 },
|
||||
{ "kill", db_kill, CS_OWN, 0 },
|
||||
{ "watchdog", db_watchdog, 0, 0 },
|
||||
@ -537,6 +539,13 @@ db_fncall(dummy1, dummy2, dummy3, dummy4)
|
||||
db_printf("= %#lr\n", (long)retval);
|
||||
}
|
||||
|
||||
static void
|
||||
db_halt(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
|
||||
cpu_halt();
|
||||
}
|
||||
|
||||
static void
|
||||
db_kill(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <sys/cons.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/linker_set.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/pcpu.h>
|
||||
#include <sys/proc.h>
|
||||
@ -84,16 +83,3 @@ void
|
||||
db_show_mdpcpu(struct pcpu *pc)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* PowerPC-specific ddb commands:
|
||||
*/
|
||||
DB_COMMAND(reboot, db_reboot)
|
||||
{
|
||||
cpu_reset();
|
||||
}
|
||||
|
||||
DB_COMMAND(halt, db_halt)
|
||||
{
|
||||
cpu_halt();
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include <sys/cons.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/linker_set.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/pcpu.h>
|
||||
#include <sys/proc.h>
|
||||
@ -94,13 +93,3 @@ void
|
||||
db_show_mdpcpu(struct pcpu *pc)
|
||||
{
|
||||
}
|
||||
|
||||
DB_COMMAND(reboot, db_reboot)
|
||||
{
|
||||
cpu_reset();
|
||||
}
|
||||
|
||||
DB_COMMAND(halt, db_halt)
|
||||
{
|
||||
cpu_halt();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user