From: Tim Newsome Date: Wed, 13 Jul 2016 17:51:05 +0000 (-0700) Subject: Tell gdb what xlen is when there's no ELF file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d04a081afdc1bddf5f60192692f6a7de50ed1c8;p=riscv-tests.git Tell gdb what xlen is when there's no ELF file. This makes several spike32 tests pass that used to fail. Ideally gdb wouldn't need to be told, but that's a project for another day. --- diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 0f5c28e..652ad33 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -43,6 +43,10 @@ class SimpleRegisterTest(DeleteServer): def setUp(self): self.server = target.server() self.gdb = testlib.Gdb() + # For now gdb has to be told what the architecture is when it's not + # given an ELF file. + self.gdb.command("set arch riscv:rv%d" % target.xlen) + self.gdb.command("target extended-remote localhost:%d" % self.server.port) # 0x13 is nop @@ -81,6 +85,7 @@ class SimpleMemoryTest(DeleteServer): def setUp(self): self.server = target.server() self.gdb = testlib.Gdb() + self.gdb.command("set arch riscv:rv%d" % target.xlen) self.gdb.command("target extended-remote localhost:%d" % self.server.port) def access_test(self, size, data_type): @@ -134,6 +139,7 @@ class InstantHaltTest(DeleteServer): def setUp(self): self.server = target.server() self.gdb = testlib.Gdb() + self.gdb.command("set arch riscv:rv%d" % target.xlen) self.gdb.command("target extended-remote localhost:%d" % self.server.port) def test_instant_halt(self):