3

在 GDB 中,我可以通过发出类似call foo("123").

我如何在 OllyDbg(或者可能是其他一些主要的 Windows 调试器)中做同样的事情?

4

2 回答 2

5

我不知道如何使用 OllyDbg 来做到这一点,但由于您提到了其他 Windows 调试器,您可以.call在 WinDbg 中使用该命令。

0:001> .call ABC!DoSomething(1,2)
Thread is set up for call, 'g' will execute.
WARNING: This can have serious side-effects,
including deadlocks and corruption of the debuggee.
0:001> r
eax=7ffde000 ebx=00000001 ecx=00000001 edx=00000003 esi=00000004 edi=00000005
eip=10250132 esp=00a7ffbc ebp=00a7fff4 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ABC!DoSomething:
10250132 55               push    ebp
0:001> dd esp
00a7ffbc  00a7ffc8 00000001 00000002 ccfdebcc

最好的解释来自The Old New Thing

于 2012-11-07T13:39:09.280 回答
0

In its default installation, Ollydbg can do this only for DLLs which have exports:

  • Debug > Call DLL export

For executables and DLLs without exports, you will have to build a plugin to do this.

于 2013-01-28T23:13:58.277 回答