All pastes #50130 Raw Edit

Miscellany

public text v1 · immutable
#50130 ·published 2006-04-20 12:13 UTC
rendered paste body
     Additionally, machine-specific requests can exist. On i386 systems where
     the kernel has been configured with "options BRANCH_SINGLE_STEP", these
     include

     PT_SINGLE_STEP_ON_BRANCHES, PT_SINGLE_STEP_ON_INSTRUCTIONS
                   These two requests set the semantics of the TF (single
                   step) flag in the EFLAGS register and thus change the be-
                   haviour of the PT_STEP request.  The default behaviour is
                   to single step on instructions.

                   The PT_SINGLE_STEP_ON_BRANCHES request changes that behav-
                   iour to "single step on branches", i.e. a PT_STEP request
                   will continue execution of the ptraced program until it
                   executes a branch instruction (e.g. JMP, JCC, CALL, RET,
                   etc.) or generates an interrupt or exception.

                   The PT_SINGLE_STEP_ON_INSTRUCTIONS restores the default be-
                   haviour.

     PT_GETLASTBRANCHFROMIP, PT_GETLASTBRANCHTOIP
                   When single-stepping on branches, these requests will
                   return the address of the last branch instruction taken and
                   the address of the target of that branch.

     PT_GETLASTEXCEPTIONFROMIP, PT_GETLASTEXCEPTIONTOIP
                   When single-stepping on branches, these requests will
                   return the address of the instruction that was interrupted
                   by the last exception or interrupt (except for debug excep-
                   tions) and the address of the exception or interrupt han-
                   dler that was called to service the exception or interrupt.