mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
decodetree: Diagnose empty pattern group
Test err_pattern_group_empty.decode failed with exception: Traceback (most recent call last): File "./scripts/decodetree.py", line 1424, in <module> main() File "./scripts/decodetree.py", line 1342, in main toppat.build_tree() File "./scripts/decodetree.py", line 627, in build_tree self.tree = self.__build_tree(self.pats, self.fixedbits, File "./scripts/decodetree.py", line 607, in __build_tree fb = i.fixedbits & innermask TypeError: unsupported operand type(s) for &: 'NoneType' and 'int' Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
2fd2eb5a24
commit
f260447176
1 changed files with 6 additions and 0 deletions
|
@ -506,6 +506,12 @@ class IncMultiPattern(MultiPattern):
|
||||||
output(ind, '}\n')
|
output(ind, '}\n')
|
||||||
else:
|
else:
|
||||||
p.output_code(i, extracted, p.fixedbits, p.fixedmask)
|
p.output_code(i, extracted, p.fixedbits, p.fixedmask)
|
||||||
|
|
||||||
|
def build_tree(self):
|
||||||
|
if not self.pats:
|
||||||
|
error_with_file(self.file, self.lineno, 'empty pattern group')
|
||||||
|
super().build_tree()
|
||||||
|
|
||||||
#end IncMultiPattern
|
#end IncMultiPattern
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue