[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd,commited] profil-counter: Add missing SIGINFO case
From: |
Samuel Thibault |
Subject: |
[hurd,commited] profil-counter: Add missing SIGINFO case |
Date: |
Mon, 21 Dec 2020 02:09:01 +0100 |
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(+)
diff --git a/sysdeps/generic/profil-counter.h b/sysdeps/generic/profil-counter.h
index 1fa7bc7653..da13e6aca9 100644
--- a/sysdeps/generic/profil-counter.h
+++ b/sysdeps/generic/profil-counter.h
@@ -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
--
2.29.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [hurd,commited] profil-counter: Add missing SIGINFO case,
Samuel Thibault <=