diff options
author | Robert Moore <Robert.Moore@intel.com> | 2012-03-23 13:05:05 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2012-03-23 13:05:05 -0700 |
commit | 3243ed708788c3aa74b768d3e217b0e46c77fde2 (patch) | |
tree | d023e057db0a2459a733c824f3e2ef0d01af3c77 /source/compiler/aslfiles.c | |
parent | 651031314f26bcfa32ee070014c841afa4cee094 (diff) | |
download | acpica-3243ed708788c3aa74b768d3e217b0e46c77fde2.tar.gz |
iASL: Add pass-thru #line support for correct line numbers.
Preprocessor now adds #line directives so that the compiler will
emit error messages with the proper line number in the original
source file.
Diffstat (limited to 'source/compiler/aslfiles.c')
-rw-r--r-- | source/compiler/aslfiles.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c index 546ce891e..1bc7ad25a 100644 --- a/source/compiler/aslfiles.c +++ b/source/compiler/aslfiles.c @@ -463,6 +463,9 @@ FlSetLineNumber ( ACPI_PARSE_OBJECT *Op) { + DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New line number %u (old %u)\n", + (UINT32) Op->Asl.Value.Integer, Gbl_LogicalLineNumber); + Gbl_CurrentLineNumber = (UINT32) Op->Asl.Value.Integer; Gbl_LogicalLineNumber = (UINT32) Op->Asl.Value.Integer; } @@ -470,6 +473,30 @@ FlSetLineNumber ( /******************************************************************************* * + * FUNCTION: FlSetFilename + * + * PARAMETERS: Op - Parse node for the LINE asl statement + * + * RETURN: None. + * + * DESCRIPTION: Set the current filename + * + ******************************************************************************/ + +void +FlSetFilename ( + ACPI_PARSE_OBJECT *Op) +{ + + DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New filename %s (old %s)\n", + Op->Asl.Value.String, Gbl_Files[ASL_FILE_INPUT].Filename); + + Gbl_Files[ASL_FILE_INPUT].Filename = Op->Asl.Value.String; +} + + +/******************************************************************************* + * * FUNCTION: FlAddIncludeDirectory * * PARAMETERS: Dir - Directory pathname string |