This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
issue with SIGPROF signal handler on ARM
- From: "Arvind Ayyangar" <arvind dot ayyangar at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 10 Oct 2007 17:09:35 +0530
- Subject: issue with SIGPROF signal handler on ARM
Hi,
I am using glibc-2.3.6 on ARM. I tried using sprof to profile some
of my libraries but none of the libraries gave me any time
information. Looking into more detail, i realized that the PC value
passed to the signal handler (profil_count) was incorrect.
I changed the prototype of profil_counter from
profil_counter (int signo, int _a2, int _a3, int _a4, union
k_sigcontext sc) to
profil_counter (int signo, siginfo_t *sig_info, struct sigcontext
*scp) and passed the pc value stored in ((struct ucontext *)
scp)->uc_mcontext.arm_pc. Here, the PC value passed to the signal
handler seems to be as expected.
Does the kernel fill the register values in the k_sigcontext structure ?
--
Thanks and Regards
Arvind