Skip to content

Commit

Permalink
Move "monitor targets" calls into a central place.
Browse files Browse the repository at this point in the history
  • Loading branch information
timsifive committed Jul 17, 2023
1 parent 1754ac4 commit f6c33d7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6c33d7

Please sign in to comment.