From 0d4f070b044c3fce9cd2830c432b2c9e14c6b034 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sun, 24 Apr 2005 14:31:29 +0000 Subject: [PATCH] Make amd64-linux build again after m_sigframe hackery. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3557 --- coregrind/amd64-linux/syscalls.c | 3 +- coregrind/m_sigframe/sigframe-amd64-linux.c | 37 ++++++++++----------- coregrind/m_sigframe/sigframe-x86-linux.c | 1 + 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/coregrind/amd64-linux/syscalls.c b/coregrind/amd64-linux/syscalls.c index a9b0ecf0d..66a1bd196 100644 --- a/coregrind/amd64-linux/syscalls.c +++ b/coregrind/amd64-linux/syscalls.c @@ -30,6 +30,7 @@ #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) */ @@ -545,7 +546,7 @@ PRE(sys_rt_sigreturn, Special) 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); diff --git a/coregrind/m_sigframe/sigframe-amd64-linux.c b/coregrind/m_sigframe/sigframe-amd64-linux.c index 2a7fa6275..e6fc53b4f 100644 --- a/coregrind/m_sigframe/sigframe-amd64-linux.c +++ b/coregrind/m_sigframe/sigframe-amd64-linux.c @@ -1,6 +1,7 @@ /*--------------------------------------------------------------------*/ -/*--- Arch-specific signals stuff. amd64/signals.c ---*/ +/*--- Create/destroy signal delivery frames. ---*/ +/*--- sigframe-amd64-linux.c ---*/ /*--------------------------------------------------------------------*/ /* @@ -29,6 +30,7 @@ */ #include "core.h" +#include "pub_core_sigframe.h" #include "libvex_guest_amd64.h" @@ -36,14 +38,9 @@ /* 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 @@ -478,11 +475,13 @@ static Addr build_rt_sigframe(ThreadState *tst, } -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; @@ -584,7 +583,7 @@ SizeT restore_rt_sigframe ( ThreadState *tst, } -void VGA_(signal_return)(ThreadId tid, Bool isRT) +void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) { Addr rsp; ThreadState* tst; @@ -673,7 +672,7 @@ void VGA_(signal_return)(ThreadId tid, Bool isRT) //:: { //:: VG_(memcpy)(xfpu, arch->m_sse.state, sizeof(*xfpu)); //:: } -//:: -//:: /*--------------------------------------------------------------------*/ -//:: /*--- end ---*/ -//:: /*--------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------*/ +/*--- end sigframe-amd64-linux.c ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_sigframe/sigframe-x86-linux.c b/coregrind/m_sigframe/sigframe-x86-linux.c index 889f0bbfe..07e00913b 100644 --- a/coregrind/m_sigframe/sigframe-x86-linux.c +++ b/coregrind/m_sigframe/sigframe-x86-linux.c @@ -31,6 +31,7 @@ #include "core.h" #include "pub_core_sigframe.h" + #include "libvex_guest_x86.h"