From f6c33d7d1986da701a2d97c179d1b22b462f7e8d Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Fri, 23 Jun 2023 17:05:39 -0700 Subject: [PATCH] Move "monitor targets" calls into a central place. --- debug/gdbserver.py | 3 --- debug/testlib.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 46d65dfea..e5d370740 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -1989,7 +1989,6 @@ def setup(self): self.gdb.b("handle_trap") def test(self): - self.gdb.command(f"monitor targets {self.hart.id}") # Set trigger on Load access fault self.gdb.command("monitor riscv etrigger set m 0x20") # Set fox to a null pointer so we'll get a load access exception later. @@ -2009,7 +2008,6 @@ def setup(self): DebugTest.setup(self) self.gdb.b("main") self.gdb.c() - self.gdb.command(f"monitor targets {self.hart.id}") def test(self): # Execute 2 instructions. @@ -2039,7 +2037,6 @@ def setup(self): self.gdb.load() def test(self): - self.gdb.command(f"monitor targets {self.hart.id}") output = self.gdb.command("monitor riscv itrigger set 0x80") assertIn("Doesn't make sense", output) output = self.gdb.command("monitor riscv itrigger set m 0") diff --git a/debug/testlib.py b/debug/testlib.py index 8962ae32b..688829df0 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -1309,6 +1309,7 @@ def parkOtherHarts(self, symbol=None): self.gdb.p(f"$pc={symbol}") self.gdb.select_hart(self.hart) + self.gdb.command(f"monitor targets {self.hart.id}") def disable_pmp(self): # Disable physical memory protection by allowing U mode access to all