This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cbdd39b6c9 tools:fix parsememdump.py match error
cbdd39b6c9 is described below

commit cbdd39b6c9c3ce9abe88e9da74d4879441ab001d
Author: anjiahao <[email protected]>
AuthorDate: Thu Apr 21 10:37:37 2022 +0800

    tools:fix parsememdump.py match error
    
    Signed-off-by: anjiahao <[email protected]>
---
 tools/parsememdump.py | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/tools/parsememdump.py b/tools/parsememdump.py
index daf5bc9ae1..7707e98060 100755
--- a/tools/parsememdump.py
+++ b/tools/parsememdump.py
@@ -45,19 +45,10 @@ class dump_line:
             return
         self.size = int(tmp.group(0)[1:])
 
-        tmp = re.search(r"\b0x[0-9a-fA-F]+\b", line_str[tmp.span()[1] :])
-        self.addr = tmp.group(0)
-        line_str = line_str[tmp.span()[1] :]
-        while 1:
-            tmp = re.search(r"\b0x[0-9a-fA-F]+\b", line_str[tmp.span()[1] :])
-            if tmp is None:
-                break
-            self.mem.append(tmp.group(0))
-            line_str = line_str[tmp.span()[1] :]
-
-        if self.mem.__len__() == 0:
-            self.err = 1
-            return
+        tmp = re.findall("0x([0-9a-fA-F]+)", line_str[tmp.span()[1] :])
+        self.addr = tmp[0]
+        for str in tmp[1:]:
+            self.mem.append(str)
 
 
 class log_output:

Reply via email to