-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gdbmacros
76 lines (61 loc) · 853 Bytes
/
.gdbmacros
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
72
73
74
75
76
define depth
set $depth = $sp - 0x80000230
echo Stack depth:\
print ((int) $depth)/4
end
define tos
x/1xw $sp - 4
end
define ntos
x/$arg0xw $sp - (4 * $arg0)
end
define 2tos
ntos 2
end
define 3tos
ntos 3
end
define rtos
x/1xw $tp
end
define rntos
x/$arg0xw $tp
end
define input
printf "Input buffer: "
print_len $a0 $a1
end
define found_word
printf "Found word: "
print_len $s1 $a1
end
define symname
info symbol *((int*) $arg0)
end
define var
print (int*) var_$arg0
end
define name
x/1s (char*) $arg0+5
end
define latest
printf "Latest defined word: "
name var_LATEST
end
define flagstate
printf "Compiling? "
print (int) var_STATE
end
define intstate
echo Current word:\n
symname $fp
echo Next word:\n
symname $gp
latest
flagstate
found_word
end
define fnext
cont
intstate
end