Breakpoints in system libraries

I’ll just put it here, because I’m fed up with forgetting it and experimenting with syntax every time I need it. There are times when you need to put breakpoint in system function, like malloc or OutputDebugString. For example, I use the latter one sometimes, in order to intercept DirectX warnings (couldn’t find a way to make it break on warning, not only on error). Syntax for breakpoint window is (function): {,,kernel32.dll}_OutputDebugStringA@4.

To put in more general terms – {,, DLL }Function@ArgumentsSizeInBytes.

Random link of the day – cool site listing bunch of canned/unreleased games (…though not all of them, obviously, my canned projects aren’t there :/)

[Edit] Correction to “general” form, thanks to hellraizer.

Old comments

hellraizer 2009-03-16 11:53:08

Thanks for the tip.
Just a small correction. If i’m not mistaken the number after @ isn’t the ordinal. I think it should be the size of the parameters passed to the function, in bytes (stdcall calling convention).

MAIcrosoft 2009-03-16 18:03:22

I’m pleased to put your canned projects on U64. Drop me a line on this mail address about your projects and we’ll arrange something [;

admin 2009-03-16 19:12:03

Hellraizer - doh, of course you’re right, thanks for correction.

Chad Austin 2009-05-25 19:35:59

Great tip, thanks!

More Reading
Newer// DocOrganizer