Disassembler: Add option (-vt) to also dump binary table data in hex.

Optionally dump the binary table data of an AML table (DSDT/SSDT)
after the normal disassembly of the table.
This commit is contained in:
Robert Moore 2012-10-11 15:00:00 -07:00
parent 9f0a65f188
commit ff56b2ded9
3 changed files with 19 additions and 0 deletions

View File

@ -602,7 +602,14 @@ AdAmlDisassemble (
if (AcpiGbl_DbOpt_disasm)
{
/* This is the real disassembly */
AdDisplayTables (Filename, Table);
/* Dump hex table if requested (-vt) */
AcpiDmDumpDataTable (Table);
fprintf (stderr, "Disassembly completed\n");
fprintf (stderr, "ASL Output: %s - %u bytes\n",
DisasmFilename, AdGetFileSize (File));

View File

@ -487,6 +487,17 @@ AcpiDmDumpDataTable (
if (AcpiUtIsAmlTable (Table))
{
if (Gbl_VerboseTemplates)
{
/* Dump the raw table data */
Length = Table->Length;
AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
AcpiUtDumpBuffer2 (ACPI_CAST_PTR (UINT8, Table), Length, DB_BYTE_DISPLAY);
AcpiOsPrintf (" */\n");
}
return;
}

View File

@ -210,6 +210,7 @@ Options (
ACPI_OPTION ("-vo", "Enable optimization comments");
ACPI_OPTION ("-vr", "Disable remarks");
ACPI_OPTION ("-vs", "Disable signon");
ACPI_OPTION ("-vt", "Disassembler: Dump raw binary table data in hex format");
ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level");
ACPI_OPTION ("-we", "Report warnings as errors");