Windows bug check callback not called on 64 bit systems
Asked Answered
S

1

6

We have ported our driver successfully to 64 bit systems a while ago.

But one thing is missing, which is not very important but it was a very handy debugging feature.

The callbacks registered with KeRegisterBugCheckReasonCallback is never called. The function returns a TRUE for success, but my callback is never called. I also tried different values for the parameter reason with no success. A try with the older KeRegisterBugCheckCallback also failed.

What I am doing wrong?

Did I missed something in the documentation?

Seadon answered 8/6, 2011 at 12:25 Comment(2)
Googling around seems like it should work. ¯(°_o)/¯ i tried.Mainstream
I didn't found any sources which are specific to x64 Windows, just either 'old' once, before x64 time, or generic once. And my experience is that the callbacks are just not called.Seadon
S
1

I found the problem.

Windows only calls the callbacks if corresponding KBUGCHECK_CALLBACK_RECORD is aligned to an 8 byte address.

For some reason mine where aligned to 4 byte addresses.

It is a bummer that KeRegisterBugCheckReasonCallback does not check this.

Seadon answered 23/6, 2011 at 13:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.