[CTRACER]: Cast object to (long)

systemtap represents this as uint64_t, casting this to (void *) is not
allowed by the compiler, and as we know that this _is_ a pointer going thru
hops in systemtap, cast it back to (long) that will make this work on both
64 and 32 bit arches as sizeof(long) = sizeof(void *).

Fugly, have to learn more about systemtap internals...

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-11-15 14:48:52 -02:00
parent 78ca65d6e1
commit d610140e7b

View File

@ -763,7 +763,10 @@ failure:
"%}\n"
"function ctracer__method_hook(probe_type, func, object, state_len)\n"
"%{\n"
"\tctracer__method_hook(_stp_gettimeofday_ns(), THIS->probe_type, THIS->func, (void *)THIS->object, THIS->state_len);\n"
"\tctracer__method_hook(_stp_gettimeofday_ns(), "
"THIS->probe_type, THIS->func, "
"(void *)(long)THIS->object, "
"THIS->state_len);\n"
"%}\n\n", fp_methods);
fputs("\n#include \"ctracer_classes.h\"\n\n", fp_collector);