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]

runtime library wrapper for program counter


I like the wrapper for the return address in the systemtap runtime libraries. Could there be a similar wrapper for the program counter/instruction pointer? There are three possible uses for it:

1) It would be use in the case where the same systemtap instrumentation code is used to multiple points. Allow the instrumentation code to determine which probe fired.

2) Tracking destinations of calls. Have a post_handler instrumetation look at the program counter to track the destination of indirect calls.

3) Tracking destination of jumps. For simple condition branch it would probably be easier just to instrument the target and the fall through. However for indirect jumps using jump tables, e.g. switch case, the same post_handler as for destinations of calls could be done. Have a probe that fires after executing the instruction.

-Will


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