public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] profil-counter: Add missing SIGINFO case
@ 2020-12-21 1:08 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-12-21 1:08 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=53432762ac2ff24794089e2c767b976e54c2dc0a
commit 53432762ac2ff24794089e2c767b976e54c2dc0a
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon Dec 21 02:02:47 2020 +0100
profil-counter: Add missing SIGINFO case
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.
Diff:
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-21 1:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 1:08 [glibc] profil-counter: Add missing SIGINFO case Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).