This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
runtime library wrapper for program counter
- From: William Cohen <wcohen at redhat dot com>
- To: mhunt <mhunt at redhat dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Wed, 23 Mar 2005 18:41:44 -0500
- Subject: 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