Author: njn
Date: 2005-05-10 05:37:01 +0100 (Tue, 10 May 2005)
New Revision: 3652
Added:
trunk/coregrind/m_tooliface.c
trunk/coregrind/pub_core_tooliface.h
trunk/include/pub_tool_tooliface.h
Removed:
trunk/coregrind/vg_needs.c
Modified:
trunk/cachegrind/cg_main.c
trunk/corecheck/cc_main.c
trunk/coregrind/Makefile.am
trunk/coregrind/amd64/state.c
trunk/coregrind/core.h
trunk/coregrind/linux/core_os.c
trunk/coregrind/linux/sema.c
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
trunk/coregrind/m_sigframe/sigframe-x86-linux.c
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-linux.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/m_syscalls/syscalls.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/coregrind/vg_main.c
trunk/coregrind/vg_mylibc.c
trunk/coregrind/vg_scheduler.c
trunk/coregrind/vg_signals.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/vg_symtypes.c
trunk/coregrind/vg_translate.c
trunk/coregrind/vg_transtab.c
trunk/coregrind/x86-linux/ldt.c
trunk/coregrind/x86/state.c
trunk/helgrind/hg_main.c
trunk/include/Makefile.am
trunk/include/tool.h
trunk/lackey/lk_main.c
trunk/massif/ms_main.c
trunk/memcheck/mac_shared.h
trunk/none/nl_main.c
Log:
Modularised the core/tool interface ('details', 'needs' and VG_(tdict))
into a new module m_tooliface. Pretty straightforward. Touches a lot
of files because many files use this interface and so need to include
the headers for the new module.
Modified: trunk/cachegrind/cg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg_main.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/cachegrind/cg_main.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -31,6 +31,7 @@
=20
#include "tool.h"
#include "pub_tool_mallocfree.h"
+#include "pub_tool_tooliface.h"
=20
#include "cg_arch.h"
#include "cg_sim.c"
Modified: trunk/corecheck/cc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/corecheck/cc_main.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/corecheck/cc_main.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -30,6 +30,7 @@
*/
=20
#include "tool.h"
+#include "pub_tool_tooliface.h"
=20
static void cc_post_clo_init(void)
{
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/Makefile.am 2005-05-10 04:37:01 UTC (rev 3652)
@@ -46,6 +46,7 @@
pub_core_sigframe.h \
pub_core_stacktrace.h \
pub_core_syscalls.h \
+ pub_core_tooliface.h \
ume.h \
vg_symtab2.h \
vg_symtypes.h
@@ -65,11 +66,12 @@
valgrind_LDADD=3D
=20
stage2_SOURCES =3D \
+ m_debuglog.c \
m_errormgr.c \
m_execontext.c \
m_mallocfree.c \
m_stacktrace.c \
- m_debuglog.c \
+ m_tooliface.c \
ume.c \
\
vg_scheduler.c \
@@ -78,7 +80,6 @@
vg_main.c \
vg_messages.c \
vg_mylibc.c \
- vg_needs.c \
vg_dummy_profile.c \
vg_signals.c \
vg_symtab2.c \
Modified: trunk/coregrind/amd64/state.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64/state.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/amd64/state.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -7,8 +7,8 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
=20
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
=20
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -29,6 +29,7 @@
*/
=20
#include "core.h"
+#include "pub_core_tooliface.h"
#include "amd64_private.h"
#include <sys/ptrace.h>
=20
@@ -236,4 +237,3 @@
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
-
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/core.h 2005-05-10 04:37:01 UTC (rev 3652)
@@ -299,165 +299,6 @@
=20
=20
/* ---------------------------------------------------------------------
- Tool-related types
- ------------------------------------------------------------------ */
-/* These structs are not exposed to tools to mitigate possibility of
- binary-incompatibilities when the core/tool interface changes. Inste=
ad,
- set functions are provided (see include/tool.h). */
-typedef
- struct {
- Char* name;
- Char* version;
- Char* description;
- Char* copyright_author;
- Char* bug_reports_to;
- UInt avg_translation_sizeB;
- }
- VgDetails;
-
-extern VgDetails VG_(details);
-
-typedef
- struct {
- Bool libc_freeres;
- Bool core_errors;
- Bool tool_errors;
- Bool basic_block_discards;
- Bool no_longer_used_1; // for backwards compatibility
- Bool command_line_options;
- Bool client_requests;
- Bool no_longer_used_0; // for backwards compatibility
- Bool syscall_wrapper;
- Bool sanity_checks;
- Bool data_syms;
- Bool shadow_memory;
- }=20
- VgNeeds;
-
-extern VgNeeds VG_(needs);
-
-typedef struct {
- // ---------------------------------------------
- // 'Needs' and related functions
- // ---------------------------------------------
- // Basic functions
- void (*tool_pre_clo_init) (void);
- void (*tool_post_clo_init)(void);
- IRBB* (*tool_instrument) (IRBB*, VexGuestLayout*, IRType, IRType);
- void (*tool_fini) (Int);
-
- // VG_(needs).core_errors
- // (none)
- =20
- // VG_(needs).tool_errors
- Bool (*tool_eq_Error) (VgRes, Error*, Error*);
- void (*tool_pp_Error) (Error*);
- UInt (*tool_update_extra) (Error*);
- Bool (*tool_recognised_suppression) (Char*, Supp*);
- Bool (*tool_read_extra_suppression_info) (Int, Char*, Int, Supp*);
- Bool (*tool_error_matches_suppression) (Error*, Supp*);
- Char* (*tool_get_error_name) (Error*);
- void (*tool_print_extra_suppression_info)(Error*);
-
- // VG_(needs).basic_block_discards
- void (*tool_discard_basic_block_info)(Addr, SizeT);
-
- // VG_(needs).command_line_options
- Bool (*tool_process_cmd_line_option)(Char*);
- void (*tool_print_usage) (void);
- void (*tool_print_debug_usage) (void);
-
- // VG_(needs).client_requests
- Bool (*tool_handle_client_request)(ThreadId, UWord*, UWord*);
-
- // VG_(needs).syscall_wrapper
- void (*tool_pre_syscall) (ThreadId, UInt);
- void (*tool_post_syscall)(ThreadId, UInt, Int);
-
- // VG_(needs).sanity_checks
- Bool (*tool_cheap_sanity_check)(void);
- Bool (*tool_expensive_sanity_check)(void);
-
- // ---------------------------------------------
- // Event tracking functions
- // ---------------------------------------------
- void (*track_new_mem_startup) (Addr, SizeT, Bool, Bool, Bool);
- void (*track_new_mem_stack_signal)(Addr, SizeT);
- void (*track_new_mem_brk) (Addr, SizeT);
- void (*track_new_mem_mmap) (Addr, SizeT, Bool, Bool, Bool);
-
- void (*track_copy_mem_remap) (Addr, Addr, SizeT);
- void (*track_change_mem_mprotect) (Addr, SizeT, Bool, Bool, Bool);
- void (*track_die_mem_stack_signal)(Addr, SizeT);
- void (*track_die_mem_brk) (Addr, SizeT);
- void (*track_die_mem_munmap) (Addr, SizeT);
-
- VGA_REGPARM(1) void (*track_new_mem_stack_4) (Addr);
- VGA_REGPARM(1) void (*track_new_mem_stack_8) (Addr);
- VGA_REGPARM(1) void (*track_new_mem_stack_12)(Addr);
- VGA_REGPARM(1) void (*track_new_mem_stack_16)(Addr);
- VGA_REGPARM(1) void (*track_new_mem_stack_32)(Addr);
- void (*track_new_mem_stack)(Addr, SizeT);
-
- VGA_REGPARM(1) void (*track_die_mem_stack_4) (Addr);
- VGA_REGPARM(1) void (*track_die_mem_stack_8) (Addr);
- VGA_REGPARM(1) void (*track_die_mem_stack_12)(Addr);
- VGA_REGPARM(1) void (*track_die_mem_stack_16)(Addr);
- VGA_REGPARM(1) void (*track_die_mem_stack_32)(Addr);
- void (*track_die_mem_stack)(Addr, SizeT);
-
- void (*track_ban_mem_stack)(Addr, SizeT);
-
- void (*track_pre_mem_read) (CorePart, ThreadId, Char*, Addr, Si=
zeT);
- void (*track_pre_mem_read_asciiz)(CorePart, ThreadId, Char*, Addr);
- void (*track_pre_mem_write) (CorePart, ThreadId, Char*, Addr, Si=
zeT);
- void (*track_post_mem_write) (CorePart, ThreadId, Addr, SizeT);
-
- void (*track_pre_reg_read) (CorePart, ThreadId, Char*, OffT, SizeT);
- void (*track_post_reg_write)(CorePart, ThreadId, OffT, SizeT);
- void (*track_post_reg_write_clientcall_return)(ThreadId, OffT, SizeT,=
Addr);
-
- void (*track_thread_run)(ThreadId);
-
- void (*track_post_thread_create)(ThreadId, ThreadId);
- void (*track_post_thread_join) (ThreadId, ThreadId);
-
- void (*track_pre_mutex_lock) (ThreadId, void*);
- void (*track_post_mutex_lock) (ThreadId, void*);
- void (*track_post_mutex_unlock)(ThreadId, void*);
-
- void (*track_pre_deliver_signal) (ThreadId, Int sigNo, Bool);
- void (*track_post_deliver_signal)(ThreadId, Int sigNo);
-
- void (*track_init_shadow_page)(Addr);
-
- // ---------------------------------------------
- // malloc/free replacements
- // ---------------------------------------------
- void* (*malloc_malloc) (ThreadId, SizeT);
- void* (*malloc___builtin_new) (ThreadId, SizeT);
- void* (*malloc___builtin_vec_new) (ThreadId, SizeT);
- void* (*malloc_memalign) (ThreadId, SizeT, SizeT);
- void* (*malloc_calloc) (ThreadId, SizeT, SizeT);
- void (*malloc_free) (ThreadId, void*);
- void (*malloc___builtin_delete) (ThreadId, void*);
- void (*malloc___builtin_vec_delete)(ThreadId, void*);
- void* (*malloc_realloc) (ThreadId, void*, SizeT);
-
-} VgToolInterface;
-
-extern VgToolInterface VG_(tdict);
-
-
-
-/* ---------------------------------------------------------------------
- Exports of vg_needs.c
- ------------------------------------------------------------------ */
-
-void VG_(sanity_check_needs)(void);
-
-
-/* ---------------------------------------------------------------------
Exports of vg_intercept.c
------------------------------------------------------------------ */
=20
@@ -1110,25 +951,6 @@
extern const Int VG_(tramp_gettimeofday_offset);
extern const Int VG_(tramp_time_offset);
=20
-/* ---------------------------------------------------------------------
- Things relating to the used tool
- ------------------------------------------------------------------ */
-
-// Note the use of C's comma operator here -- it means that we execute b=
oth
-// statements, and the rvalue of the whole thing is the rvalue of the la=
st
-// statement. This lets us say "x =3D VG_TDICT_CALL(...)" in the requir=
ed
-// places, while still checking the assertion.
-#define VG_TDICT_CALL(fn, args...) \
- ( tl_assert2(VG_(tdict).fn, \
- "you forgot to set VgToolInterface function '" #fn "'"),=
\
- VG_(tdict).fn(args) )
-
-#define VG_TRACK(fn, args...) \
- do { \
- if (VG_(tdict).track_##fn) \
- VG_(tdict).track_##fn(args); \
- } while(0)
-
// ---------------------------------------------------------------------
// Architecture-specific things defined in eg. x86/*.c
// ---------------------------------------------------------------------
Modified: trunk/coregrind/linux/core_os.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/core_os.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/linux/core_os.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -1,4 +1,35 @@
+
+/*--------------------------------------------------------------------*/
+/*--- OS-specific stuff. linux/core_os.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Nicholas Nethercote
+ nj...@va...
+
+ 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.
+*/
+
#include "core.h"
+#include "pub_core_tooliface.h"
=20
void VGA_(os_state_clear)(ThreadState *tst)
{
@@ -169,3 +200,7 @@
=20
return handled;
}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/linux/sema.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/sema.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/linux/sema.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -1,3 +1,34 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Semaphore stuff. linux/sema.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+ (except where noted below)
+
+ 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.
+*/
+
#include "core.h"
=20
#if FUTEX_SEMA
@@ -6,9 +37,8 @@
=20
Taken from futex-2.2/usersem.c
Based on work by Matthew Kirkwood <ma...@ha...>.=20
- */
+*/
=20
-
#define FUTEX_PASSED (-(1024 * 1024 * 1024))
=20
static inline Int sys_futex(Int *futex, Int op, Int val, struct vki_time=
spec *rel)
@@ -110,3 +140,9 @@
}
=20
#endif /* FUTEX_SEMA */
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
+
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-05-10 03:01:23 UTC (rev =
3651)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-05-10 04:37:01 UTC (rev =
3652)
@@ -33,6 +33,7 @@
#include "core.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
=20
=20
/* Define to debug the memory-leak-detector. */
Modified: trunk/coregrind/m_errormgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_errormgr.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/m_errormgr.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -32,6 +32,7 @@
#include "pub_core_errormgr.h"
#include "pub_core_execontext.h"
#include "pub_core_stacktrace.h"
+#include "pub_core_tooliface.h"
=20
/*------------------------------------------------------------*/
/*--- Globals ---*/
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-05-10 03:01:23=
UTC (rev 3651)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-05-10 04:37:01=
UTC (rev 3652)
@@ -30,8 +30,9 @@
*/
=20
#include "core.h"
+#include "pub_core_aspacemgr.h"
#include "pub_core_sigframe.h"
-#include "pub_core_aspacemgr.h"
+#include "pub_core_tooliface.h"
=20
#include "libvex_guest_amd64.h"
=20
Modified: trunk/coregrind/m_sigframe/sigframe-x86-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-05-10 03:01:23 U=
TC (rev 3651)
+++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-05-10 04:37:01 U=
TC (rev 3652)
@@ -30,10 +30,10 @@
*/
=20
#include "core.h"
+#include "pub_core_aspacemgr.h" /* find_segment */
#include "pub_core_sigframe.h"
-#include "pub_core_aspacemgr.h" /* find_segment */
+#include "pub_core_tooliface.h"
=20
-
#include "libvex_guest_x86.h"
=20
=20
Modified: trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-05-10 03:01:23=
UTC (rev 3651)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-05-10 04:37:01=
UTC (rev 3652)
@@ -33,6 +33,7 @@
#include "pub_core_aspacemgr.h"
#include "pub_core_sigframe.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
#include "priv_syscalls.h"
=20
=20
Modified: trunk/coregrind/m_syscalls/syscalls-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-linux.c 2005-05-10 03:01:23 UTC (=
rev 3651)
+++ trunk/coregrind/m_syscalls/syscalls-linux.c 2005-05-10 04:37:01 UTC (=
rev 3652)
@@ -30,6 +30,7 @@
=20
#include "core.h"
#include "pub_core_aspacemgr.h"
+#include "pub_core_tooliface.h"
#include "priv_syscalls.h"
=20
/* ---------------------------------------------------------------------
Modified: trunk/coregrind/m_syscalls/syscalls-x86-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-05-10 03:01:23 U=
TC (rev 3651)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-05-10 04:37:01 U=
TC (rev 3652)
@@ -38,6 +38,7 @@
#include "pub_core_aspacemgr.h"
#include "pub_core_sigframe.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
#include "priv_syscalls.h"
=20
=20
Modified: trunk/coregrind/m_syscalls/syscalls.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls.c 2005-05-10 03:01:23 UTC (rev 36=
51)
+++ trunk/coregrind/m_syscalls/syscalls.c 2005-05-10 04:37:01 UTC (rev 36=
52)
@@ -32,6 +32,7 @@
#include "pub_core_aspacemgr.h"
#include "pub_core_stacktrace.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
#include "priv_syscalls.h"
=20
=20
Copied: trunk/coregrind/m_tooliface.c (from rev 3648, trunk/coregrind/vg_=
needs.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_needs.c 2005-05-10 02:47:21 UTC (rev 3648)
+++ trunk/coregrind/m_tooliface.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -0,0 +1,337 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Stuff relating to tool data structures. ---*/
+/*--- vg_needs.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Nicholas Nethercote
+ nj...@va...
+
+ 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.
+*/
+
+#include "core.h"
+#include "pub_core_tooliface.h"
+
+// The core/tool dictionary of functions (initially zeroed, as we want i=
t)
+VgToolInterface VG_(tdict);
+
+/*--------------------------------------------------------------------*/
+/* Setting basic functions */
+
+void VG_(basic_tool_funcs)(
+ void(*post_clo_init)(void),
+ IRBB*(*instrument)(IRBB*, VexGuestLayout*, IRType, IRType ),
+ void(*fini)(Int)
+)
+{
+ VG_(tdict).tool_post_clo_init =3D post_clo_init;
+ VG_(tdict).tool_instrument =3D instrument;
+ VG_(tdict).tool_fini =3D fini;
+}
+
+
+/*--------------------------------------------------------------------*/
+/* Setting details */
+
+/* Init with default values. */
+VgDetails VG_(details) =3D {
+ .name =3D NULL,
+ .version =3D NULL,
+ .description =3D NULL,
+ .copyright_author =3D NULL,
+ .bug_reports_to =3D NULL,
+ .avg_translation_sizeB =3D VG_DEFAULT_TRANS_SIZEB,
+};
+
+/* Use macro because they're so repetitive */
+#define DETAILS(type, detail) \
+ extern void VG_(details_##detail)(type detail) \
+ { \
+ VG_(details).detail =3D detail; \
+ }
+
+DETAILS(Char*, name)
+DETAILS(Char*, version)
+DETAILS(Char*, description)
+DETAILS(Char*, copyright_author)
+DETAILS(Char*, bug_reports_to)
+DETAILS(UInt, avg_translation_sizeB)
+
+
+/*--------------------------------------------------------------------*/
+/* Setting needs */
+
+VgNeeds VG_(needs) =3D {
+ .core_errors =3D False,
+ .tool_errors =3D False,
+ .libc_freeres =3D False,
+ .basic_block_discards =3D False,
+ .no_longer_used_1 =3D False,
+ .command_line_options =3D False,
+ .client_requests =3D False,
+ .no_longer_used_0 =3D False,
+ .syscall_wrapper =3D False,
+ .sanity_checks =3D False,
+ .data_syms =3D False,
+ .shadow_memory =3D False,
+};
+
+/* static */
+void VG_(sanity_check_needs) ( void)
+{
+#define CHECK_NOT(var, value) \
+ if ((var)=3D=3D(value)) { \
+ VG_(printf)("\nTool error: `%s' not initialised\n", \
+ VG_STRINGIFY(var)); \
+ VG_(tool_panic)("Uninitialised details field\n"); \
+ }
+ =20
+ /* Ones that must be set */
+ CHECK_NOT(VG_(details).name, NULL);
+ /* Nb: .version can be NULL */
+ CHECK_NOT(VG_(details).description, NULL);
+ CHECK_NOT(VG_(details).copyright_author, NULL);
+ CHECK_NOT(VG_(details).bug_reports_to, NULL);
+
+ if ( (VG_(tdict).track_new_mem_stack_4 ||
+ VG_(tdict).track_new_mem_stack_8 ||
+ VG_(tdict).track_new_mem_stack_12 ||
+ VG_(tdict).track_new_mem_stack_16 ||
+ VG_(tdict).track_new_mem_stack_32 ) &&
+ ! VG_(tdict).track_new_mem_stack)=20
+ {
+ VG_(printf)("\nTool error: one of the specialised `new_mem_stack_n=
'\n"
+ "events tracked, but not the generic `new_mem_stack' o=
ne.\n");
+ VG_(tool_panic)("`new_mem_stack' should be defined\n");
+ }
+
+ if ( (VG_(tdict).track_die_mem_stack_4 ||
+ VG_(tdict).track_die_mem_stack_8 ||
+ VG_(tdict).track_die_mem_stack_12 ||
+ VG_(tdict).track_die_mem_stack_16 ||
+ VG_(tdict).track_die_mem_stack_32 ) &&
+ ! VG_(tdict).track_die_mem_stack)=20
+ {
+ VG_(printf)("\nTool error: one of the specialised `die_mem_stack_n=
'\n"
+ "events tracked, but not the generic `die_mem_stack' o=
ne.\n");
+ VG_(tool_panic)("`die_mem_stack' should be defined\n");
+ }
+
+ if (VG_(needs).shadow_memory !=3D (VG_(get_shadow_size)() !=3D 0)) {
+ if (VG_(get_shadow_size)() !=3D 0)
+ VG_(printf)("\nTool error: tool allocated shadow memory, but apparentl=
y doesn't "
+ "need it.\n");
+ else
+ VG_(printf)("\nTool error: tool didn't allocate shadow memory, but app=
arently "
+ "needs it.\n");
+ VG_(tool_panic)("VG_(needs).shadow_memory need should be set to ma=
tch 'shadow_ratio'\n");
+ }
+
+#undef CHECK_NOT
+}
+
+/* Use macro because they're so repetitive */
+#define NEEDS(need) \
+ extern void VG_(needs_##need)(void) \
+ { \
+ VG_(needs).need =3D True; \
+ }
+
+// These ones don't require any tool-supplied functions
+NEEDS(libc_freeres)
+NEEDS(core_errors)
+NEEDS(data_syms)
+NEEDS(shadow_memory)
+
+void VG_(needs_basic_block_discards)(
+ void (*discard)(Addr, SizeT)
+)
+{
+ VG_(needs).basic_block_discards =3D True;
+ VG_(tdict).tool_discard_basic_block_info =3D discard;
+}
+
+void VG_(needs_tool_errors)(
+ Bool (*eq) (VgRes, Error*, Error*),
+ void (*pp) (Error*),
+ UInt (*update) (Error*),
+ Bool (*recog) (Char*, Supp*),
+ Bool (*read_extra) (Int, Char*, Int, Supp*),
+ Bool (*matches) (Error*, Supp*),
+ Char* (*name) (Error*),
+ void (*print_extra)(Error*)
+)
+{
+ VG_(needs).tool_errors =3D True;
+ VG_(tdict).tool_eq_Error =3D eq;
+ VG_(tdict).tool_pp_Error =3D pp;
+ VG_(tdict).tool_update_extra =3D update;
+ VG_(tdict).tool_recognised_suppression =3D recog;
+ VG_(tdict).tool_read_extra_suppression_info =3D read_extra;
+ VG_(tdict).tool_error_matches_suppression =3D matches;
+ VG_(tdict).tool_get_error_name =3D name;
+ VG_(tdict).tool_print_extra_suppression_info =3D print_extra;
+}
+
+void VG_(needs_command_line_options)(
+ Bool (*process)(Char*),
+ void (*usage)(void),
+ void (*debug_usage)(void)
+)
+{
+ VG_(needs).command_line_options =3D True;
+ VG_(tdict).tool_process_cmd_line_option =3D process;
+ VG_(tdict).tool_print_usage =3D usage;
+ VG_(tdict).tool_print_debug_usage =3D debug_usage;
+}
+
+void VG_(needs_client_requests)(
+ Bool (*handle)(ThreadId, UWord*, UWord*)
+)
+{
+ VG_(needs).client_requests =3D True;
+ VG_(tdict).tool_handle_client_request =3D handle;
+}
+
+void VG_(needs_syscall_wrapper)(
+ void(*pre) (ThreadId, UInt),
+ void(*post)(ThreadId, UInt, Int res)
+)
+{
+ VG_(needs).syscall_wrapper =3D True;
+ VG_(tdict).tool_pre_syscall =3D pre;
+ VG_(tdict).tool_post_syscall =3D post;
+}
+
+void VG_(needs_sanity_checks)(
+ Bool(*cheap)(void),
+ Bool(*expen)(void)
+)
+{
+ VG_(needs).sanity_checks =3D True;
+ VG_(tdict).tool_cheap_sanity_check =3D cheap;
+ VG_(tdict).tool_expensive_sanity_check =3D expen;
+}
+
+
+/*--------------------------------------------------------------------*/
+/* Replacing malloc() */
+
+extern void VG_(malloc_funcs)(
+ void* (*malloc) ( ThreadId, SizeT ),
+ void* (*__builtin_new) ( ThreadId, SizeT ),
+ void* (*__builtin_vec_new) ( ThreadId, SizeT ),
+ void* (*memalign) ( ThreadId, SizeT, SizeT ),
+ void* (*calloc) ( ThreadId, SizeT, SizeT ),
+ void (*free) ( ThreadId, void* ),
+ void (*__builtin_delete) ( ThreadId, void* ),
+ void (*__builtin_vec_delete) ( ThreadId, void* ),
+ void* (*realloc) ( ThreadId, void*, SizeT ),
+ SizeT client_malloc_redzone_szB
+)
+{
+ VG_(tdict).malloc_malloc =3D malloc;
+ VG_(tdict).malloc___builtin_new =3D __builtin_new;
+ VG_(tdict).malloc___builtin_vec_new =3D __builtin_vec_new;
+ VG_(tdict).malloc_memalign =3D memalign;
+ VG_(tdict).malloc_calloc =3D calloc;
+ VG_(tdict).malloc_free =3D free;
+ VG_(tdict).malloc___builtin_delete =3D __builtin_delete;
+ VG_(tdict).malloc___builtin_vec_delete =3D __builtin_vec_delete;
+ VG_(tdict).malloc_realloc =3D realloc;
+
+ VG_(set_client_malloc_redzone_szB)( client_malloc_redzone_szB );
+}
+
+
+/*--------------------------------------------------------------------*/
+/* Tracked events */
+
+#define DEF(fn, args...) \
+void VG_(fn)(void(*f)(args)) \
+{ \
+ VG_(tdict).fn =3D f; \
+}
+
+#define DEF2(fn, args...) \
+void VG_(fn)(VGA_REGPARM(1) void(*f)(args)) \
+{ \
+ VG_(tdict).fn =3D f; \
+}
+
+DEF(track_new_mem_startup, Addr, SizeT, Bool, Bool, Bool)
+DEF(track_new_mem_stack_signal, Addr, SizeT)
+DEF(track_new_mem_brk, Addr, SizeT)
+DEF(track_new_mem_mmap, Addr, SizeT, Bool, Bool, Bool)
+
+DEF(track_copy_mem_remap, Addr, Addr, SizeT)
+DEF(track_change_mem_mprotect, Addr, SizeT, Bool, Bool, Bool)
+DEF(track_die_mem_stack_signal, Addr, SizeT)
+DEF(track_die_mem_brk, Addr, SizeT)
+DEF(track_die_mem_munmap, Addr, SizeT)
+
+DEF2(track_new_mem_stack_4, Addr)
+DEF2(track_new_mem_stack_8, Addr)
+DEF2(track_new_mem_stack_12, Addr)
+DEF2(track_new_mem_stack_16, Addr)
+DEF2(track_new_mem_stack_32, Addr)
+DEF (track_new_mem_stack, Addr, SizeT)
+
+DEF2(track_die_mem_stack_4, Addr)
+DEF2(track_die_mem_stack_8, Addr)
+DEF2(track_die_mem_stack_12, Addr)
+DEF2(track_die_mem_stack_16, Addr)
+DEF2(track_die_mem_stack_32, Addr)
+DEF (track_die_mem_stack, Addr, SizeT)
+
+DEF(track_ban_mem_stack, Addr, SizeT)
+
+DEF(track_pre_mem_read, CorePart, ThreadId, Char*, Addr, SizeT)
+DEF(track_pre_mem_read_asciiz, CorePart, ThreadId, Char*, Addr)
+DEF(track_pre_mem_write, CorePart, ThreadId, Char*, Addr, SizeT)
+DEF(track_post_mem_write, CorePart, ThreadId, Addr, SizeT)
+
+DEF(track_pre_reg_read, CorePart, ThreadId, Char*, OffT, SizeT)
+DEF(track_post_reg_write, CorePart, ThreadId, OffT, SizeT)
+
+DEF(track_post_reg_write_clientcall_return, ThreadId, OffT, SizeT, Addr)
+
+DEF(track_thread_run, ThreadId)
+
+DEF(track_post_thread_create, ThreadId, ThreadId)
+DEF(track_post_thread_join, ThreadId, ThreadId)
+
+DEF(track_pre_mutex_lock, ThreadId, void*)
+DEF(track_post_mutex_lock, ThreadId, void*)
+DEF(track_post_mutex_unlock, ThreadId, void*)
+
+DEF(track_pre_deliver_signal, ThreadId, Int sigNo, Bool)
+DEF(track_post_deliver_signal, ThreadId, Int sigNo)
+
+DEF(track_init_shadow_page, Addr)
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
+
Modified: trunk/coregrind/pub_core_aspacemgr.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_aspacemgr.h 2005-05-10 03:01:23 UTC (rev 365=
1)
+++ trunk/coregrind/pub_core_aspacemgr.h 2005-05-10 04:37:01 UTC (rev 365=
2)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- The address space manager. ---*/
-/*--- pub_core_aspacemgr.h ---*/
+/*--- The address space manager. pub_core_aspacemgr.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Added: trunk/coregrind/pub_core_tooliface.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_tooliface.h 2005-05-10 03:01:23 UTC (rev 365=
1)
+++ trunk/coregrind/pub_core_tooliface.h 2005-05-10 04:37:01 UTC (rev 365=
2)
@@ -0,0 +1,220 @@
+
+/*--------------------------------------------------------------------*/
+/*--- The core/tool interface. pub_core_tooliface.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ 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_TOOLIFACE_H
+#define __PUB_CORE_TOOLIFACE_H
+
+#include "pub_tool_tooliface.h"
+
+//--------------------------------------------------------------------
+// PURPOSE: This module encapsulates the key parts of the core/tool
+// interface: 'details', 'needs' and 'trackable events'.
+//--------------------------------------------------------------------
+
+// Note the use of C's comma operator here -- it means that we execute b=
oth
+// statements, and the rvalue of the whole thing is the rvalue of the la=
st
+// statement. This lets us say "x =3D VG_TDICT_CALL(...)" in the requir=
ed
+// places, while still checking the assertion.
+#define VG_TDICT_CALL(fn, args...) \
+ ( tl_assert2(VG_(tdict).fn, \
+ "you forgot to set VgToolInterface function '" #fn "'"),=
\
+ VG_(tdict).fn(args) )
+
+#define VG_TRACK(fn, args...) \
+ do { \
+ if (VG_(tdict).track_##fn) \
+ VG_(tdict).track_##fn(args); \
+ } while(0)
+
+/* These structs are not exposed to tools to mitigate possibility of
+ binary-incompatibilities when the core/tool interface changes. Inste=
ad,
+ set functions are provided (see include/tool.h). */
+
+/* ---------------------------------------------------------------------
+ 'Details'
+ ------------------------------------------------------------------ */
+
+typedef
+ struct {
+ Char* name;
+ Char* version;
+ Char* description;
+ Char* copyright_author;
+ Char* bug_reports_to;
+ UInt avg_translation_sizeB;
+ }
+ VgDetails;
+
+extern VgDetails VG_(details);
+
+/* ---------------------------------------------------------------------
+ 'Needs'
+ ------------------------------------------------------------------ */
+
+typedef
+ struct {
+ Bool libc_freeres;
+ Bool core_errors;
+ Bool tool_errors;
+ Bool basic_block_discards;
+ Bool no_longer_used_1; // for backwards compatibility
+ Bool command_line_options;
+ Bool client_requests;
+ Bool no_longer_used_0; // for backwards compatibility
+ Bool syscall_wrapper;
+ Bool sanity_checks;
+ Bool data_syms;
+ Bool shadow_memory;
+ }=20
+ VgNeeds;
+
+extern VgNeeds VG_(needs);
+
+/* ---------------------------------------------------------------------
+ The dictionary of callable tool functions
+ ------------------------------------------------------------------ */
+
+typedef struct {
+ // -- 'Needs'-related functions ----------------------------------
+ // Basic functions
+ void (*tool_pre_clo_init) (void);
+ void (*tool_post_clo_init)(void);
+ IRBB* (*tool_instrument) (IRBB*, VexGuestLayout*, IRType, IRType);
+ void (*tool_fini) (Int);
+
+ // VG_(needs).core_errors
+ // (none)
+ =20
+ // VG_(needs).tool_errors
+ Bool (*tool_eq_Error) (VgRes, Error*, Error*);
+ void (*tool_pp_Error) (Error*);
+ UInt (*tool_update_extra) (Error*);
+ Bool (*tool_recognised_suppression) (Char*, Supp*);
+ Bool (*tool_read_extra_suppression_info) (Int, Char*, Int, Supp*);
+ Bool (*tool_error_matches_suppression) (Error*, Supp*);
+ Char* (*tool_get_error_name) (Error*);
+ void (*tool_print_extra_suppression_info)(Error*);
+
+ // VG_(needs).basic_block_discards
+ void (*tool_discard_basic_block_info)(Addr, SizeT);
+
+ // VG_(needs).command_line_options
+ Bool (*tool_process_cmd_line_option)(Char*);
+ void (*tool_print_usage) (void);
+ void (*tool_print_debug_usage) (void);
+
+ // VG_(needs).client_requests
+ Bool (*tool_handle_client_request)(ThreadId, UWord*, UWord*);
+
+ // VG_(needs).syscall_wrapper
+ void (*tool_pre_syscall) (ThreadId, UInt);
+ void (*tool_post_syscall)(ThreadId, UInt, Int);
+
+ // VG_(needs).sanity_checks
+ Bool (*tool_cheap_sanity_check)(void);
+ Bool (*tool_expensive_sanity_check)(void);
+
+ // -- Event tracking functions ------------------------------------
+ void (*track_new_mem_startup) (Addr, SizeT, Bool, Bool, Bool);
+ void (*track_new_mem_stack_signal)(Addr, SizeT);
+ void (*track_new_mem_brk) (Addr, SizeT);
+ void (*track_new_mem_mmap) (Addr, SizeT, Bool, Bool, Bool);
+
+ void (*track_copy_mem_remap) (Addr, Addr, SizeT);
+ void (*track_change_mem_mprotect) (Addr, SizeT, Bool, Bool, Bool);
+ void (*track_die_mem_stack_signal)(Addr, SizeT);
+ void (*track_die_mem_brk) (Addr, SizeT);
+ void (*track_die_mem_munmap) (Addr, SizeT);
+
+ VGA_REGPARM(1) void (*track_new_mem_stack_4) (Addr);
+ VGA_REGPARM(1) void (*track_new_mem_stack_8) (Addr);
+ VGA_REGPARM(1) void (*track_new_mem_stack_12)(Addr);
+ VGA_REGPARM(1) void (*track_new_mem_stack_16)(Addr);
+ VGA_REGPARM(1) void (*track_new_mem_stack_32)(Addr);
+ void (*track_new_mem_stack)(Addr, SizeT);
+
+ VGA_REGPARM(1) void (*track_die_mem_stack_4) (Addr);
+ VGA_REGPARM(1) void (*track_die_mem_stack_8) (Addr);
+ VGA_REGPARM(1) void (*track_die_mem_stack_12)(Addr);
+ VGA_REGPARM(1) void (*track_die_mem_stack_16)(Addr);
+ VGA_REGPARM(1) void (*track_die_mem_stack_32)(Addr);
+ void (*track_die_mem_stack)(Addr, SizeT);
+
+ void (*track_ban_mem_stack)(Addr, SizeT);
+
+ void (*track_pre_mem_read) (CorePart, ThreadId, Char*, Addr, Si=
zeT);
+ void (*track_pre_mem_read_asciiz)(CorePart, ThreadId, Char*, Addr);
+ void (*track_pre_mem_write) (CorePart, ThreadId, Char*, Addr, Si=
zeT);
+ void (*track_post_mem_write) (CorePart, ThreadId, Addr, SizeT);
+
+ void (*track_pre_reg_read) (CorePart, ThreadId, Char*, OffT, SizeT);
+ void (*track_post_reg_write)(CorePart, ThreadId, OffT, SizeT);
+ void (*track_post_reg_write_clientcall_return)(ThreadId, OffT, SizeT,=
Addr);
+
+ void (*track_thread_run)(ThreadId);
+
+ void (*track_post_thread_create)(ThreadId, ThreadId);
+ void (*track_post_thread_join) (ThreadId, ThreadId);
+
+ void (*track_pre_mutex_lock) (ThreadId, void*);
+ void (*track_post_mutex_lock) (ThreadId, void*);
+ void (*track_post_mutex_unlock)(ThreadId, void*);
+
+ void (*track_pre_deliver_signal) (ThreadId, Int sigNo, Bool);
+ void (*track_post_deliver_signal)(ThreadId, Int sigNo);
+
+ void (*track_init_shadow_page)(Addr);
+
+ // -- malloc/free replacements -----------------------------------
+ void* (*malloc_malloc) (ThreadId, SizeT);
+ void* (*malloc___builtin_new) (ThreadId, SizeT);
+ void* (*malloc___builtin_vec_new) (ThreadId, SizeT);
+ void* (*malloc_memalign) (ThreadId, SizeT, SizeT);
+ void* (*malloc_calloc) (ThreadId, SizeT, SizeT);
+ void (*malloc_free) (ThreadId, void*);
+ void (*malloc___builtin_delete) (ThreadId, void*);
+ void (*malloc___builtin_vec_delete)(ThreadId, void*);
+ void* (*malloc_realloc) (ThreadId, void*, SizeT);
+
+} VgToolInterface;
+
+extern VgToolInterface VG_(tdict);
+
+/* ---------------------------------------------------------------------
+ Miscellaneous functions
+ ------------------------------------------------------------------ */
+
+void VG_(sanity_check_needs)(void);
+
+#endif // __PUB_CORE_TOOLIFACE_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_main.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_main.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -37,6 +37,7 @@
#include "pub_core_errormgr.h"
#include "pub_core_execontext.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
=20
#include <dirent.h>
#include <dlfcn.h>
Modified: trunk/coregrind/vg_mylibc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_mylibc.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_mylibc.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -35,6 +35,7 @@
#include "pub_core_debuglog.h" /* VG_(debugLog_vprintf) */
#include "pub_core_stacktrace.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
=20
=20
/* ---------------------------------------------------------------------
Deleted: trunk/coregrind/vg_needs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_needs.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_needs.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -1,336 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Stuff relating to tool data structures. ---*/
-/*--- vg_needs.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- 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.
-*/
-
-#include "core.h"
-
-// The core/tool dictionary of functions (initially zeroed, as we want i=
t)
-VgToolInterface VG_(tdict);
-
-/*--------------------------------------------------------------------*/
-/* Setting basic functions */
-
-void VG_(basic_tool_funcs)(
- void(*post_clo_init)(void),
- IRBB*(*instrument)(IRBB*, VexGuestLayout*, IRType, IRType ),
- void(*fini)(Int)
-)
-{
- VG_(tdict).tool_post_clo_init =3D post_clo_init;
- VG_(tdict).tool_instrument =3D instrument;
- VG_(tdict).tool_fini =3D fini;
-}
-
-
-/*--------------------------------------------------------------------*/
-/* Setting details */
-
-/* Init with default values. */
-VgDetails VG_(details) =3D {
- .name =3D NULL,
- .version =3D NULL,
- .description =3D NULL,
- .copyright_author =3D NULL,
- .bug_reports_to =3D NULL,
- .avg_translation_sizeB =3D VG_DEFAULT_TRANS_SIZEB,
-};
-
-/* Use macro because they're so repetitive */
-#define DETAILS(type, detail) \
- extern void VG_(details_##detail)(type detail) \
- { \
- VG_(details).detail =3D detail; \
- }
-
-DETAILS(Char*, name)
-DETAILS(Char*, version)
-DETAILS(Char*, description)
-DETAILS(Char*, copyright_author)
-DETAILS(Char*, bug_reports_to)
-DETAILS(UInt, avg_translation_sizeB)
-
-
-/*--------------------------------------------------------------------*/
-/* Setting needs */
-
-VgNeeds VG_(needs) =3D {
- .core_errors =3D False,
- .tool_errors =3D False,
- .libc_freeres =3D False,
- .basic_block_discards =3D False,
- .no_longer_used_1 =3D False,
- .command_line_options =3D False,
- .client_requests =3D False,
- .no_longer_used_0 =3D False,
- .syscall_wrapper =3D False,
- .sanity_checks =3D False,
- .data_syms =3D False,
- .shadow_memory =3D False,
-};
-
-/* static */
-void VG_(sanity_check_needs) ( void)
-{
-#define CHECK_NOT(var, value) \
- if ((var)=3D=3D(value)) { \
- VG_(printf)("\nTool error: `%s' not initialised\n", \
- VG_STRINGIFY(var)); \
- VG_(tool_panic)("Uninitialised details field\n"); \
- }
- =20
- /* Ones that must be set */
- CHECK_NOT(VG_(details).name, NULL);
- /* Nb: .version can be NULL */
- CHECK_NOT(VG_(details).description, NULL);
- CHECK_NOT(VG_(details).copyright_author, NULL);
- CHECK_NOT(VG_(details).bug_reports_to, NULL);
-
- if ( (VG_(tdict).track_new_mem_stack_4 ||
- VG_(tdict).track_new_mem_stack_8 ||
- VG_(tdict).track_new_mem_stack_12 ||
- VG_(tdict).track_new_mem_stack_16 ||
- VG_(tdict).track_new_mem_stack_32 ) &&
- ! VG_(tdict).track_new_mem_stack)=20
- {
- VG_(printf)("\nTool error: one of the specialised `new_mem_stack_n=
'\n"
- "events tracked, but not the generic `new_mem_stack' o=
ne.\n");
- VG_(tool_panic)("`new_mem_stack' should be defined\n");
- }
-
- if ( (VG_(tdict).track_die_mem_stack_4 ||
- VG_(tdict).track_die_mem_stack_8 ||
- VG_(tdict).track_die_mem_stack_12 ||
- VG_(tdict).track_die_mem_stack_16 ||
- VG_(tdict).track_die_mem_stack_32 ) &&
- ! VG_(tdict).track_die_mem_stack)=20
- {
- VG_(printf)("\nTool error: one of the specialised `die_mem_stack_n=
'\n"
- "events tracked, but not the generic `die_mem_stack' o=
ne.\n");
- VG_(tool_panic)("`die_mem_stack' should be defined\n");
- }
-
- if (VG_(needs).shadow_memory !=3D (VG_(get_shadow_size)() !=3D 0)) {
- if (VG_(get_shadow_size)() !=3D 0)
- VG_(printf)("\nTool error: tool allocated shadow memory, but apparentl=
y doesn't "
- "need it.\n");
- else
- VG_(printf)("\nTool error: tool didn't allocate shadow memory, but app=
arently "
- "needs it.\n");
- VG_(tool_panic)("VG_(needs).shadow_memory need should be set to ma=
tch 'shadow_ratio'\n");
- }
-
-#undef CHECK_NOT
-}
-
-/* Use macro because they're so repetitive */
-#define NEEDS(need) \
- extern void VG_(needs_##need)(void) \
- { \
- VG_(needs).need =3D True; \
- }
-
-// These ones don't require any tool-supplied functions
-NEEDS(libc_freeres)
-NEEDS(core_errors)
-NEEDS(data_syms)
-NEEDS(shadow_memory)
-
-void VG_(needs_basic_block_discards)(
- void (*discard)(Addr, SizeT)
-)
-{
- VG_(needs).basic_block_discards =3D True;
- VG_(tdict).tool_discard_basic_block_info =3D discard;
-}
-
-void VG_(needs_tool_errors)(
- Bool (*eq) (VgRes, Error*, Error*),
- void (*pp) (Error*),
- UInt (*update) (Error*),
- Bool (*recog) (Char*, Supp*),
- Bool (*read_extra) (Int, Char*, Int, Supp*),
- Bool (*matches) (Error*, Supp*),
- Char* (*name) (Error*),
- void (*print_extra)(Error*)
-)
-{
- VG_(needs).tool_errors =3D True;
- VG_(tdict).tool_eq_Error =3D eq;
- VG_(tdict).tool_pp_Error =3D pp;
- VG_(tdict).tool_update_extra =3D update;
- VG_(tdict).tool_recognised_suppression =3D recog;
- VG_(tdict).tool_read_extra_suppression_info =3D read_extra;
- VG_(tdict).tool_error_matches_suppression =3D matches;
- VG_(tdict).tool_get_error_name =3D name;
- VG_(tdict).tool_print_extra_suppression_info =3D print_extra;
-}
-
-void VG_(needs_command_line_options)(
- Bool (*process)(Char*),
- void (*usage)(void),
- void (*debug_usage)(void)
-)
-{
- VG_(needs).command_line_options =3D True;
- VG_(tdict).tool_process_cmd_line_option =3D process;
- VG_(tdict).tool_print_usage =3D usage;
- VG_(tdict).tool_print_debug_usage =3D debug_usage;
-}
-
-void VG_(needs_client_requests)(
- Bool (*handle)(ThreadId, UWord*, UWord*)
-)
-{
- VG_(needs).client_requests =3D True;
- VG_(tdict).tool_handle_client_request =3D handle;
-}
-
-void VG_(needs_syscall_wrapper)(
- void(*pre) (ThreadId, UInt),
- void(*post)(ThreadId, UInt, Int res)
-)
-{
- VG_(needs).syscall_wrapper =3D True;
- VG_(tdict).tool_pre_syscall =3D pre;
- VG_(tdict).tool_post_syscall =3D post;
-}
-
-void VG_(needs_sanity_checks)(
- Bool(*cheap)(void),
- Bool(*expen)(void)
-)
-{
- VG_(needs).sanity_checks =3D True;
- VG_(tdict).tool_cheap_sanity_check =3D cheap;
- VG_(tdict).tool_expensive_sanity_check =3D expen;
-}
-
-
-/*--------------------------------------------------------------------*/
-/* Replacing malloc() */
-
-extern void VG_(malloc_funcs)(
- void* (*malloc) ( ThreadId, SizeT ),
- void* (*__builtin_new) ( ThreadId, SizeT ),
- void* (*__builtin_vec_new) ( ThreadId, SizeT ),
- void* (*memalign) ( ThreadId, SizeT, SizeT ),
- void* (*calloc) ( ThreadId, SizeT, SizeT ),
- void (*free) ( ThreadId, void* ),
- void (*__builtin_delete) ( ThreadId, void* ),
- void (*__builtin_vec_delete) ( ThreadId, void* ),
- void* (*realloc) ( ThreadId, void*, SizeT ),
- SizeT client_malloc_redzone_szB
-)
-{
- VG_(tdict).malloc_malloc =3D malloc;
- VG_(tdict).malloc___builtin_new =3D __builtin_new;
- VG_(tdict).malloc___builtin_vec_new =3D __builtin_vec_new;
- VG_(tdict).malloc_memalign =3D memalign;
- VG_(tdict).malloc_calloc =3D calloc;
- VG_(tdict).malloc_free =3D free;
- VG_(tdict).malloc___builtin_delete =3D __builtin_delete;
- VG_(tdict).malloc___builtin_vec_delete =3D __builtin_vec_delete;
- VG_(tdict).malloc_realloc =3D realloc;
-
- VG_(set_client_malloc_redzone_szB)( client_malloc_redzone_szB );
-}
-
-
-/*--------------------------------------------------------------------*/
-/* Tracked events */
-
-#define DEF(fn, args...) \
-void VG_(fn)(void(*f)(args)) \
-{ \
- VG_(tdict).fn =3D f; \
-}
-
-#define DEF2(fn, args...) \
-void VG_(fn)(VGA_REGPARM(1) void(*f)(args)) \
-{ \
- VG_(tdict).fn =3D f; \
-}
-
-DEF(track_new_mem_startup, Addr, SizeT, Bool, Bool, Bool)
-DEF(track_new_mem_stack_signal, Addr, SizeT)
-DEF(track_new_mem_brk, Addr, SizeT)
-DEF(track_new_mem_mmap, Addr, SizeT, Bool, Bool, Bool)
-
-DEF(track_copy_mem_remap, Addr, Addr, SizeT)
-DEF(track_change_mem_mprotect, Addr, SizeT, Bool, Bool, Bool)
-DEF(track_die_mem_stack_signal, Addr, SizeT)
-DEF(track_die_mem_brk, Addr, SizeT)
-DEF(track_die_mem_munmap, Addr, SizeT)
-
-DEF2(track_new_mem_stack_4, Addr)
-DEF2(track_new_mem_stack_8, Addr)
-DEF2(track_new_mem_stack_12, Addr)
-DEF2(track_new_mem_stack_16, Addr)
-DEF2(track_new_mem_stack_32, Addr)
-DEF (track_new_mem_stack, Addr, SizeT)
-
-DEF2(track_die_mem_stack_4, Addr)
-DEF2(track_die_mem_stack_8, Addr)
-DEF2(track_die_mem_stack_12, Addr)
-DEF2(track_die_mem_stack_16, Addr)
-DEF2(track_die_mem_stack_32, Addr)
-DEF (track_die_mem_stack, Addr, SizeT)
-
-DEF(track_ban_mem_stack, Addr, SizeT)
-
-DEF(track_pre_mem_read, CorePart, ThreadId, Char*, Addr, SizeT)
-DEF(track_pre_mem_read_asciiz, CorePart, ThreadId, Char*, Addr)
-DEF(track_pre_mem_write, CorePart, ThreadId, Char*, Addr, SizeT)
-DEF(track_post_mem_write, CorePart, ThreadId, Addr, SizeT)
-
-DEF(track_pre_reg_read, CorePart, ThreadId, Char*, OffT, SizeT)
-DEF(track_post_reg_write, CorePart, ThreadId, OffT, SizeT)
-
-DEF(track_post_reg_write_clientcall_return, ThreadId, OffT, SizeT, Addr)
-
-DEF(track_thread_run, ThreadId)
-
-DEF(track_post_thread_create, ThreadId, ThreadId)
-DEF(track_post_thread_join, ThreadId, ThreadId)
-
-DEF(track_pre_mutex_lock, ThreadId, void*)
-DEF(track_post_mutex_lock, ThreadId, void*)
-DEF(track_post_mutex_unlock, ThreadId, void*)
-
-DEF(track_pre_deliver_signal, ThreadId, Int sigNo, Bool)
-DEF(track_post_deliver_signal, ThreadId, Int sigNo)
-
-DEF(track_init_shadow_page, Addr)
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
-
-
Modified: trunk/coregrind/vg_scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_scheduler.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_scheduler.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -64,6 +64,7 @@
#include "pub_core_replacemalloc.h"
#include "pub_core_stacktrace.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
=20
/* ---------------------------------------------------------------------
Types and globals for the scheduler.
Modified: trunk/coregrind/vg_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_signals.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_signals.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -85,6 +85,7 @@
#include "pub_core_errormgr.h"
#include "pub_core_sigframe.h"
#include "pub_core_syscalls.h"
+#include "pub_core_tooliface.h"
=20
=20
/* Define to give more sanity checking for signals. */
Modified: trunk/coregrind/vg_symtab2.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtab2.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_symtab2.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -34,8 +34,9 @@
#include "vg_symtab2.h"
=20
#include "pub_core_aspacemgr.h"
+#include "pub_core_tooliface.h"
=20
-#include <elf.h> /* ELF defns */
+#include <elf.h> /* ELF defns */
=20
static SegInfo* segInfo =3D NULL;
=20
Modified: trunk/coregrind/vg_symtypes.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtypes.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_symtypes.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -30,6 +30,7 @@
#include "core.h"
#include "vg_symtypes.h"
#include "pub_core_debuglog.h" /* VG_(debugLog_vprintf) */
+#include "pub_core_tooliface.h"
=20
typedef enum {
TyUnknown, /* unknown type */
Modified: trunk/coregrind/vg_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_translate.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_translate.c 2005-05-10 04:37:01 UTC (rev 3652)
@@ -31,6 +31,7 @@
=20
#include "core.h"
#include "pub_core_aspacemgr.h"
+#include "pub_core_tooliface.h"
=20
=20
/*------------------------------------------------------------*/
Modified: trunk/coregrind/vg_transtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_transtab.c 2005-05-10 03:01:23 UTC (rev 3651)
+++ trunk/coregrind/vg_transtab.c 2005-05-10 04:37:01 ...
[truncated message content] |