forked from devos50/qemu-ios
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gdbinit
69 lines (53 loc) · 1.58 KB
/
.gdbinit
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
# GDB may have ./.gdbinit loading disabled by default. In that case you can
# follow the instructions it prints. They boil down to adding the following to
# your home directory's ~/.gdbinit file:
#
# add-auto-load-safe-path /path/to/qemu/.gdbinit
# Load QEMU-specific sub-commands and settings
# source scripts/qemu-gdb.py
set pagination off
target remote localhost:1234
file /home/tucker/Development/qemu-ipod-nano/build/bootrom_symbols
file /home/tucker/Development/qemu-ipod-nano/build/efi_adjusted_symbols
file /home/tucker/Development/qemu-ipod-nano/build/diag_symbols
# build the ipod-debug binary with -g to get various structs and global variables for a richer and more fulfilling debugging experience
add-symbol-file /home/tucker/Development/qemu-ipod-nano/ipod/ipod-debug
tui new-layout vmdebug {-horizontal asm 1 regs 1} 2 cmd 1
layout vmdebug
focus cmd
set confirm off
define sf
until *($pc + 6)
end
define dump
x/32bx $pc
end
define done
kill
quit
end
# break on a CPU exception
break *0x04
break *0x08
break *0x0c
break *0x10
break *0x14
# break *0x18
break *0x9f022c0
# first instruction of a module! maps to 40080242 efi_DxeMain_entrypoint in Ghidra, offset of 0x360C1000
# break *0x9fbf242
skip function efi_DxeMain_CoreLocateProtocol ()
# diag load
# break *0x8007150
# break *0x8014528
# break *0x800fc64
# break *0x800c624
break *0x80070e4
#break *0x800fce8
break *0x80057b4
continue
# table of contents of known global variables
# p **and_data (the NAND Chip data structure)
set and_data = 0x9e94388
# p fil_func_tbl (the FIL function table)
set fil_func_tbl = 0x9e945d8