Skip to contentSkip to conversation

Problem trying to find secondary mode switches.

Xenomai-help Gilles Chanteperdrix 2 participants 2 messages Jun 1, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I am using the XNTRAPSW option to try and find secondary mode switches in some piece of code for which I do not have the sources. I have installed the usual signal handler which dumps the backtrace, just as in ksrc/skins/native/snippet/sigxcpu.c. But the problem is that the backtrace is not helpful, it show addresses in libpthread and libpthread_rt global destructor sections.

By adding some printks in shadow.c I know that what causes the mode switch is the linux arm syscall 78 aka gettimeofday.

So, my question is: is there any chance that the signal sent by send_sig in xnshadow_relax could be received by another thread than send_sig target ? If not, where should I look for the reason of this wrong backtrace ?

Signature · 1 line
                                                 Gilles Chanteperdrix
#1 lore raw

Hi,

Quoted 4 lines

[...]
So, my question is: is there any chance that the signal sent by send_sig in xnshadow_relax could be received by another thread than send_sig target ?

Nop, as far as I can see. Anyway, you can easily verify it by printing current->pid for the send_sig()'s target in xnshadow_relax() and calling gettid() (not getpid()) in your signal handler.

Quoted 2 lines

If not, where should I look for the reason of this wrong backtrace ?

Are you sure backtrace() is always workable on ARM? I just know that it's not a case for MIPS..

Quoted 3 lines

--
Gilles Chanteperdrix

Signature · 2 lines
Best regards,
Dmitry Adamushko