This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: issue with SIGPROF signal handler on ARM


On 10/10/07, Arvind Ayyangar <arvind.ayyangar@gmail.com> wrote:
> 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  ?

Yes, the kernel fills the register values in the sigcontext structure
passed to the signal handler.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]