Fix build for archs w/o DB_MACHINE_COMMANDS.

Patch from KIYOHARA Takashi.
This commit is contained in:
martin 2007-09-23 18:59:23 +00:00
parent 66eb3cf2ac
commit ad21af77ef
1 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_command.c,v 1.99 2007/09/23 10:26:06 martin Exp $ */ /* $NetBSD: db_command.c,v 1.100 2007/09/23 18:59:23 martin Exp $ */
/* /*
* Mach Operating System * Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University * Copyright (c) 1991,1990 Carnegie Mellon University
@ -65,7 +65,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.99 2007/09/23 10:26:06 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.100 2007/09/23 18:59:23 martin Exp $");
#include "opt_ddb.h" #include "opt_ddb.h"
#include "opt_kgdb.h" #include "opt_kgdb.h"
@ -489,9 +489,11 @@ db_register_tbl(uint8_t type, const struct db_command *cmd_tbl)
list=&db_show_cmd_list; list=&db_show_cmd_list;
break; break;
#ifdef DB_MACHINE_COMMANDS
case DDB_MACH_CMD: case DDB_MACH_CMD:
list=&db_mach_cmd_list; list=&db_mach_cmd_list;
break; break;
#endif
default: default:
return (ENOENT); return (ENOENT);
@ -537,9 +539,11 @@ db_unregister_tbl(uint8_t type,const struct db_command *cmd_tbl)
list=&db_show_cmd_list; list=&db_show_cmd_list;
break; break;
#ifdef DB_MACHINE_COMMANDS
case DDB_MACH_CMD: case DDB_MACH_CMD:
list=&db_mach_cmd_list; list=&db_mach_cmd_list;
break; break;
#endif
default: default:
return (EINVAL); return (EINVAL);
@ -834,6 +838,7 @@ db_command(const struct db_command **last_cmdp)
return; return;
} }
break; break;
#ifdef DB_MACHINE_COMMANDS
case DDB_MACH_CMD: case DDB_MACH_CMD:
list=&db_mach_cmd_list; list=&db_mach_cmd_list;
/* need to read machine subcommand if /* need to read machine subcommand if
@ -848,6 +853,7 @@ db_command(const struct db_command **last_cmdp)
return; return;
} }
break; break;
#endif
default: default:
db_printf("No such command\n"); db_printf("No such command\n");
db_flush_lex(); db_flush_lex();
@ -996,6 +1002,7 @@ db_help_print_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
} }
break; break;
#ifdef DB_MACHINE_COMMANDS
case DDB_MACH_CMD: case DDB_MACH_CMD:
list=&db_mach_cmd_list; list=&db_mach_cmd_list;
/* read machine subcommand */ /* read machine subcommand */
@ -1008,6 +1015,7 @@ db_help_print_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
return; return;
} }
break; break;
#endif
default: default:
db_printf("No such command\n"); db_printf("No such command\n");
db_flush_lex(); db_flush_lex();