From: Andy P. <at...@us...> - 2002-04-09 14:19:00
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/kdb In directory usw-pr-cvs1:/tmp/cvs-serv19932/acpi/kdb Added Files: README.txt kdbm_acpi.c Log Message: synch 2.4.15 commit 17 --- NEW FILE --- Using the ACPI debugger with kdb -------------------------------- ACPI CA includes a full-featured debugger, which allows the examination of a running system's ACPI tables, as well as running and stepping through control methods. Configuration ------------- 1) Edit the main acpi Makefile. On the ACPI_CFLAGS line, remove the '#', thus enabling the debugger. 2) Download the latest kdb patch from: ftp://oss.sgi.com/www/projects/kdb/download/ix86/ Follow the instructions at http://oss.sgi.com/projects/kdb/ on how to install the patch and configure KDB. 3) This would probably be a good time to recompile the kernel, and make sure kdb works (Hitting the Pause key should drop you into it. Type "go" to exit it. 4) The kdb <--> ACPI debugger interface is a module. Type "make modules", and it will be built and placed in drivers/acpi/kdb. 5) Change to that directory and type "insmod kdbm_acpi.o". This loads the module we just built. 6) Break back into kdb. If you type help, you should now see "acpi" listed as a command, at the bottom. 7) Type "acpi". You are now in the ACPI debugger. While hosted by kdb, it is wholly separate, and has many ACPI-specific commands. Type "?" or "help" to get a listing of the command categories, and then "help <category>" for a list of commands and their descriptions --- NEW FILE --- /* * kdbm_acpi.c - kdb debugger module interface for ACPI debugger * * Copyright (C) 2000 Andrew Grover * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/types.h> #include <linux/kdb.h> #include <linux/module.h> #include "acpi.h" #include "acdebug.h" extern int acpi_in_debugger; static int kdbm_acpi(int argc, const char **argv, const char **envp, struct pt_regs *regs) { acpi_in_debugger = 1; acpi_db_user_commands(DB_COMMAND_PROMPT, NULL); acpi_in_debugger = 0; return 0; } int init_module(void) { kdb_register("acpi", kdbm_acpi, "", "Enter ACPI debugger", 0); return 0; } void cleanup_module(void) { kdb_unregister("acpi"); } |