ConfusedSushi
ConfusedSushi

Reputation: 894

Windows bug check callback not called on 64 bit systems

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?

Upvotes: 6

Views: 548

Answers (1)

ConfusedSushi
ConfusedSushi

Reputation: 894

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.

Upvotes: 1

Related Questions