/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
*
- * @APPLE_LICENSE_HEADER_START@
- *
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* Please see the License for the specific language governing rights and
* limitations under the License.
*
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/*
* @OSF_COPYRIGHT@
/*
* Command dispatcher.
*/
-#include <cpus.h>
#include <norma_vm.h>
#ifdef AT386
#include <norma_scsi.h>
char *last_modifp, /* IN_OUT */
struct db_command *cmd_table);
-
-
/*
* Search for command prefix.
*/
extern void db_system_stats(void);
struct db_command db_show_all_cmds[] = {
-#if USLOCK_DEBUG
- { "slocks", (db_func) db_show_all_slocks, 0, 0 },
-#endif /* USLOCK_DEBUG */
{ "acts", db_show_all_acts, 0, 0 },
{ "spaces", db_show_all_spaces, 0, 0 },
{ "tasks", db_show_all_acts, 0, 0 },
{ "kmsg", (db_func) ipc_kmsg_print, 0, 0 },
{ "msg", (db_func) ipc_msg_print, 0, 0 },
{ "ipc_port", db_show_port_id, 0, 0 },
- { "lock", (db_func)db_show_one_lock, 0, 0 },
#if NORMA_VM
{ "xmm_obj", (db_func) xmm_obj_print, 0, 0 },
{ "xmm_reply", (db_func) xmm_reply_print, 0, 0 },
{ "space", db_show_one_space, 0, 0 },
{ "system", (db_func) db_system_stats, 0, 0 },
{ "zone", db_show_one_zone, 0, 0 },
- { "simple_lock", db_show_one_simple_lock, 0, 0 },
+ { "lock", (db_func)db_show_one_lock, 0, 0 },
+ { "mutex_lock", (db_func)db_show_one_mutex, 0, 0 },
+ { "simple_lock", (db_func)db_show_one_simple_lock, 0, 0 },
{ "thread_log", (db_func)db_show_thread_log, 0, 0 },
{ "shuttle", db_show_shuttle, 0, 0 },
{ (char *)0, }
};
-#if NCPUS > 1
#define db_switch_cpu kdb_on
extern void db_switch_cpu(int);
-#endif /* NCPUS > 1 */
struct db_command db_command_table[] = {
#if DB_MACHINE_COMMANDS
{ "macro", (db_func) db_def_macro_cmd, CS_OWN, 0 },
{ "dmacro", (db_func) db_del_macro_cmd, CS_OWN, 0 },
{ "show", 0, 0, db_show_cmds },
-#if NCPUS > 1
{ "cpu", (db_func) db_switch_cpu, 0, 0 },
-#endif /* NCPUS > 1 */
+ { "dr", db_display_real, CS_MORE|CS_SET_DOT, 0 },
+ { "di", db_display_iokit, CS_MORE, 0 },
+ { "dk", db_display_kmod, CS_MORE, 0 },
+
{ "reboot", (db_func) db_reboot, 0, 0 },
-#if defined(__ppc__)
+#if !defined(__ppc__)
+ { "pm", db_pmgr, CS_MORE, 0 },
+ { "na", db_nap, CS_MORE, 0 },
+ { "ms", db_msr, CS_MORE, 0 },
+ { "cp", db_cpuid, CS_MORE, 0 },
+ { "da", db_apic, CS_MORE, 0 },
+ { "ts", db_test, CS_MORE, 0 },
+ { "dn", db_intcnt, CS_MORE, 0 },
+ { "hp", db_hpet, CS_MORE, 0 },
+ { "cf", db_cfg, CS_MORE, 0 },
+ { "dt", db_dtimers, CS_MORE, 0 },
+#endif
+#if defined(__ppc__)
{ "lt", db_low_trace, CS_MORE|CS_SET_DOT, 0 },
{ "dl", db_display_long, CS_MORE|CS_SET_DOT, 0 },
{ "dc", db_display_char, CS_MORE|CS_SET_DOT, 0 },
- { "dr", db_display_real, CS_MORE|CS_SET_DOT, 0 },
{ "dv", db_display_virtual, CS_MORE|CS_SET_DOT, 0 },
{ "dm", db_display_mappings, CS_MORE|CS_SET_DOT, 0 },
{ "dh", db_display_hash, CS_MORE|CS_SET_DOT, 0 },
{ "dp", db_display_pmap, CS_MORE, 0 },
- { "di", db_display_iokit, CS_MORE, 0 },
{ "ds", db_display_save, CS_MORE|CS_SET_DOT, 0 },
{ "dx", db_display_xregs, CS_MORE|CS_SET_DOT, 0 },
- { "dk", db_display_kmod, CS_MORE, 0 },
{ "gs", db_gsnoop, CS_MORE, 0 },
{ "cm", db_check_mappings, CS_MORE, 0 },
{ "cp", db_check_pmaps, CS_MORE, 0 },
boolean_t
db_exec_cmd_nest(
- char *cmd,
- int size)
+ const char *cmd,
+ int size)
{
struct db_lex_context lex_context;
}
void
-db_error(char *s)
+db_error(const char *s)
{
extern int db_macro_level;
boolean_t
db_option(
- char *modif,
- int option)
+ const char *modif,
+ int option)
{
register char *p;