【发布时间】:2018-07-25 11:28:57
【问题描述】:
无法进行远程调试,并且需要调试我的代码以解决无法在我的系统上重现的问题。
我可以在 linux 上的 gdb 中设置挂起的断点。我需要在windbg或windows平台上类似的东西,因为我无法共享源文件,但我需要在特定行中断文件以进行调试。
【问题讨论】:
无法进行远程调试,并且需要调试我的代码以解决无法在我的系统上重现的问题。
我可以在 linux 上的 gdb 中设置挂起的断点。我需要在windbg或windows平台上类似的东西,因为我无法共享源文件,但我需要在特定行中断文件以进行调试。
【问题讨论】:
挂起断点是什么意思?
函数所在的模块是动态加载的,需要提前设置断点吗?
如果是则使用bu断点
bu myfoomodule!myblahfunction
这将在加载模块时加载符号并在需要时设置断点
0:000> lm m help*
Browse full module list
start end module name
<<<<<<<<<<<< no results here
让我们通过强制重新编码符号并检查是否存在来确认 这个模块
0:000> .reload /f
Reloading current modules
0:000> lm m help*
Browse full module list
start end module name
again no results we cant set a regular breakpoint
our breakpoint needs to be set using unresolved breakpoint
lets set it
0:000> bu HelpPaneProxy!DllMain
let us check
0:000> bl
0 e Disable Clear u 0001 (0001) (HelpPaneProxy!DllMain)
lets continue
0:000> g
ModLoad: 77ac0000 77adf000 C:\Windows\system32\IMM32.DLL
ModLoad: 76f90000 7705c000 C:\Windows\system32\MSCTF.dll
un needed mod load display cut off XXXXXXXXXXXXXXXXXXXX
ModLoad: 67d80000 67d91000 C:\Windows\System32\HelpPaneProxy.dll
bingo our breakpoint hit on the module load triggered after clicking help in calc
Breakpoint 0 hit
eax=00000001 ebx=00000001 ecx=00000001 edx=00000000 esi=00000000 edi=0025cfa8
eip=67d84700 esp=0025ce7c ebp=0025ced8 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
HelpPaneProxy!DllMain:
67d84700 8bff mov edi,edi
【讨论】: