Fix test_32 on 64-bit targets.
authorTim Newsome <tim@sifive.com>
Thu, 14 Jul 2016 21:49:23 +0000 (14:49 -0700)
committerTim Newsome <tim@sifive.com>
Tue, 19 Jul 2016 18:24:25 +0000 (11:24 -0700)
debug/gdbserver.py

index f042e485b10b5fd91886a5c4728a78ee3523f8e7..d2ee5f5dc28a4feb9317bf704f2271422b1f4ca9 100755 (executable)
@@ -89,6 +89,8 @@ class SimpleMemoryTest(DeleteServer):
         self.gdb.command("target extended-remote localhost:%d" % self.server.port)
 
     def access_test(self, size, data_type):
+        self.assertEqual(self.gdb.p("sizeof(%s)" % data_type),
+                size)
         a = 0x86753095555aaaa & ((1<<(size*8))-1)
         b = 0xdeadbeef12345678 & ((1<<(size*8))-1)
         self.gdb.p("*((%s*)0x%x) = 0x%x" % (data_type, target.ram, a))
@@ -103,7 +105,7 @@ class SimpleMemoryTest(DeleteServer):
         self.access_test(2, 'short')
 
     def test_32(self):
-        self.access_test(4, 'long')
+        self.access_test(4, 'int')
 
     def test_64(self):
         self.access_test(8, 'long long')