diff options
author | Tim Newsome <tim@sifive.com> | 2017-11-01 11:43:04 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2017-11-01 11:43:04 -0700 |
commit | caa79b71bfc1f42e70a48980c81f8811df57811f (patch) | |
tree | 7fe036d03c1ee6d82f3dd34c925b30d4a7d7e058 /debug/testlib.py | |
parent | a98122fc00d8a7178f41d27cb801a8c9069a7d05 (diff) | |
download | riscv-tests-caa79b71bfc1f42e70a48980c81f8811df57811f.zip riscv-tests-caa79b71bfc1f42e70a48980c81f8811df57811f.tar.gz riscv-tests-caa79b71bfc1f42e70a48980c81f8811df57811f.tar.bz2 |
Fix MulticoreRegTest.
This test would fail intermittently if gdb on the first hart managed to
set a breakpoint, resume, halt, and clear the breakpoint before the
second hart got a chance to resume.
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 66b7b38..e1be100 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -420,7 +420,17 @@ class Gdb(object): self.active_child.expect("Continuing") def c_all(self): - """Resume every hart.""" + """ + Resume every hart. + + This function works fine when using multiple gdb sessions, but the + caller must be careful when using it nonetheless. gdb's behavior is to + not set breakpoints until just before the hart is resumed, and then + clears them as soon as the hart halts. That means that you can't set + one software breakpoint, and expect multiple harts to hit it. It's + possible that the first hart completes set/run/halt/clear before the + second hart even gets to resume, so it will never hit the breakpoint. + """ with PrivateState(self): for child in self.children: child.sendline("c") |