issue with SIGPROF signal handler on ARM

Arvind Ayyangar arvind.ayyangar@gmail.com
Wed Oct 10 11:39:00 GMT 2007


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



More information about the Libc-alpha mailing list