aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-06-19 13:31:51 -0700
committerTim Newsome <tim@sifive.com>2016-07-18 18:51:54 -0700
commit3b90da94dcf6b79f8a6fc0dbe6f3225ef9d34c9e (patch)
tree5d7644bc5774e275d13bab675a9a3da2a8e8f658 /debug
parenta37f84f7e20f67d50dfc759b3baae1f146df603b (diff)
downloadriscv-tests-3b90da94dcf6b79f8a6fc0dbe6f3225ef9d34c9e.zip
riscv-tests-3b90da94dcf6b79f8a6fc0dbe6f3225ef9d34c9e.tar.gz
riscv-tests-3b90da94dcf6b79f8a6fc0dbe6f3225ef9d34c9e.tar.bz2
Write command to logfile.
Diffstat (limited to 'debug')
-rw-r--r--debug/testlib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index e749a1a..0e5f35d 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -89,6 +89,7 @@ class Openocd(object):
if debug:
cmd.append("-d")
logfile = open("openocd.log", "w")
+ logfile.write("+ %s\n" % " ".join(cmd))
self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile,
stderr=logfile)
# TODO: Pick a random port
@@ -106,6 +107,7 @@ class Gdb(object):
path=os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gdb")):
self.child = pexpect.spawn(path)
self.child.logfile = file("gdb.log", "w")
+ self.child.logfile.write("+ %s\n" % path)
self.wait()
self.command("set confirm off")
self.command("set width 0")