include/x86-linux/Makefile
auxprogs/Makefile
coregrind/Makefile
- coregrind/m_demangle/Makefile
coregrind/m_aspacemgr/Makefile
+ coregrind/m_demangle/Makefile
+ coregrind/m_dispatch/Makefile
coregrind/m_replacemalloc/Makefile
coregrind/m_sigframe/Makefile
coregrind/m_syscalls/Makefile
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
MODULES = \
- m_demangle \
m_aspacemgr \
+ m_demangle \
+ m_dispatch \
m_replacemalloc \
m_sigframe \
m_syscalls
pub_core_aspacemgr.h \
pub_core_debuglog.h \
pub_core_demangle.h \
+ pub_core_dispatch.h \
pub_core_errormgr.h \
pub_core_execontext.h \
pub_core_mallocfree.h \
## libplatform.a must be before libarch.a and libos.a, it seems.
stage2_extra= \
+ m_dispatch/libdispatch.a \
m_demangle/libdemangle.a \
m_aspacemgr/libaspacemgr.a \
m_sigframe/libsigframe.a \
libarch_a_SOURCES = \
cpuid.S \
helpers.S \
- dispatch.S \
jmp_with_stack.c \
state.c
CLEANFILES = stage2.lds
libarch_a_SOURCES = \
- dispatch.S \
state.c
if USE_PIE
extern Addr VG_(reverse_search_one_symtab) ( const SegInfo* si, const Char* name );
-/* Set up some default redirects */
-extern void VG_(setup_code_redirect_table) ( void );
-
extern Bool VG_(resolve_redir_allsegs)(CodeRedirect *redir);
extern Bool VG_(use_CFI_info) ( /*MOD*/Addr* ipP,
/* ---------------------------------------------------------------------
Exports of vg_redir.c
------------------------------------------------------------------ */
+
/* Redirection machinery */
extern Addr VG_(code_redirect) ( Addr orig );
+/* Set up some default redirects */
+extern void VG_(setup_code_redirect_table) ( void );
+
extern void VG_(add_redirect_sym_to_addr)(const Char *from_lib,
const Char *from_sym,
Addr to_addr);
extern void VG_(sigreturn)(void);
-/* ---------------------------------------------------------------------
- Exports of vg_dispatch.S
- ------------------------------------------------------------------ */
-
-/* This subroutine is called from the C world. It is passed
- a pointer to the VEX guest state (arch.vex). It must run code
- from the instruction pointer in the guest state, and exit when
- VG_(dispatch_ctr) reaches zero, or we need to defer to the scheduler.
- The return value must indicate why it returned back to the scheduler.
- It can also be exited if the executing code throws a non-resumable
- signal, for example SIGSEGV, in which case control longjmp()s back past
- here.
-
- This code simply handles the common case fast -- when the translation
- address is found in the translation cache. For anything else, the
- scheduler does the work.
-*/
-extern UWord VG_(run_innerloop) ( void* guest_state );
-
/* ---------------------------------------------------------------------
Exports of vg_helpers.S
------------------------------------------------------------------ */
--- /dev/null
+include $(top_srcdir)/Makefile.all.am
+include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
+
+AM_CFLAGS = $(WERROR) -Wmissing-prototypes -Winline -Wall -Wshadow -O -g
+
+noinst_LIBRARIES = libdispatch.a
+
+## XXX: this won't work with "make dist" -- only one dispatch-XXX.S file
+## will be put in the tarball. Problem exists in various other Makefiles.
+libdispatch_a_SOURCES = \
+ dispatch-@VG_ARCH@.S
+
+if USE_PIE
+libdispatch_a_CFLAGS = $(AM_CFLAGS) -fpie
+else
+libdispatch_a_CFLAGS = $(AM_CFLAGS)
+endif
--- /dev/null
+
+/*--------------------------------------------------------------------*/
+/*--- The dispatcher. pub_core_dispatch.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ jseward@acm.org
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_CORE_DISPATCH_H
+#define __PUB_CORE_DISPATCH_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module deals with management of the entire process
+// address space. Almost everything depends upon it, including dynamic
+// memory management. Hence this module is almost completely
+// standalone; the only module it uses is m_debuglog. DO NOT CHANGE
+// THIS.
+//--------------------------------------------------------------------
+
+/* This subroutine is called from the C world. It is passed
+ a pointer to the VEX guest state (arch.vex). It must run code
+ from the instruction pointer in the guest state, and exit when
+ VG_(dispatch_ctr) reaches zero, or we need to defer to the scheduler.
+ The return value must indicate why it returned back to the scheduler.
+ It can also be exited if the executing code throws a non-resumable
+ signal, for example SIGSEGV, in which case control longjmp()s back past
+ here.
+
+ This code simply handles the common case fast -- when the translation
+ address is found in the translation cache. For anything else, the
+ scheduler does the work.
+*/
+extern UWord VG_(run_innerloop) ( void* guest_state );
+
+#endif // __PUB_CORE_DISPATCH_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
VG_USERREQ__DISCARD_TRANSLATIONS, and others */
#include "core.h"
+#include "pub_core_dispatch.h"
#include "pub_core_errormgr.h"
#include "pub_core_replacemalloc.h"
#include "pub_core_stacktrace.h"
libarch_a_SOURCES = \
cpuid.S \
helpers.S \
- dispatch.S \
jmp_with_stack.c \
state.c