The MASM Forum

General => The Workshop => Topic started by: NoCforMe on February 05, 2022, 09:09:20 AM

Title: How to replace Dr. Watson with OllyDbg?
Post by: NoCforMe on February 05, 2022, 09:09:20 AM
I want Olly to come up when something crashes instead of Dr. Watson, which offers no interactive operation. I put Olly in the registry, under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug, and it does open on a fatal error, but there's no data from the actual application (or DLL) that caused the error. I think I need something on Olly's command line to connect to the failing code, but I can't find anything online about this. Odd, because I know other people use this in place of Dr. Watson or WinDebug.
Title: Re: How to replace Dr. Watson with OllyDbg?
Post by: jj2007 on February 05, 2022, 11:45:14 AM
I assume you use Olly's version 2 (http://www.ollydbg.de/version2.html). Go to Options/Options/Just-in-time and click "Set OllyDbg". That's it.

In the unlikely case that you are a RichMasm (http://masm32.com/board/index.php?topic=5314.0) user, and that Olly sits in \Masm32\OllyDbg\ollydbg.exe:

int 3  ; somewhere in your code launches Olly
; int 3  ; doesn't launch Olly
INT 3  ; doesn't launch Olly, but of course, the just-in-time debugger will take over at this point
Title: Re: How to replace Dr. Watson with OllyDbg?
Post by: NoCforMe on February 05, 2022, 05:38:13 PM
Works like a charm.