📄 cmdebug.c
字号:
/****************************************************************************** * * Module Name: cmdebug - Debug print routines * $Revision: 61 $ * *****************************************************************************//* * Copyright (C) 2000 R. Byron Moore * * 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 "acpi.h"#define _COMPONENT MISCELLANEOUS MODULE_NAME ("cmdebug")/***************************************************************************** * * FUNCTION: Get/Set debug level * * DESCRIPTION: Get or set value of the debug flag * * These are used to allow user's to get/set the debug level * ****************************************************************************/u32get_debug_level (void){ return (acpi_dbg_level);}voidset_debug_level ( u32 new_debug_level){ acpi_dbg_level = new_debug_level;}/***************************************************************************** * * FUNCTION: Function_trace * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * * RETURN: None * * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level * ****************************************************************************/voidfunction_trace ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name){ acpi_gbl_nesting_level++; debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Entered Function: %s\n", acpi_gbl_nesting_level, function_name);}/***************************************************************************** * * FUNCTION: Function_trace_ptr * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * Pointer - Pointer to display * * RETURN: None * * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level * ****************************************************************************/voidfunction_trace_ptr ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name, void *pointer){ acpi_gbl_nesting_level++; debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Entered Function: %s, %p\n", acpi_gbl_nesting_level, function_name, pointer);}/***************************************************************************** * * FUNCTION: Function_trace_str * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * String - Additional string to display * * RETURN: None * * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level * ****************************************************************************/voidfunction_trace_str ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name, NATIVE_CHAR *string){ acpi_gbl_nesting_level++; debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Entered Function: %s, %s\n", acpi_gbl_nesting_level, function_name, string);}/***************************************************************************** * * FUNCTION: Function_trace_u32 * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * Integer - Integer to display * * RETURN: None * * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level * ****************************************************************************/voidfunction_trace_u32 ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name, u32 integer){ acpi_gbl_nesting_level++; debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Entered Function: %s, %lX\n", acpi_gbl_nesting_level, function_name, integer);}/***************************************************************************** * * FUNCTION: Function_exit * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * * RETURN: None * * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level * ****************************************************************************/voidfunction_exit ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name){ debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Exiting Function: %s\n", acpi_gbl_nesting_level, function_name); acpi_gbl_nesting_level--;}/***************************************************************************** * * FUNCTION: Function_status_exit * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * Status - Exit status code * * RETURN: None * * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level. Prints exit status also. * ****************************************************************************/voidfunction_status_exit ( NATIVE_CHAR *module_name, u32 line_number, u32 component_id, NATIVE_CHAR *function_name, ACPI_STATUS status){ debug_print (module_name, line_number, component_id, TRACE_FUNCTIONS, " %2.2ld Exiting Function: %s, %s\n", acpi_gbl_nesting_level, function_name, acpi_cm_format_exception (status)); acpi_gbl_nesting_level--;}/***************************************************************************** * * FUNCTION: Function_value_exit * * PARAMETERS: Module_name - Caller's module name (for error output) * Line_number - Caller's line number (for error output) * Component_id - Caller's component ID (for error output) * Function_name - Name of Caller's function * Value - Value to be printed with exit msg * * RETURN: None * * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is * set in Debug_level. Prints exit value also. * ****************************************************************************/voidfunction_value_exit ( NATIVE_CHAR *module_name,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -