Latest iasl generate .lst as 'number: ' instead of 'number....', then acpi_extrace.py fails to extract any useful information, building fails.
Signed-off-by: Bo Yang boyang@suse.com --- tools/acpi_extract.py | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 3295678..503784c 100755 --- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -229,11 +229,23 @@ for line in fileinput.input(): m = pasl.search(line) if (m): add_asl(lineno, pasl.sub("", line)); + else: + # latest iasl output different format. + pasl = re.compile('^\s+([0-9]+):\s\s\s*') + m = pasl.search(line) + if (m): + add_asl(lineno, pasl.sub("", line)); # AML listing: offset in hex, then ...., then code paml = re.compile('^([0-9A-Fa-f]+)....\s*') m = paml.search(line) if (m): add_aml(m.group(1), paml.sub("", line)) + else: + # latest iasl output different format. + paml = re.compile('^([0-9A-Fa-f]+):\s\s\s*') + m = paml.search(line) + if (m): + add_aml(m.group(1), paml.sub("", line))
# Now go over code # Track AML offset of a previous non-empty ASL command
On Mon, Feb 04, 2013 at 02:06:23PM +0800, Bo Yang wrote:
Latest iasl generate .lst as 'number: ' instead of 'number....', then acpi_extrace.py fails to extract any useful information, building fails.
Thanks. What version of the IASL compiler do you see this issue on? Can you provide a text snippet with a line or two from the before and after lst formats?
--- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -229,11 +229,23 @@ for line in fileinput.input():
[...]
# AML listing: offset in hex, then ...., then code paml = re.compile('^([0-9A-Fa-f]+)\.\.\.\.\s*')
[...]
paml = re.compile('^([0-9A-Fa-f]+):\s\s\s*')
Is there any reason we couldn't just change the original regex to: ^([0-9A-Fa-f]+)(:\s\s|....)\s*
-Kevin
On Wed, Feb 06, 2013 at 11:23:26PM -0500, Kevin O'Connor wrote:
On Mon, Feb 04, 2013 at 02:06:23PM +0800, Bo Yang wrote:
Latest iasl generate .lst as 'number: ' instead of 'number....', then acpi_extrace.py fails to extract any useful information, building fails.
[...]
Is there any reason we couldn't just change the original regex to: ^([0-9A-Fa-f]+)(:\s\s|....)\s*
I updated the tool to use the above regex format (see patch below). It's in my local tree, and I will push it in the next few days.
Thanks. -Kevin
commit 22db91c1e50bfd671a01c0b5975b23113853b768 Author: Kevin O'Connor kevin@koconnor.net Date: Sun Feb 10 21:06:14 2013 -0500
Update tools/acpi_extract.py to handle iasl 20130117 release.
The latest iasl release produces "lst" output with "number: " instead of "number....". Update the tool to support both formats.
Reported-by: Bo Yang boyang@suse.com Signed-off-by: Kevin O'Connor kevin@koconnor.net
diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 3295678..dd3ccfd 100755 --- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -225,12 +225,12 @@ for line in fileinput.input(): lineno = lineno + 1 debug = "input line %d: %s" % (lineno, line) #ASL listing: space, then line#, then ...., then code - pasl = re.compile('^\s+([0-9]+)....\s*') + pasl = re.compile('^\s+([0-9]+)(:\s\s|....)\s*') m = pasl.search(line) if (m): add_asl(lineno, pasl.sub("", line)); # AML listing: offset in hex, then ...., then code - paml = re.compile('^([0-9A-Fa-f]+)....\s*') + paml = re.compile('^([0-9A-Fa-f]+)(:\s\s|....)\s*') m = paml.search(line) if (m): add_aml(m.group(1), paml.sub("", line))
On 2/11/2013 at 10:11 AM, in message 20130211021114.GA14726@morn.localdomain,
Kevin O'Connor kevin@koconnor.net wrote:
On Wed, Feb 06, 2013 at 11:23:26PM -0500, Kevin O'Connor wrote:
On Mon, Feb 04, 2013 at 02:06:23PM +0800, Bo Yang wrote:
Latest iasl generate .lst as 'number: ' instead of 'number....', then acpi_extrace.py fails to extract any useful information, building fails.
[...]
Is there any reason we couldn't just change the original regex to: ^([0-9A-Fa-f]+)(:\s\s|....)\s*
I updated the tool to use the above regex format (see patch below). It's in my local tree, and I will push it in the next few days.
Thank you! I was on public holiday(spring festival) last week, sorry for not working on this in time. And sorry for my limited knowledge on regex expression. :)
Thanks. -Kevin
commit 22db91c1e50bfd671a01c0b5975b23113853b768 Author: Kevin O'Connor kevin@koconnor.net Date: Sun Feb 10 21:06:14 2013 -0500
Update tools/acpi_extract.py to handle iasl 20130117 release. The latest iasl release produces "lst" output with "number: " instead of "number....". Update the tool to support both formats. Reported-by: Bo Yang <boyang@suse.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 3295678..dd3ccfd 100755 --- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -225,12 +225,12 @@ for line in fileinput.input(): lineno = lineno + 1 debug = "input line %d: %s" % (lineno, line) #ASL listing: space, then line#, then ...., then code
- pasl = re.compile('^\s+([0-9]+)....\s*')
- pasl = re.compile('^\s+([0-9]+)(:\s\s|....)\s*') m = pasl.search(line) if (m): add_asl(lineno, pasl.sub("", line)); # AML listing: offset in hex, then ...., then code
- paml = re.compile('^([0-9A-Fa-f]+)....\s*')
- paml = re.compile('^([0-9A-Fa-f]+)(:\s\s|....)\s*') m = paml.search(line) if (m): add_aml(m.group(1), paml.sub("", line))