diff options
author | Tim Newsome <tim@sifive.com> | 2023-07-25 13:41:42 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2023-09-28 13:52:51 -0700 |
commit | 4c8fab6e1c5594e0b2a655a9089622ddd7ca00d5 (patch) | |
tree | 5b73bcb48ba293b3a11d4aaae2dd137d4fc35d38 | |
parent | d4eaa5bd6674b51d3b9b24913713c4638e99cdd9 (diff) | |
download | riscv-tests-4c8fab6e1c5594e0b2a655a9089622ddd7ca00d5.zip riscv-tests-4c8fab6e1c5594e0b2a655a9089622ddd7ca00d5.tar.gz riscv-tests-4c8fab6e1c5594e0b2a655a9089622ddd7ca00d5.tar.bz2 |
debug: Better interlock when interacting with gdb CLI.
Actually wait for the command to be echoed back. This means we won't be
confused if there are extra newlines in gdb output.
-rw-r--r-- | debug/testlib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 435b41b..b665edb 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -795,6 +795,7 @@ class Gdb: timeout = max(1, ops) * self.timeout self.active_child.sendline(command) try: + self.active_child.expect(re.escape(command), timeout=timeout) self.active_child.expect("\n", timeout=timeout) except pexpect.exceptions.TIMEOUT as exc: raise CommandSendTimeout(command) from exc |