Search code examples
exceptionintel-pin

how to catch a crash environment in intel pin?


I'm learning intel pin now. I wanna catch the crash env(registers),but I don't find any API on this after looking through the PIN's User Guide.

Checking each BBLs' eip before jump seems to be a solution to this,but is there any useful API could soulve this gracefully? Thx a lot for any help:)


Solution

  • There is an exception handler.

    typedef VOID(* LEVEL_PINCLIENT::CONTEXT_CHANGE_CALLBACK)(THREADID threadIndex, CONTEXT_CHANGE_REASON reason, const CONTEXT *from, CONTEXT *to, INT32 info, VOID *v)