Date: Sat, 20 Apr 2024 20:22:49 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278489] dtrace; pid probe; unable to match constructor functions Message-ID: <bug-278489-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278489 Bug ID: 278489 Summary: dtrace; pid probe; unable to match constructor functions Product: Base System Version: 14.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: martin@bxlr.sk It seems dtrace on FreeBSD is not matching constructor functions during execution. Very simple test program: #include <stdio.h> void __attribute__((constructor)) myinit() { printf("%s: hello\n", __func__); } int main() { return 42; } Listing the probes works as expected: # dtrace -ln 'pid$target:a.out::entry' -c ./simple myinit: hello ID PROVIDER MODULE FUNCTION NAME 82966 pid5454 simple __do_global_dtors_aux entry 82967 pid5454 simple register_classes entry 82968 pid5454 simple __do_global_ctors_aux entry 82969 pid5454 simple _start entry 82970 pid5454 simple main entry 82971 pid5454 simple myinit entry But when I run it: # dtrace -n 'pid$target:a.out::entry' -c ./simple myinit: hello dtrace: description 'pid$target:a.out::entry' matched 6 probes dtrace: pid 5458 exited with status 42 CPU ID FUNCTION:NAME 1 82969 _start:entry 1 82970 main:entry 1 82966 __do_global_dtors_aux:entry myinit() is not matched. This works on Solaris where constructor functions are properly matched. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278489-227>