summaryrefslogtreecommitdiff
path: root/source/compiler/aslerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslerror.c')
-rw-r--r--source/compiler/aslerror.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c
index a2f9fcef1766..db6d871deff2 100644
--- a/source/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
@@ -474,10 +474,12 @@ AePrintErrorSourceLine (
* Use the merged header/source file if present, otherwise
* use input file
*/
- SourceFile = AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
+ SourceFile = FlGetFileHandle (ASL_FILE_SOURCE_OUTPUT,
+ ASL_FILE_SOURCE_OUTPUT, Enode->SourceFilename);
if (!SourceFile)
{
- SourceFile = AslGbl_Files[ASL_FILE_INPUT].Handle;
+ SourceFile = FlGetFileHandle (ASL_FILE_INPUT,
+ ASL_FILE_INPUT, Enode->Filename);
}
if (SourceFile)
@@ -818,6 +820,7 @@ static void AslInitEnode (
ASL_ERROR_MSG *SubError)
{
ASL_ERROR_MSG *Enode;
+ ASL_GLOBAL_FILE_NODE *FileNode;
*InputEnode = UtLocalCalloc (sizeof (ASL_ERROR_MSG));
@@ -859,6 +862,23 @@ static void AslInitEnode (
{
Enode->FilenameLength = 6;
}
+
+ FileNode = FlGetCurrentFileNode ();
+ if (!FileNode)
+ {
+ return;
+ }
+
+ if (!FlInputFileExists (Filename))
+ {
+ /*
+ * This means that this file is an include file. Record the .src
+ * file as the error message source because this file is not in
+ * the global file list.
+ */
+ Enode->SourceFilename =
+ FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
+ }
}
}
@@ -992,7 +1012,7 @@ AslLogNewError (
}
AslGbl_ExceptionCount[ModifiedLevel]++;
- if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
+ if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);