digitalmars.D - member functions call tracer
- shinichiro.h (26/26) Feb 16 2008 Hi,
Hi,
I wrote a toy program which enables us to record function calls.
http://shinh.skr.jp/d/tracer.tgz
Example:
% cat example.d
import tracer;
class C {
void f() {
g();
}
void g() {
}
}
void main() {
initTracer();
C c = new C();
c.f();
}
% dmd example.d tracer.d
gcc-3.4 example.o tracer.o -o example -m32 -lphobos2 -lpthread -lm
% example
% ./dumptrace example
void example.C.f() 0804a382 (from _Dmain 0804a3bc)
void example.C.g() 0804a394 (from void example.C.f() 0804a38a)
Because this program uses invariant functions as hook functions, this
program cannot trace global/static functions.
Feb 16 2008








shinichiro.h <dng shinh.skr.jp>