This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: probe to track destinations of calls and branches


William Cohen wrote:
Fleshing out another building block for instrumentation, tracking destinations of branches and calls. The attached probe has a parameter that is the address of the branch or call instruction be instrumented. The probe records the destinations of the call or branch in a map. This can be used to examine the destinations of indirect calls and jumps.

So I found out the address for the call for the syscall call from the disassembled code:

c0103f1c <syscall_call>:
c0103f1c:       ff 14 85 3c 7a 35 c0    call   *0xc0357a3c(,%eax,4)
c0103f23:       89 44 24 18             mov    %eax,0x18(%esp)

I updated the code to reflect the Anath's correction to the pre_handler run logic and the updates to the runtime library.


This code is still x86 dependent because it directly accesses reg->eip for the program counter. Once there is something equivalent to curren_ret_addr() for the program counter this can be added to the probes in the runtime library.

Currently this code expects to be placed in src/runtime/probes/dest_branch.

-Will

Attachment: dest_branch.tar.gz
Description: Unix tar archive


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]