]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix inclusion of header files in coregrind. No pub_tool_*.h should be
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 15 Sep 2013 10:42:26 +0000 (10:42 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 15 Sep 2013 10:42:26 +0000 (10:42 +0000)
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548

33 files changed:
coregrind/Makefile.am
coregrind/m_debuginfo/image.c
coregrind/m_gdbserver/m_gdbserver.c
coregrind/m_gdbserver/server.h
coregrind/m_gdbserver/target.c
coregrind/m_gdbserver/valgrind-low-arm.c
coregrind/m_gdbserver/valgrind-low-mips32.c
coregrind/m_gdbserver/valgrind-low-mips64.c
coregrind/m_gdbserver/valgrind-low-ppc32.c
coregrind/m_gdbserver/valgrind-low-ppc64.c
coregrind/m_gdbserver/valgrind-low-s390x.c
coregrind/m_gdbserver/valgrind-low-x86.c
coregrind/m_libcprint.c
coregrind/m_machine.c
coregrind/m_main.c
coregrind/m_mallocfree.c
coregrind/m_oset.c
coregrind/m_poolalloc.c
coregrind/m_scheduler/sched-lock-generic.c
coregrind/m_scheduler/sched-lock.c
coregrind/m_scheduler/sema.c
coregrind/m_scheduler/ticket-lock-linux.c
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_threadstate.c
coregrind/pub_core_debuglog.h
coregrind/pub_core_gdbserver.h
coregrind/pub_core_inner.h [moved from include/pub_tool_inner.h with 94% similarity]
coregrind/pub_core_poolalloc.h [new file with mode: 0644]
coregrind/pub_core_threadstate.h
include/Makefile.am

index 8d114f1e94d740f2fa657c740c801e1bf53c7f2d..fd84ebc18910cb6a92cc5d515397ea28cda1d191 100644 (file)
@@ -156,6 +156,7 @@ noinst_HEADERS = \
        pub_core_gdbserver.h    \
        pub_core_hashtable.h    \
        pub_core_initimg.h      \
+       pub_core_inner.h        \
        pub_core_libcbase.h     \
        pub_core_libcassert.h   \
        pub_core_libcfile.h     \
@@ -169,6 +170,7 @@ noinst_HEADERS = \
        pub_core_options.h      \
        pub_core_oset.h         \
        pub_core_redir.h        \
+       pub_core_poolalloc.h    \
        pub_core_replacemalloc.h\
        pub_core_sbprofile.h    \
        pub_core_scheduler.h    \
index 8bb37799af9558601e3fdb306be49f93a7daa44b..d0580999544ed50cbd2910436230aab37ac1db44 100644 (file)
 #include "pub_core_libcbase.h"
 #include "pub_core_libcassert.h"
 #include "pub_core_libcprint.h"
+#include "pub_core_libcproc.h"     /* VG_(read_millisecond_timer) */
 #include "pub_core_libcfile.h"
 #include "priv_misc.h"             /* dinfo_zalloc/free/strdup */
 #include "priv_image.h"            /* self */
 
-#include "pub_tool_libcproc.h" // RMME
 #include "minilzo.h"
 
 #define CACHE_ENTRY_SIZE_BITS (12+1)
index 44a9990e0bf85643570858a626503a7fa53cb4c6..b36757043985d39a17eda254c8da64177280c3b2 100644 (file)
 #include "pub_core_libcproc.h"
 #include "pub_core_libcprint.h"
 #include "pub_core_mallocfree.h"
-#include "pub_tool_libcsetjmp.h"
+#include "pub_core_libcsetjmp.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_gdbserver.h"
 #include "pub_core_options.h"
 #include "pub_core_libcsetjmp.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
-#include "pub_tool_hashtable.h"
-#include "pub_tool_xarray.h"
+#include "pub_core_hashtable.h"
+#include "pub_core_xarray.h"
 #include "pub_core_libcassert.h"
-#include "pub_tool_libcbase.h"
+#include "pub_core_libcbase.h"
 #include "pub_core_libcsignal.h"
 #include "pub_core_signals.h"
-#include "pub_tool_machine.h"     // VG_(fnptr_to_fnentry)
-#include "pub_tool_debuginfo.h"
+#include "pub_core_machine.h"     // VG_(fnptr_to_fnentry)
+#include "pub_core_debuginfo.h"
 #include "pub_core_scheduler.h"
 #include "pub_core_syswrap.h"
 
index 655a2abbba9de8fb270d33adcd288f754d5e0cb9..41c9adb0f930f3d55b8d38864c9b4558dceb24da 100644 (file)
 #include "pub_core_libcprint.h"
 #include "pub_core_mallocfree.h"
 #include "pub_core_syscall.h"
-#include "pub_tool_libcproc.h"
+#include "pub_core_libcproc.h"
 #include "pub_core_tooliface.h"
-#include "pub_tool_libcassert.h"
-#include "pub_tool_libcbase.h"
-#include "pub_tool_options.h"
-#include "pub_tool_libcsetjmp.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_options.h"
+#include "pub_core_libcsetjmp.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_gdbserver.h"
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_vki.h"
+#include "pub_core_vki.h"
 #include "valgrind.h"
 
 /*------------- interface m_gdbserver <=> low level gdbserver */
index 72cf24243c0a7407825b0b3b667b4d5d17d1fdf6..eef80eb9b545cb70a1db2968163896068fad9d21 100644 (file)
 #include "valgrind_low.h"
 #include "gdb/signals.h"
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
-#include "pub_tool_debuginfo.h"
+#include "pub_core_debuginfo.h"
 
 
 /* the_low_target defines the architecture specific aspects depending
index b14084a2bcc6871b0cbd4e87634e8a0813b6b2e6..d95f2d33ce82c2e462479bd158edaf4e55360b65 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
index e0aaa7b32cae0772319efbd5fa487f92b2a7379e..47adf4edd0155554c3ffc3666bde3ae5fd8488f1 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
index 092c3cbfc4d44f8f0d4cc94f24434c0e0d99b488..b1f3bbd4609b505e0914b424f38e5c90e7c4e99e 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
index ba4ae8fc4c9b807191a723b430ab2058942a0ad3..592e25b75e59fd62cfd22472a067fbbebe030e22 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
index a516d209b720cac41911f9eecf398f33d9602431..fa146c15f9cf22dc356bdf55b71006ed5c452b0f 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
index 6909e4c9c445a85694c080a2f1f68c535b868f73..b06b920280bbd4a4859b9d1754086bbbd308a4b3 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
index fc533f7f870b197289799bd1ac664a287bd46898..f2715a0edc2202eb5208ff14fc69a1d28b58428d 100644 (file)
@@ -27,7 +27,7 @@
 #include "regcache.h"
 
 #include "pub_core_aspacemgr.h"
-#include "pub_tool_machine.h"
+#include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
 #include "pub_core_gdbserver.h" 
index 8c887e3fddb5c577a2180fe04287162ed6170a5c..ecffc83565fb9b8868e2e1e77df5a396a2ca6d1c 100644 (file)
@@ -31,7 +31,7 @@
 #include "pub_core_basics.h"
 #include "pub_core_vki.h"
 #include "pub_core_debuglog.h"
-#include "pub_tool_gdbserver.h"  // VG_(gdb_printf)
+#include "pub_core_gdbserver.h"  // VG_(gdb_printf)
 #include "pub_core_libcbase.h"
 #include "pub_core_libcassert.h"
 #include "pub_core_libcfile.h"   // VG_(write)(), VG_(write_socket)()
index 2f9869dc355549d567fa663462a9b7b699bc0a9e..c288ab1d7b7bf69158ae6aa347c896203c973f97 100644 (file)
@@ -445,7 +445,7 @@ Int VG_(machine_arm_archlevel) = 4;
    testing, so we need a VG_MINIMAL_JMP_BUF. */
 #if defined(VGA_ppc32) || defined(VGA_ppc64) \
     || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32)
