diff options
author | Tim Newsome <tim@sifive.com> | 2016-06-10 14:06:13 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2016-07-18 18:51:54 -0700 |
commit | c11808e013c7c34161d9f343cd97d5f2440c4c2e (patch) | |
tree | b4a094824e7518e1364cb6d4dd8c759fee42e036 /debug/testlib.py | |
parent | 6ccc0bdde5eea898e88961f49e755bd2b4577792 (diff) | |
download | riscv-tests-c11808e013c7c34161d9f343cd97d5f2440c4c2e.zip riscv-tests-c11808e013c7c34161d9f343cd97d5f2440c4c2e.tar.gz riscv-tests-c11808e013c7c34161d9f343cd97d5f2440c4c2e.tar.bz2 |
Make tests work with broken 32-bit compiler.
Apparently the 32-bit compiler doesn't generate good enough debug info
for gdb to know what function we're in, which also means it doesn't know
where the local variables in those functions are stored.
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index f654d43..21f28d8 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -42,13 +42,15 @@ def unused_port(): return port class Spike(object): - def __init__(self, cmd, binary=None, halted=False, with_gdb=True, timeout=None): + def __init__(self, cmd, binary=None, halted=False, with_gdb=True, timeout=None, + xlen=64): """Launch spike. Return tuple of its process and the port it's running on.""" if cmd: cmd = shlex.split(cmd) else: cmd = ["spike"] - cmd.append("-l") #<<< + if (xlen == 32): + cmd += ["--isa", "RV32"] if timeout: cmd = ["timeout", str(timeout)] + cmd @@ -105,6 +107,7 @@ class Gdb(object): self.child = pexpect.spawn(path) self.child.logfile = file("gdb.log", "w") self.wait() + self.command("set confirm off") self.command("set width 0") self.command("set height 0") # Force consistency. |