+2009-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/i386/linux-unwind.h (x86_frob_update_context): New function.
+ (MD_FROB_UPDATE_CONTEXT): Define.
+
2009-11-12 Eric Botcazou <ebotcazou@adacore.com>
Laurent GUERBY <laurent@guerby.net>
fs->signal_frame = 1;
return _URC_NO_REASON;
}
+
+#define MD_FROB_UPDATE_CONTEXT x86_frob_update_context
+
+/* Fix up for kernels that have vDSO, but don't have S flag in it. */
+
+static void
+x86_frob_update_context (struct _Unwind_Context *context,
+ _Unwind_FrameState *fs ATTRIBUTE_UNUSED)
+{
+ unsigned char *pc = context->ra;
+
+ /* movl $__NR_rt_sigreturn,%eax ; {int $0x80 | syscall} */
+ if (*(unsigned char *)(pc+0) == 0xb8
+ && *(unsigned int *)(pc+1) == 173
+ && (*(unsigned short *)(pc+5) == 0x80cd
+ || *(unsigned short *)(pc+5) == 0x050f))
+ _Unwind_SetSignalFrame (context, 1);
+}
+
#endif /* not glibc 2.0 */
#endif /* ifdef __x86_64__ */
#endif /* ifdef inhibit_libc */