From 8196dec66a338dcd9cfa3dd6118f440dae46ee45 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Fri, 5 Aug 2016 14:50:14 -0700 Subject: [PATCH] Some code cleanup --- debug/README.md | 2 +- debug/gdbserver.py | 4 ++-- debug/testlib.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/debug/README.md b/debug/README.md index 8424b87..56f69db 100644 --- a/debug/README.md +++ b/debug/README.md @@ -19,7 +19,7 @@ Targets `./gdbserver.py --spike32 --cmd $RISCV/bin/spike` -32-bit SiFive Core on Supported FPGA boards +32-bit SiFive Core on Supported FPGA Boards & Hardware ------------------------------------- `./gdbserver.py --freedom-e300` diff --git a/debug/gdbserver.py b/debug/gdbserver.py index aa76ceb..84ef27f 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -593,10 +593,10 @@ class FreedomE300SimTarget(Target): instruction_hardware_breakpoint_count = 2 def server(self): - sim = testlib.VcsSim(simv=parsed.run) + sim = testlib.VcsSim(simv=parsed.run, debug=True) x = testlib.Openocd(cmd=parsed.cmd, config="targets/%s/openocd.cfg" % self.name, - keepAlive = sim) + otherProcess = sim) time.sleep(20) return x diff --git a/debug/testlib.py b/debug/testlib.py index d6044f5..99c4a76 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -103,7 +103,6 @@ class VcsSim(object): done = True def __del__(self): - print "DELETE called for VcsSim" try: self.process.kill() self.process.wait() @@ -112,12 +111,12 @@ class VcsSim(object): class Openocd(object): - def __init__(self, cmd=None, config=None, debug=False, keepAlive=None): + def __init__(self, cmd=None, config=None, debug=False, otherProcess=None): # keep handles to other processes -- don't let them be # garbage collected yet. - self.keepAlive = keepAlive + self.otherProcess = otherProcess if cmd: cmd = shlex.split(cmd) else: -- 2.30.2