make gdb test automation even awesomer

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-13 00:00:00 +00:00
parent a06872241b
commit e54635c3ab
8 changed files with 65 additions and 39 deletions

View File

@@ -3,7 +3,6 @@
* - read x30 */
.global main
main:
/* test-gdb-before-x29 */
mov x0, #1
/* test-gdb-x0 */
mov x1, #2

View File

@@ -1,7 +1,11 @@
def test(self):
self.sendline('tbreak main')
self.sendline('continue')
self.continue_to('x0')
self.sendline('set $x0 = 3')
self.continue_to('x1')
assert self.get_int('$x0') == 3
assert self.get_int('$x1') == 2
self.sendline('set $x30 = 3')
self.continue_to('x29')
assert self.get_int('$x29') == 1