Source
x
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/******************************************************************************
*
* Module Name: dsdebug - Parser/Interpreter interface - debugging
*
* Copyright (C) 2000 - 2019, Intel Corp.
*
*****************************************************************************/
ACPI_MODULE_NAME("dsdebug")
/* Local prototypes */
static void
acpi_ds_print_node_pathname(struct acpi_namespace_node *node,
const char *message);
/*******************************************************************************
*
* FUNCTION: acpi_ds_print_node_pathname
*
* PARAMETERS: node - Object
* message - Prefix message
*
* DESCRIPTION: Print an object's full namespace pathname
* Manages allocation/freeing of a pathname buffer
*
******************************************************************************/
static void
acpi_ds_print_node_pathname(struct acpi_namespace_node *node,
const char *message)
{
struct acpi_buffer buffer;
acpi_status status;
ACPI_FUNCTION_TRACE(ds_print_node_pathname);
if (!node) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_DISPATCH, "[NULL NAME]"));
return_VOID;
}
/* Convert handle to full pathname and print it (with supplied message) */
buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
status = acpi_ns_handle_to_pathname(node, &buffer, TRUE);
if (ACPI_SUCCESS(status)) {
if (message) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_DISPATCH, "%s ",
message));
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_DISPATCH, "[%s] (Node %p)",
(char *)buffer.pointer, node));
ACPI_FREE(buffer.pointer);
}
return_VOID;
}
/*******************************************************************************
*
* FUNCTION: acpi_ds_dump_method_stack
*
* PARAMETERS: status - Method execution status
* walk_state - Current state of the parse tree walk
* op - Executing parse op
*
* RETURN: None
*
* DESCRIPTION: Called when a method has been aborted because of an error.
* Dumps the method execution stack.
*
******************************************************************************/
void
acpi_ds_dump_method_stack(acpi_status status,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op)
{