This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: issue with SIGPROF signal handler on ARM
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Arvind Ayyangar" <arvind dot ayyangar at gmail dot com>
- Cc: libc-ports at sourceware dot org
- Date: Thu, 11 Oct 2007 09:43:42 -0400
- Subject: Re: issue with SIGPROF signal handler on ARM
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Po8JmyHUAvfQPPKlD+cD2bWL4f4USynoYdqWOigO6c0=; b=hDEnd46p0VGwY4NGGQ+scBBlEzU/UDUcBuWLEMefYPMm4M6nsJeYNdOUn2V2bg5+VNUjjxa99f4R57LQNMmTsESp2ivPKoaSv96StkVWHWlFFAA7I1EpIuhoCfeoxceLVK8k5Dm7ZMykCed4YX6o+5yh7B9J1V6zLFXyOMiyAJM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=JOfpGljUCUtcSVs4UJP4yjl+qq3CbudsqWOralEdeBurveSV4xxQEAzqhCsShP3/GvEVs/9zEmqmxaqE/EC1oLSlMF4ow70rH0kpgzz7TmRk/Wul0et1dNpKBgtvoHETPagqDLuPyaY7gEgSvtSdtNV/DmO27jF0L4Hf8Y1C3vc=
- References: <c34bb56f0710100535i6db080b3vf0222c95a815879f@mail.gmail.com>
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.