From fb2ef998af44fb94214f3cf1c0e85d7a4e642fcb Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 10 Aug 2018 14:42:59 -0700 Subject: ACPICA: Debugger: Cleanup interface to the AML disassembler If the disassembler is configured out (such as when the debugger is part of a kernel), these debugger commands are disabled: List Disassemble Further, the Debug (single-step) command is simplified because each line of code cannot be disassembled. Reported-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/dbxface.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers/acpi/acpica/dbxface.c') diff --git a/drivers/acpi/acpica/dbxface.c b/drivers/acpi/acpica/dbxface.c index 4647aa8efecb..f2526726daf6 100644 --- a/drivers/acpi/acpica/dbxface.c +++ b/drivers/acpi/acpica/dbxface.c @@ -10,6 +10,7 @@ #include "amlcode.h" #include "acdebug.h" #include "acinterp.h" +#include "acparser.h" #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME("dbxface") @@ -262,10 +263,17 @@ acpi_db_single_step(struct acpi_walk_state *walk_state, } } - /* Now we can display it */ + /* Now we can disassemble and display it */ #ifdef ACPI_DISASSEMBLER acpi_dm_disassemble(walk_state, display_op, ACPI_UINT32_MAX); +#else + /* + * The AML Disassembler is not configured - at least we can + * display the opcode value and name + */ + acpi_os_printf("AML Opcode: %4.4X %s\n", op->common.aml_opcode, + acpi_ps_get_opcode_name(op->common.aml_opcode)); #endif if ((op->common.aml_opcode == AML_IF_OP) || -- cgit