How to get first chance break into debuggers for kernel mode exceptions?

Hi all,

I would like my test box to break into the debugger when an exception is raised in kernel mode, I tried enabling the ‘Stop on exception’ in gflags after which it’s breaking for AVs but not for the exceptions that I raise using ExRaiseStatus. Could you please help in achieving the same? Any pointers on the same would be much helpful.

Thanks and Regards,

K V Chandra Kumar

I’m not 100% sure what you’re doing here, but what value of NTSTATUS are you passing to ExRaiseStatus()?

mm

I forgot…

You might want to take a look at ‘sx’ in the windbg docs.

As I said, I’m not really sure what you’re trying to do, but it sounds like you want windbg to break in all (?) exceptions during for ‘first chance’ handling. If so, this works out to:

sxe

Where event depends on what exceptions you’re interested in.

mm

Hi,
Thanks for pointing out, forgot to mention that. I have set “sxe *” and also set "sxe " for other named exceptions too. sx’s output shows that debugger will break for those exceptions. Also tried setting sxe for the status that I’m raising explicitly, just in case, (here it’s STATUS_INVALID_PARAMETER).

Thanks and Regards,
K V Chandra Kumar

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@evitechnology.com
Sent: Tuesday, September 08, 2009 10:12 AM
To: Kernel Debugging Interest List
Subject: RE:[windbg] How to get first chance break into debuggers for kernel mode exceptions?

I forgot…

You might want to take a look at ‘sx’ in the windbg docs.

As I said, I’m not really sure what you’re trying to do, but it sounds like you want windbg to break in all (?) exceptions during for ‘first chance’ handling. If so, this works out to:

sxe

Where event depends on what exceptions you’re interested in.

mm


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Glad to help.

mm

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@evitechnology.com
Sent: Wednesday, September 09, 2009 11:39 AM
To: Kernel Debugging Interest List
Subject: RE:[windbg] How to get first chance break into debuggers for kernel mode exceptions?

Glad to help.

mm


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Sorry about that, fat fingers and my phone in my pocket :frowning:

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: Doron Holan
Sent: Wednesday, September 09, 2009 12:45 PM
To: Kernel Debugging Interest List
Subject: RE: RE:[windbg] How to get first chance break into debuggers for kernel mode exceptions?

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@evitechnology.com
Sent: Wednesday, September 09, 2009 11:39 AM
To: Kernel Debugging Interest List
Subject: RE:[windbg] How to get first chance break into debuggers for kernel mode exceptions?

Glad to help.

mm


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer