Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR
@ 2007-11-13  7:52 David Daney
  2007-11-13 11:48 ` Andrew Haley
  2007-11-13 16:12 ` David Daney
  0 siblings, 2 replies; 20+ messages in thread
From: David Daney @ 2007-11-13  7:52 UTC (permalink / raw)
  To: linux-mips; +Cc: Richard Sandiford, gcc

With the current kernel (2.6.23.1) in my R5000 based O2 it seems 
impossible for GCC's exception unwinding machinery to unwind through 
signal frames.  The cause of the problems is the 
ICACHE_REFILLS_WORKAROUND_WAR which puts the sigcontext at an almost 
impossible to determine offset from the signal return trampoline.  The 
unwinder depends on being able to find the sigcontext given a known 
location of the trampoline.

It seems there are a couple of possible solutions:

1) The comments in war.h indicate the problem only exists in R7000 and 
E9000 processors.  We could turn off the workaround if the kernel is 
configured for R5000.  That would help me, but not those with the 
effected systems.

2) In the non-workaround case, the siginfo immediately follows the 
trampoline and the first member is the signal number.  For the 
workaround case the first word following the trampoline is zero.  We 
could replace this with the offset to the sigcontext which is always a 
small negative value.  The unwinder could then distinguish the two cases 
(signal numbers are positive and the offset negative).  If we did this, 
the change would have to be coordinated with GCC's unwinder (in 
libgcc_s.so.1).

Thoughts?

David Daney

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-11-17  8:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-13  7:52 Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR David Daney
2007-11-13 11:48 ` Andrew Haley
2007-11-13 12:10   ` Ralf Baechle
2007-11-13 13:14     ` Franck Bui-Huu
2007-11-13 14:00       ` Ralf Baechle
2007-11-13 14:22         ` Franck Bui-Huu
2007-11-13 15:01           ` Ralf Baechle
2007-11-13 22:11             ` Andrew Pinski
2007-11-13 14:37       ` Kevin D. Kissell
2007-11-13 14:37         ` Kevin D. Kissell
2007-11-13 14:49         ` Franck Bui-Huu
2007-11-13 15:08         ` Ralf Baechle
2007-11-13 22:49           ` Cannot unwind through MIPS signal frames withICACHE_REFILLS_WORKAROUND_WAR Kevin D. Kissell
2007-11-13 22:49             ` Kevin D. Kissell
2007-11-13 21:26       ` VDSO on mips (was Re: Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR) Franck Bui-Huu
2007-11-15  8:46     ` Cannot unwind through MIPS signal frames with ICACHE_REFILLS_WORKAROUND_WAR Franck Bui-Huu
2007-11-15 11:53       ` Ralf Baechle
2007-11-15 17:21         ` David Daney
2007-11-17  8:38           ` Franck Bui-Huu
2007-11-13 16:12 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox