1/* 2 * kdbm_acpi.c - kdb debugger module interface for ACPI debugger 3 * 4 * Copyright (C) 2000 Andrew Grover 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21#include <linux/types.h> 22#include <linux/kdb.h> 23#include <linux/module.h> 24 25#include "acpi.h" 26#include "acdebug.h" 27 28extern int acpi_in_debugger; 29 30static int 31kdbm_acpi(int argc, const char **argv, const char **envp, struct pt_regs *regs) 32{ 33 acpi_in_debugger = 1; 34 35 acpi_db_user_commands(DB_COMMAND_PROMPT, NULL); 36 37 acpi_in_debugger = 0; 38 39 return 0; 40} 41 42int 43init_module(void) 44{ 45 kdb_register("acpi", kdbm_acpi, "", "Enter ACPI debugger", 0); 46 47 return 0; 48} 49 50void 51cleanup_module(void) 52{ 53 kdb_unregister("acpi"); 54} 55