diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 1a9733da9a..3646c2b9fc 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -261,8 +261,9 @@ class Event(object): self.name, self.args, fmt) - - _FMT = re.compile("(%[\d\.]*\w+|%.*PRI\S+)") + # Star matching on PRI is dangerous as one might have multiple + # arguments with that format, hence the non-greedy version of it. + _FMT = re.compile("(%[\d\.]*\w+|%.*?PRI\S+)") def formats(self): """List conversion specifiers in the argument print format string."""