aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-03-03 09:59:34 -0800
committerGitHub <noreply@github.com>2022-03-03 09:59:34 -0800
commitbd050de178cb1ffcfaae6bf1c79e6e640600b22f (patch)
tree4ade04c5c2628b176baab2099161ddcc3ca04694
parent6db14247008faba2156bb2e4048667d7619b43da (diff)
downloadriscv-tests-bd050de178cb1ffcfaae6bf1c79e6e640600b22f.zip
riscv-tests-bd050de178cb1ffcfaae6bf1c79e6e640600b22f.tar.gz
riscv-tests-bd050de178cb1ffcfaae6bf1c79e6e640600b22f.tar.bz2
With new OpenOCD, gdb prints thread info differently (#373)
It includes the name in quotes: ```* 2 Thread 1 "Current Execution" (Name: Current Execution) 0x10000100 in main``` Just ignore that part.
-rw-r--r--debug/testlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index bb4ac25..4ebed43 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -870,7 +870,8 @@ class Gdb:
for line in output.splitlines():
m = re.match(
r"[\s\*]*(\d+)\s*"
- r"(Remote target|Thread (\d+)\s*\(Name: ([^\)]+))"
+ r'(Remote target'
+ r'|Thread (\d+)\s*(?:".*?")?\s*\(Name: ([^\)]+))'
r"\s*(.*)", line)
if m:
threads.append(Thread(*m.groups()))