forked from Asmageddon/airbreak-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdb.config
71 lines (59 loc) · 1.16 KB
/
gdb.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
target remote localhost:3333
define dumpmemory
dump binary memory $arg0.dump 0x20000000 0x20020000
end
define dc
dumpmemory $arg0
continue
end
define b_file_open
break *0x0809e16a
commands
silent
printf "file_open(%h, %s, %s),", $r0, $r1, $r2
#x/s $r1
#x/s $r2
end
end
define b_task
# This breakpoint is called from two different places, only one(uncommented) of which calls the actual task subroutine
# break *0x080d0cb2
break *0x080f0574
condition $bpnum $r4 == $breakTaskNum
commands
printf "Task #%d\n", $r4
end
set $breakTaskNum = $arg0
disable $bpnum
enable $bpnum
end
define b_log_tasks
break *0x080f0574
commands
silent
printf " Task #%d (%x)\n", $r4, $pc
continue
end
end
define b_fvar
watch *(0x2000e948 + 4 * $arg0)
commands
silent
printf " fvars[%x] write", $arg0
end
end
define b_fvar_read
rwatch *(0x2000e948 + 4 * $arg0)
commands
silent
printf " fvars[%x] read", $arg0
end
end
# break *0x080bc992
# commands
# silent
# printf "Target=%.2f, %.2f\n",*(0x2000e948 + 4*0x2a), *(0x2000e948 + 4*0x2d)
# continue 10
# end
# display/f *0x2000e9ec
# watch *0x2000e9ec