X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=blobdiff_plain;f=debug%2Ftestlib.py;h=2fd978cc283f5dbc502c32cdb96efb82302d33da;hp=fb5bee33b1284b36ecafe918821a979ad1cf738c;hb=016147c6167f714c95dbfe9d99d6b983e6202507;hpb=f9db9282d7db202dc6bd5e29f4745d9932292ac4 diff --git a/debug/testlib.py b/debug/testlib.py index fb5bee3..2fd978c 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -477,7 +477,7 @@ class Gdb(object): self.active_child.sendline("c%s" % async) self.active_child.expect("Continuing", timeout=ops * self.timeout) - def c_all(self): + def c_all(self, wait=True): """ Resume every hart. @@ -494,15 +494,20 @@ class Gdb(object): child.sendline("c") child.expect("Continuing") - # Now wait for them all to halt - for child in self.children: - child.expect(r"\(gdb\)") + if wait: + for child in self.children: + child.expect(r"\(gdb\)") def interrupt(self): self.active_child.send("\003") self.active_child.expect(r"\(gdb\)", timeout=6000) return self.active_child.before.strip() + def interrupt_all(self): + for child in self.children: + self.select_child(child) + self.interrupt() + def x(self, address, size='w'): output = self.command("x/%s %s" % (size, address)) value = int(output.split(':')[1].strip(), 0)