-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfind_offsets.gdb
57 lines (44 loc) · 1.05 KB
/
find_offsets.gdb
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
echo #\n
echo # Force gdb to use pretty print of structures managed by default (instead of a barely flat line)\n
echo #\n
echo # set print pretty\n
echo #\n
set print pretty
echo #\n
echo # load the offset finder python gdb script\n
echo #\n
echo source offsets_finder.py\n
echo #\n
source offsets_finder.py
#
echo #\n
echo # Auto setting break point before exe prints mixed_nested\n
echo #\n
break main.cpp:44
# code to execute once breakpoint is reached (basically, full jsons prints using various methods)
command 1
p simple_json.m_value.object
echo #\n
echo # ### Prints using python pretty printer offsetts finder ###\n
echo #\n
echo # Print simple_json (python pretty printer)\n
p simple_json
echo \n\n\n
echo #\n
echo # Print simple_array (python pretty printer)\n
echo #\n
p simple_array
echo \n\n\n
end
echo #\n
echo # Running the exe\n
r
# everything went fine, exit 0
echo \n
echo \n
echo ############ FORCING A NORMAL EXIT (code 0) ############\n
echo \n
echo Errors in python should have triggered a different exit code earlier
echo \n
echo \n
q 0