www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - OllyDbg

reply Cauterite <cauterite gmail.com> writes:
I'm surprised OllyDbg hasn't been mentioned in this group before. 
For 32-bit Windows it's certainly a viable option; vastly 
preferable over WinDBG for sure.

Here's how I have it set up: http://imgur.com/53a4iUS
You can see its support for PDB debugging information, with the 
source listed next to the disassembly. Obviously you'll need to 
use cv2pdb to make use of it though.
(I don't enable the source view very often though, since it makes 
Olly crash fairly regularly on my system.)

When using OllyDbg it's useful to place breakpoints in the source 
code, since the hundreds of pages of disassembly can be hard to 
navigate; DebugBreak() from kernel32.dll serves this purpose.

Lastly, if you're considering using OllyDbg, first consider 
http://x64dbg.com/
I haven't tested it out much, but it seems to have a fairly 
similar feature set to Olly, with additional support for 64-bit 
code. Hopefully it's more stable too.
Sep 28 2015
next sibling parent reply Cauterite <cauterite gmail.com> writes:
I think I've managed to fix the crashes caused by loading PDB 
files. It was happening fairly often today, but I found some 
details here:
http://doar-e.github.io/blog/2013/09/09/pinpointing-heap-related-issues-ollydbg2-off-by-one-story/

OllyDbg is closed-source, so the fix involves editing the binary 
(just a single instruction though).

The decompiled code in the article shows this line:
	u->mem1_ov = (unsigned int *)Memalloc(12 * (nb_lines + 1), 3);
Increasing the size passed to Memalloc here seems to avoid the 
bug.
I did that by changing the instruction at 0x004CE5E3 from
	lea edx, [edx*2+edx]
to
	lea edx, [edx*4+edx]

The CRC32 of my original ollydbg.exe is 0x464dbcdb.
With this patch, it should become 0x8376f767.
Version is '2.01 (beta 2)', by the way.

Now OllyDbg reliably uses the debug data generated by cv2pdb for 
executables generated by DMD. I hope this fix works for you too.
Oct 21 2015
parent stew <growlercab gmail.com> writes:
On Wednesday, 21 October 2015 at 16:16:59 UTC, Cauterite wrote:
 I think I've managed to fix the crashes caused by loading PDB 
 files. It was happening fairly often today, but I found some 
 details here:
 http://doar-e.github.io/blog/2013/09/09/pinpointing-heap-related-issues-ollydbg2-off-by-one-story/

 [...]
Nice blog, thanks for sharing the info. Cheers Stew
Oct 21 2015
prev sibling parent reply Cauterite <cauterite gmail.com> writes:
Would just like to report that I've been using (patched) OllyDbg 
extensively with D over the last few months, and it's been sweet. 
Very stable, lots of useful features, definitely my first choice 
for debugging 32-bit D code on windows.

I've spent a little time with x64dbg too, but its feature set is 
still pretty minimal by comparison. Does seem to support PDB data 
at least, so it's useful.

I eagerly await OllyDbg64 :)
Jul 24 2016
parent Martin Krejcirik <mk-junk i-line.cz> writes:
On Sunday, 24 July 2016 at 17:47:29 UTC, Cauterite wrote:
 Would just like to report that I've been using (patched) 
 OllyDbg extensively with D over the last few months, and it's 
 been sweet. Very stable, lots of useful features, definitely my
Nice, I've been using it from time to time. I hope 64bit Ollydbg has not been abandoned.
Jul 24 2016