News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

OllyDbg pass exception

Started by vozzie, September 28, 2010, 08:49:02 PM

Previous topic - Next topic

vozzie

Hy,

When using OllyDbg i let my program run(step over) parts but ollydbg breaks in kernel32.dll, saying press "Exception 00000006 - use Shift+F7/F8/F9 to pass exception to program". When i hit SHIFT+F9 nothing goes wrong. When i run the program with no debugger, nothing goes wrong.

Do i need to conclude
- i pass somewhere wrong data, but the exception is not serious?
- that it's an internal exception in kernel32 that i should not worry about?
- something else?

Windows error code 6 stands for ERROR_INVALID_HANDLE 6 (0x6)

There's too much discussion on the topic to find something usefull on first sight. I tried to turn on all "ignore" exceptions, i could add the exception explicit in ollydbg. I'm just not sure if the program is buggy

Greetings

Tedd

It would be helpful to know which API function you're calling when this happens, but some will produce exceptions internally and handle them themselves. So, if you don't receive the exception (outside of debugging), you can assume it has been taken care of and all is well.
No snowflake in an avalanche feels responsible.

vozzie

Hy,

Thank you.

It was WSALookupServiceBegin that led to an error in kernel32. My application runs good when passing the exception to the program. Or running with no debugger. Looks like OllyDbg catches a bit too much  :green2. That can be usefull, but I just want to debug my programs, so only the "top layer".

It's possible to ignore certain exceptions in OllyDbg, but i wonder if that is a good way of working.

Greetings

jj2007

Quote from: vozzie on September 30, 2010, 10:05:45 PM
It's possible to ignore certain exceptions in OllyDbg, but i wonder if that is a good way of working.

Try "Ignore memory access violations in KERNEL32". Olly 2 has also an option "Report ignored exceptions to log".
In rare occasions, version 2 produces different results; especially the contents of regs at startup may differ (but no programmer should rely on any values in registers at entry point, of course).

vozzie

Quote from: Tedd on September 30, 2010, 12:37:57 PMIt would be helpful to know which API function you're calling when this happens,

I posted the project there: http://www.masm32.com/board/index.php?topic=14997.new


vozzie

Quote from: jj2007 on September 30, 2010, 11:27:01 PM
Quote from: vozzie on September 30, 2010, 10:05:45 PM
It's possible to ignore certain exceptions in OllyDbg, but i wonder if that is a good way of working.
Try "Ignore memory access violations in KERNEL32". Olly 2 has also an option "Report ignored exceptions to log".

using version 1.10  ::)

The ignore memory access violations doesn't work for error 6. On the moment OllyDbg breaks I've Added Last Exception in the Debugging Options tab and after a second time he didn't break anymore. There's a convenient checkbox to turn the Ignored exceptions off,...

Greetings

(wanted to modify the previous post and by accident added another one, is there a way to delete posts?)

Antariy

Quote from: vozzie on October 01, 2010, 05:11:25 AM
Quote from: jj2007 on September 30, 2010, 11:27:01 PM
Quote from: vozzie on September 30, 2010, 10:05:45 PM
It's possible to ignore certain exceptions in OllyDbg, but i wonder if that is a good way of working.
Try "Ignore memory access violations in KERNEL32". Olly 2 has also an option "Report ignored exceptions to log".

using version 1.10  ::)

Hi!

You can download version 2.0 there: "http://www.ollydbg.de/version2.html". It more robust than 1.10, with multi-threaded apps too.



Alex

jj2007

Alex is right, version 2 is apparently more robust. Its only problem is that it cannot yet use symbols.

vozzie

Hy,

Thx, have them both now. As far as i'm going in asm now i don't need many features.

Greetings