#include "core.h"
#include "ume.h" /* for jmp_with_stack */
+#include "pub_core_sigframe.h"
/* COPIED FROM /usr/include/asm-i386/prctl.h (amd64-linux) */
something goes wrong in the sigreturn */
VGA_(restart_syscall)(&tst->arch);
- VGA_(signal_return)(tid, True);
+ VG_(sigframe_destroy)(tid, True);
/* Keep looking for signals until there are none */
VG_(poll_signals)(tid);
/*--------------------------------------------------------------------*/
-/*--- Arch-specific signals stuff. amd64/signals.c ---*/
+/*--- Create/destroy signal delivery frames. ---*/
+/*--- sigframe-amd64-linux.c ---*/
/*--------------------------------------------------------------------*/
/*
*/
#include "core.h"
+#include "pub_core_sigframe.h"
#include "libvex_guest_amd64.h"
/* This module creates and removes signal frames for signal deliveries
on amd64-linux.
- FIXME: Note that this file is in the wrong place. It is marked as
- amd64 specific, but in fact it is specific to both amd64 and linux.
- There is nothing that ensures that (eg) amd64-netbsd will have the
- same signal frame layout as Linux.
-
- Note also, this file contains kernel-specific knowledge in the
- form of 'struct rt_sigframe'. How does that relate to the vki
- kernel interface stuff?
+ Note, this file contains kernel-specific knowledge in the form of
+ 'struct rt_sigframe'. How does that relate to the vki kernel
+ interface stuff?
A 'struct rtsigframe' is pushed onto the client's stack. This
contains a subsidiary vki_ucontext. That holds the vcpu's state
}
-void VGA_(push_signal_frame)(ThreadId tid, Addr rsp_top_of_frame,
- const vki_siginfo_t *siginfo,
- void *handler, UInt flags,
- const vki_sigset_t *mask,
- void *restorer)
+void VG_(sigframe_create)( ThreadId tid,
+ Addr rsp_top_of_frame,
+ const vki_siginfo_t *siginfo,
+ void *handler,
+ UInt flags,
+ const vki_sigset_t *mask,
+ void *restorer )
{
Addr rsp;
struct rt_sigframe *frame;
}
-void VGA_(signal_return)(ThreadId tid, Bool isRT)
+void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
{
Addr rsp;
ThreadState* tst;
//:: {
//:: VG_(memcpy)(xfpu, arch->m_sse.state, sizeof(*xfpu));
//:: }
-//::
-//:: /*--------------------------------------------------------------------*/
-//:: /*--- end ---*/
-//:: /*--------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------*/
+/*--- end sigframe-amd64-linux.c ---*/
+/*--------------------------------------------------------------------*/