1

How can I catch the exceptions generated by an instrumented application in Intel PIN?

I know about PIN_AddInternalExceptionHandler. This is not what I mean, this catches exceptions generated by the PinTool itself (if I understood correctly)

I found this resource. Although it is a clever solution (check EIP against KiUserExceptionDispatcher) I can not instrument every instruction in my case.

Is there a simple way to achieve this?

1

Use PIN_AddContextChangeFunction, and from callback (CONTEXT_CHANGE_CALLBACK) you may see exception

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.