Skip to content

Instantly share code, notes, and snippets.

@cchamplin
Created November 11, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cchamplin/2f930b60551aece7de4118f168390093 to your computer and use it in GitHub Desktop.
Save cchamplin/2f930b60551aece7de4118f168390093 to your computer and use it in GitHub Desktop.
I:\development\plugin_test>gdb greeter.exe
Reading symbols from greeter.exe...done.
(gdb) b go.link.addmoduledata
Function "go.link.addmoduledata" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_go.link.addmoduledata) pending.
(gdb) run
Starting program: I:\development\plugin_test\greeter.exe
Starting
Module Path: I:\development\plugin_test\eng\eng.so
library init
Breakpoint 1, 0x000000006e5b49c0 in _go.link.addmoduledata () from I:\development\plugin_test\eng\eng.so
1: x/i $pc
=> 0x6e5b49c0 <_go.link.addmoduledata>: lea 0xe7879(%rip),%rdi # 0x6e69c240 <local.moduledata>
(gdb) si
0x000000006e5b49c7 in _go.link.addmoduledata () from I:\development\plugin_test\eng\eng.so
1: x/i $pc
=> 0x6e5b49c7 <_go.link.addmoduledata+7>: callq 0x6e5b49a0 <runtime.addmoduledata>
(gdb) si
0x000000006e5b49a0 in runtime.addmoduledata () from I:\development\plugin_test\eng\eng.so
1: x/i $pc
=> 0x6e5b49a0 <runtime.addmoduledata>: push %r15
(gdb) info registers
rax 0x1 1
rbx 0x1 1
rcx 0xffffffff 4294967295
rdx 0x2 2
rsi 0x6e696dd0 1852403152
rdi 0x6e69c240 1852424768
rbp 0x6e500000 0x6e500000
rsp 0x85f670 0x85f670
r8 0xd 13
r9 0x85daf0 8772336
r10 0x0 0
r11 0x246 582
r12 0x0 0
r13 0x0 0
r14 0x6e500000 1850736640
r15 0x0 0
rip 0x6e5b49a0 0x6e5b49a0 <runtime.addmoduledata>
eflags 0x202 [ IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) si
0x000000006e5b49a2 in runtime.addmoduledata () from I:\development\plugin_test\eng\eng.so
1: x/i $pc
=> 0x6e5b49a2 <runtime.addmoduledata+2>: mov 0xe2747(%rip),%r15 # 0x6e6970f0 <runtime.lastmoduledatap>
(gdb) info registers
rax 0x1 1
rbx 0x1 1
rcx 0xffffffff 4294967295
rdx 0x2 2
rsi 0x6e696dd0 1852403152
rdi 0x6e69c240 1852424768
rbp 0x6e500000 0x6e500000
rsp 0x85f668 0x85f668
r8 0xd 13
r9 0x85daf0 8772336
r10 0x0 0
r11 0x246 582
r12 0x0 0
r13 0x0 0
r14 0x6e500000 1850736640
r15 0x0 0
rip 0x6e5b49a2 0x6e5b49a2 <runtime.addmoduledata+2>
eflags 0x202 [ IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) si
0x000000006e5b49a9 in runtime.addmoduledata () from I:\development\plugin_test\eng\eng.so
1: x/i $pc
=> 0x6e5b49a9 <runtime.addmoduledata+9>: mov (%r15),%rax
(gdb) x 0x6e6970f0
0x6e6970f0 <runtime.lastmoduledatap>: 0x6e69c240
(gdb) x *0x6e6970f0
0x6e69c240 <local.moduledata>: 0x6e60c420
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment