[hurd,commited] profil-counter: Add missing SIGINFO case
Commit Message
When SA_SIGINFO is available, sysdeps/posix/s?profil.c use it, so we have to
fix the __profil_counter function accordingly, using sigcontextinfo.h's
sigcontext_get_pc.
---
sysdeps/generic/profil-counter.h | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -19,8 +19,18 @@
/* In many Unix systems signal handlers are called like this
and the interrupted PC is easily findable in the `struct sigcontext'. */
+#ifdef SA_SIGINFO
+#include <sigcontextinfo.h>
+
+static void
+__profil_counter (int signr, siginfo_t *info, void *ctx)
+{
+ profil_count (sigcontext_get_pc (ctx));
+}
+#else
static void
__profil_counter (int signr, int code, struct sigcontext *scp)
{
profil_count ((uintptr_t) scp->sc_pc);
}
+#endif