Initial implementation of -e disassembler flag, to include additional table for external symbol resolution - requires further testing and investigation

This commit is contained in:
rmoore1 2006-07-07 20:05:14 +00:00
parent 84ad7c0d15
commit d16f19f0c5
2 changed files with 22 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: adisasm - Application-level disassembler routines
* $Revision: 1.100 $
* $Revision: 1.101 $
*
*****************************************************************************/
@ -333,6 +333,8 @@ AdMethodExternalCount (
*
*****************************************************************************/
extern char *Gbl_ExternalFilename;
ACPI_STATUS
AdAmlDisassemble (
BOOLEAN OutToFile,
@ -345,6 +347,7 @@ AdAmlDisassemble (
char *DisasmFilename = NULL;
FILE *File = NULL;
ACPI_TABLE_HEADER *Table;
ACPI_TABLE_HEADER *ExternalTable;
/*
@ -358,6 +361,15 @@ AdAmlDisassemble (
{
return Status;
}
if (Gbl_ExternalFilename)
{
Status = AcpiDbGetTableFromFile (Gbl_ExternalFilename, &ExternalTable);
if (ACPI_FAILURE (Status))
{
return Status;
}
}
}
else
{
@ -374,7 +386,7 @@ AdAmlDisassemble (
return AE_OK;
}
/* Obtained the local tables, just disassmeble the DSDT */
/* Obtained the local tables, just disassemble the DSDT */
Table = AcpiGbl_DSDT;
AcpiOsPrintf ("\nDisassembly of DSDT\n");

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslmain - compiler main and utilities
* $Revision: 1.91 $
* $Revision: 1.92 $
*
*****************************************************************************/
@ -213,6 +213,7 @@ Options (
printf (" -d [file] Disassemble or decode binary ACPI table to file (*.dsl)\n");
printf (" -dc [file] Disassemble AML and immediately compile it\n");
printf (" (Obtain DSDT from current system if no input file)\n");
printf (" -e [file] Include ACPI table for external symbol resolution\n");
printf (" -2 Emit ACPI 2.0 compatible ASL code\n");
printf (" -g Get ACPI tables and write to files (*.dat)\n");
@ -354,7 +355,7 @@ AslCommandLine (
/* Get the command line options */
while ((j = AcpiGetopt (argc, argv, "2b:cd^efgh^i^l^o:p:r:s:t:v:w:x:")) != EOF) switch (j)
while ((j = AcpiGetopt (argc, argv, "2b:cd^e:fgh^i^l^o:p:r:s:t:v:w:x:")) != EOF) switch (j)
{
case '2':
Gbl_Acpi2 = TRUE;
@ -416,6 +417,11 @@ AslCommandLine (
break;
case 'e':
Gbl_ExternalFilename = AcpiGbl_Optarg;
break;
case 'f':
/* Ignore errors and force creation of aml file */