X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Fwrapper%2Fkprobes.h;h=51d32b7cc225981efb0bde2785b953bf3bc26d8b;hb=3c46ddc134621dba65030263aa321dd6bdae3ba3;hp=b546d615dce45a56142fa71b502c1ecd5fb5e619;hpb=369d82bb1746447514c877088d7c5fd0f39140f8;p=lttng-modules.git diff --git a/include/wrapper/kprobes.h b/include/wrapper/kprobes.h index b546d615..51d32b7c 100644 --- a/include/wrapper/kprobes.h +++ b/include/wrapper/kprobes.h @@ -29,4 +29,21 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri) #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */ + +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) +static inline +unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri) +{ + return get_kretprobe_retaddr(ri); +} + +#else + +static inline +unsigned long lttng_get_kretprobe_retaddr(struct kretprobe_instance *ri) +{ + return (unsigned long) ri->ret_addr; +} +#endif + #endif /* _LTTNG_WRAPPER_KPROBES_H */