1 /******************************************************************************
3 * Name: acdebug.h - ACPI/AML debugger
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2005, R. Byron Moore
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
48 #define ACPI_DEBUG_BUFFER_SIZE 4196
52 char *name; /* Command Name */
53 u8 min_args; /* Minimum arguments required */
59 char *name; /* Argument Name */
63 #define PARAM_LIST(pl) pl
64 #define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
65 #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
66 acpi_os_printf PARAM_LIST(fp);}
68 #define EX_NO_SINGLE_STEP 1
69 #define EX_SINGLE_STEP 2
73 * dbxface - external debugger interfaces
85 struct acpi_walk_state *walk_state,
86 union acpi_parse_object *op,
91 * dbcmds - debug commands and output routines
94 acpi_db_disassemble_method (
98 acpi_db_display_table_info (
102 acpi_db_unload_acpi_table (
107 acpi_db_set_method_breakpoint (
109 struct acpi_walk_state *walk_state,
110 union acpi_parse_object *op);
113 acpi_db_set_method_call_breakpoint (
114 union acpi_parse_object *op);
117 acpi_db_get_bus_info (
121 acpi_db_disassemble_aml (
123 union acpi_parse_object *op);
126 acpi_db_dump_namespace (
131 acpi_db_dump_namespace_by_owner (
136 acpi_db_send_notify (
141 acpi_db_set_method_data (
147 acpi_db_display_objects (
149 char *display_count_arg);
152 acpi_db_find_name_in_namespace (
164 acpi_db_find_references (
168 acpi_db_display_locks (
172 acpi_db_display_resources (
176 acpi_db_display_gpes (
180 acpi_db_check_integrity (
184 acpi_db_generate_gpe (
190 * dbdisply - debug display commands
193 acpi_db_display_method_info (
194 union acpi_parse_object *op);
197 acpi_db_decode_and_display_object (
202 acpi_db_display_result_object (
203 union acpi_operand_object *obj_desc,
204 struct acpi_walk_state *walk_state);
207 acpi_db_display_all_methods (
208 char *display_count_arg);
211 acpi_db_display_arguments (
215 acpi_db_display_locals (
219 acpi_db_display_results (
223 acpi_db_display_calling_tree (
227 acpi_db_display_object_type (
231 acpi_db_display_argument_object (
232 union acpi_operand_object *obj_desc,
233 struct acpi_walk_state *walk_state);
237 * dbexec - debugger control method execution
246 acpi_db_create_execution_threads (
247 char *num_threads_arg,
249 char *method_name_arg);
253 * dbfileio - Debugger file I/O commands
256 acpi_db_match_argument (
258 struct argument_info *arguments);
261 acpi_db_close_debug_file (
265 acpi_db_open_debug_file (
269 acpi_db_load_acpi_table (
273 acpi_db_get_table_from_file (
275 struct acpi_table_header **table);
278 acpi_db_read_table_from_file (
280 struct acpi_table_header **table);
284 * dbhistry - debugger HISTORY command
287 acpi_db_add_to_history (
291 acpi_db_display_history (
295 acpi_db_get_from_history (
296 char *command_num_arg);
300 * dbinput - user front-end to the AML debugger
303 acpi_db_command_dispatch (
305 struct acpi_walk_state *walk_state,
306 union acpi_parse_object *op);
308 void ACPI_SYSTEM_XFACE
309 acpi_db_execute_thread (
314 * dbstats - Generation and display of ACPI table statistics
317 acpi_db_generate_statistics (
318 union acpi_parse_object *root,
322 acpi_db_display_statistics (
327 * dbutils - AML debugger utilities
330 acpi_db_set_output_destination (
334 acpi_db_dump_external_object (
335 union acpi_object *obj_desc,
339 acpi_db_prep_namestring (
342 struct acpi_namespace_node *
343 acpi_db_local_ns_lookup (
346 #endif /* __ACDEBUG_H__ */