From: Nicholas Nethercote Date: Fri, 13 May 2005 23:11:40 +0000 (+0000) Subject: Modularised vg_translate.c as m_translate. X-Git-Tag: svn/VALGRIND_3_0_0~618 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a08637efe9382d00a626590b6a70f0d50e28b338;p=thirdparty%2Fvalgrind.git Modularised vg_translate.c as m_translate. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3700 --- diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index dd73421dce..060ff9dbba 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -78,6 +78,7 @@ stage2_SOURCES = \ m_skiplist.c \ m_stacktrace.c \ m_tooliface.c \ + m_translate.c \ ume.c \ \ vg_scheduler.c \ @@ -94,7 +95,6 @@ stage2_SOURCES = \ vg_dwarf.c \ vg_stabs.c \ vg_symtypes.c \ - vg_translate.c \ vg_transtab.c ## libplatform.a must be before libarch.a and libos.a, it seems. diff --git a/coregrind/core.h b/coregrind/core.h index 3daf0439f8..6ac1166f41 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -633,16 +633,6 @@ extern void VG_(env_remove_valgrind_env_stuff) ( Char** env ); extern void VG_(nanosleep)(struct vki_timespec *); -/* --------------------------------------------------------------------- - Exports of vg_translate.c - ------------------------------------------------------------------ */ - -extern -Bool VG_(translate) ( ThreadId tid, - Addr64 orig_addr, - Bool debugging_translation, - Int debugging_verbosity ); - /* --------------------------------------------------------------------- Exports of vg_symtab2.c ------------------------------------------------------------------ */ diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c index 264e03f1c6..c260874383 100644 --- a/coregrind/m_errormgr.c +++ b/coregrind/m_errormgr.c @@ -33,6 +33,7 @@ #include "pub_core_execontext.h" #include "pub_core_stacktrace.h" #include "pub_core_tooliface.h" +#include "pub_core_translate.h" /*------------------------------------------------------------*/ /*--- Globals ---*/ diff --git a/coregrind/vg_translate.c b/coregrind/m_translate.c similarity index 99% rename from coregrind/vg_translate.c rename to coregrind/m_translate.c index 0fa409ab5e..fa717dab5a 100644 --- a/coregrind/vg_translate.c +++ b/coregrind/m_translate.c @@ -1,7 +1,7 @@ /*--------------------------------------------------------------------*/ /*--- The JITter proper: register allocation & code improvement ---*/ -/*--- vg_translate.c ---*/ +/*--- m_translate.c ---*/ /*--------------------------------------------------------------------*/ /* @@ -508,6 +508,6 @@ Bool VG_(translate) ( ThreadId tid, } /*--------------------------------------------------------------------*/ -/*--- end vg_translate.c ---*/ +/*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/pub_core_translate.h b/coregrind/pub_core_translate.h new file mode 100644 index 0000000000..d74f23c104 --- /dev/null +++ b/coregrind/pub_core_translate.h @@ -0,0 +1,49 @@ + +/*--------------------------------------------------------------------*/ +/*--- The JITter wrapper. pub_core_translate.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_TRANSLATE_H +#define __PUB_CORE_TRANSLATE_H + +//-------------------------------------------------------------------- +// PURPOSE: This module is Valgrind's interface to the JITter. It's +// basically a wrapper around Vex. +//-------------------------------------------------------------------- + +extern +Bool VG_(translate) ( ThreadId tid, + Addr64 orig_addr, + Bool debugging_translation, + Int debugging_verbosity ); + +#endif // __PUB_CORE_TRANSLATE_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 1ff2b823c5..97e10646a6 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -66,6 +66,7 @@ #include "pub_core_stacktrace.h" #include "pub_core_syscalls.h" #include "pub_core_tooliface.h" +#include "pub_core_translate.h" #include "vki_unistd.h" /* --------------------------------------------------------------------- diff --git a/coregrind/vg_transtab.c b/coregrind/vg_transtab.c index 535184d0d4..68ccb6c440 100644 --- a/coregrind/vg_transtab.c +++ b/coregrind/vg_transtab.c @@ -31,6 +31,7 @@ #include "core.h" #include "pub_core_tooliface.h" +#include "pub_core_translate.h" /* #define DEBUG_TRANSTAB */