summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc/profil-counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/profil-counter.h')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/profil-counter.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/profil-counter.h b/sysdeps/unix/sysv/linux/powerpc/profil-counter.h
index fed0913574..4be6f11270 100644
--- a/sysdeps/unix/sysv/linux/powerpc/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/powerpc/profil-counter.h
@@ -17,10 +17,18 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <signal.h>
+#include <sys/ptrace.h>
+
+/* You can also do this by using
+ void
+ profil_counter (int signo, struct pt_regs *pt)
+ {
+ profil_count ((void *) pt->nip);
+ }
+ */
void
-profil_counter (int signo, struct sigcontext sc)
+profil_counter (int signo, void **regs)
{
- profil_count ((void *) sc.regs->nip);
+ profil_count (regs[PT_NIP]);
}