News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Anyone success debug dll by cdb.exe ???

Started by wenxibo, December 08, 2008, 09:26:48 AM

Previous topic - Next topic

wenxibo

My dll file is rendered by MS cl.exe and link.exe, and had set the correct path fo cdb.exe.
But when I debug it , the third-party host program is loaded , but can't stop at the breakpoint in my source file for dll.

And the symbol path and source path is correct.(-srcpath and -i)

Pecan

#1
I have the same problem with gdb.

Placing "asm("int3"); /*trap*/" (for gcc++) statements in the code solved my problem. You'll have to use the correct flavor of "int3" for your compiler.

gdb also has a DLL "dll-symbols" load command. Maybe your debugger has something likewise. Using it at the first "int3" allows further breaks with mouse-set breakpoints.

"5. Debugging DLL with gdb"
http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html/

wenxibo

Quote from: Pecan on December 08, 2008, 03:38:04 PM
I have the same problem with gdb.

Placing "asm("int3"); /*trap*/" (for gcc++) statements in the code solved my problem. You'll have to use the correct flavor of "int3" for your compiler.

gdb also has a DLL "dll-symbols" load command. Maybe your debugger has something likewise. Using it at the first "int3" allows further breaks with mouse-set breakpoints.

"5. Debugging DLL with gdb"
http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html/


thank you for suggestion.

I tested the asm{int3} but no effect with cdb.exe .
My dll built with MS cl.exe and link.exe, did it can be debug with gdb.exe ?

I can debug my dll file with windbg.exe successfully , so I think my symbol file is correct.

wenxibo

And I don't know how to input the console command for cdb (and for gdb.exe)
codeblocks wrap the command for debugger, is there anyway for input command directly?