-#include "pub_tool_libcsetjmp.h"
+#include "pub_core_libcsetjmp.h"
 static VG_MINIMAL_JMP_BUF(env_unsup_insn);
 static void handler_unsup_insn ( Int x ) {
    VG_MINIMAL_LONGJMP(env_unsup_insn);
index 8953af1a0c43a4d45a42173727eaa55a7c4ee050..65fe23d35dd653b378915a72c6a719e0a015fbef 100644 (file)
@@ -66,7 +66,7 @@
 #include "pub_core_translate.h"     // For VG_(translate)
 #include "pub_core_trampoline.h"
 #include "pub_core_transtab.h"
-#include "pub_tool_inner.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "valgrind.h"
 #endif 
index 013f89fafe3b0b9f33c70fa749b60b10012b1f8d..69666bf0eb1a97c4357ffd84daf8fb018c2a4e91 100644 (file)
@@ -43,7 +43,7 @@
 #include "pub_core_transtab.h"
 #include "pub_core_tooliface.h"
 
-#include "pub_tool_inner.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "memcheck/memcheck.h"
 #endif
index a2ad7d97f30701197ddcd2f249a113dc3b228f8a..710958ec44d7c6261426a5f8332f1dd7cb86c1e3 100644 (file)
@@ -80,7 +80,7 @@
 #include "pub_core_libcassert.h"
 #include "pub_core_libcprint.h"
 #include "pub_core_oset.h"
-#include "pub_tool_poolalloc.h"
+#include "pub_core_poolalloc.h"
 
 /*--------------------------------------------------------------------*/
 /*--- Types and constants                                          ---*/
index e3b07fcf00fb41d266e5ffde339c173c51f2308f..ee8f55fe6bcdbe96d8989806c0f674a5c3df1390 100644 (file)
@@ -29,8 +29,8 @@
 #include "pub_core_basics.h"
 #include "pub_core_libcbase.h"
 #include "pub_core_libcassert.h"
-#include "pub_tool_xarray.h"
-#include "pub_tool_poolalloc.h" /* self */
+#include "pub_core_xarray.h"
+#include "pub_core_poolalloc.h" /* self */
 
 struct _PoolAlloc {
    UWord   nrRef;         /* nr reference to this pool allocator */
index 8fcdd7fae622ad5790b3966e2f219b7a16794079..41f01a7abb4982ce09e6160e8acf2838a7624e96 100644 (file)
@@ -32,7 +32,7 @@
 */
 
 #include "pub_core_basics.h"
-#include "pub_tool_mallocfree.h"
+#include "pub_core_mallocfree.h"
 #include "priv_sema.h"
 #include "priv_sched-lock.h"
 #include "priv_sched-lock-impl.h"
index 71bc5597339b5e90c423c8a7828e2cfa51e2778a..dbd9ba563a9c38b68fc86ec5396c960419acc989 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "config.h"
 #include "pub_core_basics.h"
-#include "pub_tool_libcbase.h"
-#include "pub_tool_mallocfree.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_mallocfree.h"
 #include "priv_sema.h"
 #include "priv_sched-lock.h"
 #include "priv_sched-lock-impl.h"
index 2cb51d9df5d3801e13e106ed774e1fc1f54dc27a..bbfde8659b2e476f8806646f78902db6d26b9364 100644 (file)
@@ -34,7 +34,7 @@
 #include "pub_core_libcassert.h"
 #include "pub_core_libcfile.h"
 #include "pub_core_libcproc.h"      // For VG_(gettid)()
-#include "pub_tool_inner.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "helgrind/helgrind.h"
 #endif
index 477b6a885ad0087c7b2b9d2f50e0deb757c083bc..d0bc59ead8244a09b31c05a2c4ae631761c0de75 100644 (file)
 #include "pub_core_syscall.h"
 #include "pub_core_vki.h"
 #include "pub_core_vkiscnums.h"    // __NR_futex
-#include "pub_tool_libcproc.h"
-#include "pub_tool_mallocfree.h"
-#include "pub_tool_threadstate.h"
-#include "pub_tool_inner.h"
+#include "pub_core_libcproc.h"
+#include "pub_core_mallocfree.h"
+#include "pub_core_threadstate.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "helgrind/helgrind.h"
 #endif
index cd19efbcfa1fa1667509a01a31c1d53e8ff232d2..34dad5abf9a78331621bcf3f9b372c516a56759c 100644 (file)
@@ -43,7 +43,7 @@
 #include "pub_core_clientstate.h"   // VG_(brk_base), VG_(brk_limit)
 #include "pub_core_debuglog.h"
 #include "pub_core_errormgr.h"
-#include "pub_tool_gdbserver.h"     // VG_(gdbserver)
+#include "pub_core_gdbserver.h"     // VG_(gdbserver)
 #include "pub_core_libcbase.h"
 #include "pub_core_libcassert.h"
 #include "pub_core_libcfile.h"
index 9201aa6c382ed5a1904e8ada535a364d391081e4..1db46e0ad86610187e13d76dcc663e2d4a19b551 100644 (file)
@@ -55,7 +55,7 @@
 #include "pub_core_signals.h"
 #include "pub_core_syscall.h"
 #include "pub_core_syswrap.h"
-#include "pub_tool_inner.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "valgrind.h"
 #endif
index 038d73258ccdca2f331d9fa73cb5e8583805b2d2..be879383c71d5dfdc63643af6dd1e3185a128687 100644 (file)
@@ -59,7 +59,7 @@
 #include "pub_core_xarray.h"
 #include "pub_core_clientstate.h"   // VG_(brk_base), VG_(brk_limit)
 #include "pub_core_errormgr.h"
-#include "pub_tool_gdbserver.h"     // VG_(gdbserver)
+#include "pub_coretool_gdbserver.h"     // VG_(gdbserver)
 #include "pub_core_libcfile.h"
 #include "pub_core_machine.h"       // VG_(get_SP)
 #include "pub_core_mallocfree.h"
index 2c1c47d8e7d8e2db2e9b91b6f13d5678ca6fb724..9452f516abc4c35e415effed6b8951618e7720ef 100644 (file)
@@ -59,7 +59,7 @@
 #include "pub_core_xarray.h"
 #include "pub_core_clientstate.h"  /* VG_(brk_base), VG_(brk_limit) */
 #include "pub_core_errormgr.h"
-#include "pub_tool_gdbserver.h"    /* VG_(gdbserver) */
+#include "pub_core_gdbserver.h"    /* VG_(gdbserver) */
 #include "pub_core_libcfile.h"
 #include "pub_core_machine.h"      /* VG_(get_SP) */
 #include "pub_core_mallocfree.h"
index 3cd9478fa26adbc6e8d8d5ffa458753ae2ee50ae..4d668369482a0bfebe26d9e403320981063a92b1 100644 (file)
@@ -33,7 +33,7 @@
 #include "pub_core_libcsetjmp.h"    // to keep _threadstate.h happy
 #include "pub_core_threadstate.h"
 #include "pub_core_libcassert.h"
-#include "pub_tool_inner.h"
+#include "pub_core_inner.h"
 #if defined(ENABLE_INNER_CLIENT_REQUEST)
 #include "helgrind/helgrind.h"
 #endif
index c49f8ae3493785c5e4f9a789fe377c148092ada7..efb94167381d3cf7db2148262b1ddde6346b4c74 100644 (file)
@@ -47,7 +47,7 @@
    portable way to avoid using stdarg.h. */
 #include <stdarg.h>
 
-#include "pub_tool_basics.h"  /* For definition of VG_ macro */
+#include "pub_core_basics.h"  /* For definition of VG_ macro */
 
 /* There are no tool-visible exports from m_debuglog, hence no header
    file for it. */
index 9cb06c9905bbf66986ae16f6828f1ca910addda4..08f34e949d878d2a9457ccfe048966d5f787675f 100644 (file)
@@ -31,6 +31,7 @@
 #define __PUB_CORE_GDBSERVER_H
 
 #include "pub_tool_gdbserver.h"
+#include "pub_core_threadstate.h"   // VgSchedReturnCode
 
 /* Return the path prefix for the named pipes (FIFOs) used by vgdb/gdb
    to communicate with valgrind */
similarity index 94%
rename from include/pub_tool_inner.h
rename to coregrind/pub_core_inner.h
index 88c9b355bc3ec7b1e01e6b601ca72e327b0de9b0..8998a65cb31c802ae986da3fe62325abe6f6ad29 100644 (file)
@@ -1,6 +1,6 @@
 
 /*--------------------------------------------------------------------*/
-/*--- Utilities for inner Valgrind                pub_tool_inner.h ---*/
+/*--- Utilities for inner Valgrind                pub_core_inner.h ---*/
 /*--------------------------------------------------------------------*/
 
 /*
@@ -28,8 +28,8 @@
    The GNU General Public License is contained in the file COPYING.
 */
 
-#ifndef __PUB_TOOL_INNER_H
-#define __PUB_TOOL_INNER_H
+#ifndef __PUB_CORE_INNER_H
+#define __PUB_CORE_INNER_H
 
 //--------------------------------------------------------------------
 // PURPOSE: This header should be imported by every  file in Valgrind
@@ -65,7 +65,7 @@
 
 #endif
 
-#endif   // __PUB_TOOL_INNER_H
+#endif   // __PUB_CORE_INNER_H
 
 /*--------------------------------------------------------------------*/
 /*--- end                                                          ---*/
diff --git a/coregrind/pub_core_poolalloc.h b/coregrind/pub_core_poolalloc.h
new file mode 100644 (file)
index 0000000..c8127e6
--- /dev/null
@@ -0,0 +1,42 @@
+
+/*--------------------------------------------------------------------*/
+/*--- A simple pool (memory) allocator.       pub_core_poolalloc.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2013-2013  Florian Krohm florian@eich-krohm.de
+
+   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_POOLALLOC_H
+#define __PUB_CORE_POOLALLOC_H
+
+#include "pub_tool_poolalloc.h"
+
+// No core-only exports;  everything in this module is visible to both
+// the core and tools.
+
+#endif   // __PUB_CORE_POOLALLOC_H
+
+/*--------------------------------------------------------------------*/
+/*--- end                                                          ---*/
+/*--------------------------------------------------------------------*/
index 7e7fa874db919b24969fdfa89165094f9d3b6ef2..6f25ec9d2c12b4a892ed0b1ac342e87b7f63870a 100644 (file)
@@ -40,6 +40,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_threadstate.h"
+#include "pub_core_libcsetjmp.h"   // VG_MINIMAL_JMP_BUF
 
 /*------------------------------------------------------------*/
 /*--- Types                                                ---*/
index c584283ab82144244f4763f03dfdeeb24d983424..47f4c9af4d36e8201f7692751392412f9ae72171 100644 (file)
@@ -14,7 +14,6 @@ nobase_pkginclude_HEADERS = \
        pub_tool_gdbserver.h            \
        pub_tool_poolalloc.h            \
        pub_tool_hashtable.h            \
-       pub_tool_inner.h                \
        pub_tool_libcbase.h             \
        pub_tool_libcassert.h           \
        pub_tool_libcfile.h             \