How to set breakpoint at the very beginning of program execution

后端 未结 7 1199
眼角桃花
眼角桃花 2020-11-29 08:37

How can I stop the program before loading any of the linked DLLs?

I\'ve tried to set LoadLibraryExW function in the Break At Function debug

7条回答
  •  被撕碎了的回忆
    2020-11-29 09:37

    There is no way to do this because DLLs that your PE-executable depend on are loaded by system (not by your process) before the process is even created. The process starts only when your executable is linked with all the functions imported from other DLLs.

    ADD: But of course DllMain routines are running for every DLL only when process is started and you may debug them.

提交回复
热议问题