mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gdb test: set float
This commit is contained in:
@@ -13,6 +13,16 @@ main:
|
||||
mov x30, #2
|
||||
/* test-gdb-x30 */
|
||||
|
||||
fmov d0, #1.5
|
||||
/* test-gdb-d0 */
|
||||
fmov d1, #2.5
|
||||
/* test-gdb-d1 */
|
||||
|
||||
fmov d30, #1.5
|
||||
/* test-gdb-d30 */
|
||||
fmov d31, #2.5
|
||||
/* test-gdb-d31 */
|
||||
|
||||
/* Exit required since we meesed up with x30 which is the lr. */
|
||||
mov x0, #0
|
||||
bl exit
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
def test(self):
|
||||
self.sendline('tbreak main')
|
||||
self.sendline('continue')
|
||||
|
||||
self.continue_to('x0')
|
||||
self.sendline('set $x0 = 3')
|
||||
self.continue_to('x1')
|
||||
@@ -12,3 +13,15 @@ def test(self):
|
||||
assert self.get_int('$x30') == 3
|
||||
self.continue_to('x30')
|
||||
assert self.get_int('$x30') == 2
|
||||
|
||||
self.continue_to('d0')
|
||||
self.sendline('set $d0 = 3.5')
|
||||
self.continue_to('d1')
|
||||
assert self.get_float('$d0') == 3.5
|
||||
assert self.get_float('$d1') == 2.5
|
||||
self.sendline('set $d31 = 3.5')
|
||||
self.continue_to('d30')
|
||||
assert self.get_float('$d30') == 1.5
|
||||
assert self.get_float('$d31') == 3.5
|
||||
self.continue_to('d31')
|
||||
assert self.get_float('$d31') == 2.5
|
||||
|
||||
Reference in New Issue
Block a user