]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix coregrind header files such that they can be included without
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 15 Sep 2013 13:54:34 +0000 (13:54 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 15 Sep 2013 13:54:34 +0000 (13:54 +0000)
having to worry what other header files may have to be included
beforehand.

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

78 files changed:
coregrind/m_debuginfo/priv_d3basics.h
coregrind/m_debuginfo/priv_image.h
coregrind/m_debuginfo/priv_misc.h
coregrind/m_debuginfo/priv_readdwarf.h
coregrind/m_debuginfo/priv_readdwarf3.h
coregrind/m_debuginfo/priv_readelf.h
coregrind/m_debuginfo/priv_readmacho.h
coregrind/m_debuginfo/priv_readpdb.h
coregrind/m_debuginfo/priv_readstabs.h
coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/priv_tytypes.h
coregrind/m_gdbserver/regcache.h
coregrind/m_gdbserver/target.h
coregrind/m_gdbserver/valgrind_low.h
coregrind/m_initimg/priv_initimg_pathscan.h
coregrind/m_scheduler/priv_sched-lock-impl.h
coregrind/m_scheduler/priv_sched-lock.h
coregrind/m_scheduler/priv_sema.h
coregrind/m_syswrap/priv_syswrap-darwin.h
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/priv_syswrap-linux-variants.h
coregrind/m_syswrap/priv_syswrap-linux.h
coregrind/m_syswrap/priv_syswrap-main.h
coregrind/m_syswrap/priv_syswrap-xen.h
coregrind/m_syswrap/priv_types_n_macros.h
coregrind/m_ume/priv_ume.h
coregrind/pub_core_commandline.h
coregrind/pub_core_coredump.h
coregrind/pub_core_cpuid.h
coregrind/pub_core_debugger.h
coregrind/pub_core_demangle.h
coregrind/pub_core_dispatch.h
coregrind/pub_core_initimg.h
coregrind/pub_core_libcassert.h
coregrind/pub_core_machine.h
coregrind/pub_core_redir.h
coregrind/pub_core_replacemalloc.h
coregrind/pub_core_sbprofile.h
coregrind/pub_core_scheduler.h
coregrind/pub_core_sigframe.h
coregrind/pub_core_signals.h
coregrind/pub_core_stacks.h
coregrind/pub_core_stacktrace.h
coregrind/pub_core_syscall.h
coregrind/pub_core_syswrap.h
coregrind/pub_core_threadstate.h
coregrind/pub_core_trampoline.h
coregrind/pub_core_translate.h
coregrind/pub_core_ume.h
coregrind/pub_core_vki.h
include/pub_tool_aspacehl.h
include/pub_tool_aspacemgr.h
include/pub_tool_clientstate.h
include/pub_tool_debuginfo.h
include/pub_tool_execontext.h
include/pub_tool_gdbserver.h
include/pub_tool_hashtable.h
include/pub_tool_libcassert.h
include/pub_tool_libcbase.h
include/pub_tool_libcfile.h
include/pub_tool_libcprint.h
include/pub_tool_libcproc.h
include/pub_tool_libcsetjmp.h
include/pub_tool_libcsignal.h
include/pub_tool_machine.h
include/pub_tool_mallocfree.h
include/pub_tool_options.h
include/pub_tool_oset.h
include/pub_tool_poolalloc.h
include/pub_tool_replacemalloc.h
include/pub_tool_seqmatch.h
include/pub_tool_signals.h
include/pub_tool_sparsewa.h
include/pub_tool_stacktrace.h
include/pub_tool_threadstate.h
include/pub_tool_vkiscnums.h
include/pub_tool_wordfm.h
include/pub_tool_xarray.h

index 61acc7156717d802e0c7cef6beca98b58ea320e1..1dd171c96326402f505797bf3f647d3d51d5098d 100644 (file)
@@ -38,6 +38,8 @@
 #ifndef __PRIV_D3BASICS_H
 #define __PRIV_D3BASICS_H
 
+#include "pub_core_basics.h"       // Addr
+#include "pub_core_debuginfo.h"    // DebugInfo
 
 /* This stuff is taken from gdb-6.6/include/elf/dwarf2.h, which is
    GPL2+.
index 083f0797f647abac5af4c2c7e4d23f201130c3a9..169f3442f438cd0a0986367c35cfd1badadfa62c 100644 (file)
 
 /* Contributed by Julian Seward <jseward@acm.org> */
 
+#ifndef __PRIV_IMAGE_H
+#define __PRIV_IMAGE_H
+
+#include "pub_core_basics.h"    // ULong
+#include "priv_misc.h"          // ML_(dinfo_zalloc)
 
 /*------------------------------------------------------------*/
 /*--- DiImage -- abstract images                           ---*/
@@ -339,7 +344,7 @@ static inline Addr ML_(cur_step_Addr) ( DiCursor* c ) {
    }
 }
 
-
+#endif /* ndef __PRIV_IMAGE_H */
 
 /*--------------------------------------------------------------------*/
 /*--- end                                             priv_image.h ---*/
index ea871dd884e2af7e59c2b0453c30e6c1abac166e..101d230dbed8e8f84448126379ea39fd2be9d0a3 100644 (file)
@@ -36,6 +36,7 @@
 #ifndef __PRIV_MISC_H
 #define __PRIV_MISC_H
 
+#include "pub_core_basics.h"    // SizeT
 
 /* Allocate(zeroed), free, strdup, memdup, all in VG_AR_DINFO. */
 void*  ML_(dinfo_zalloc)( const HChar* cc, SizeT szB );
index a8c6fdbeb278695d47d8020a27ca7a5ce42f3dfc..5b14480e207c4b1feac268b97442b1eb6dff34a4 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PRIV_READDWARF_H
 #define __PRIV_READDWARF_H
 
+#include "pub_core_debuginfo.h"   // DebugInfo
+#include "priv_image.h"           // DiSlice
+
 /*
    Stabs reader greatly improved by Nick Nethercote, Apr 02.
    This module was also extensively hacked on by Jeremy Fitzhardinge
@@ -43,7 +46,7 @@
    -------------------- */
 extern
 void ML_(read_debuginfo_dwarf3)
-        ( struct _DebugInfo* di,
+        ( DebugInfo* di,
           DiSlice escn_debug_info,      /* .debug_info */
           DiSlice escn_debug_types,     /* .debug_types */
           DiSlice escn_debug_abbv,      /* .debug_abbrev */
@@ -55,7 +58,7 @@ void ML_(read_debuginfo_dwarf3)
    DWARF1 reader
    -------------------- */
 extern
-void ML_(read_debuginfo_dwarf1) ( struct _DebugInfo* di,
+void ML_(read_debuginfo_dwarf1) ( DebugInfo* di,
                                   UChar* dwarf1d, Int dwarf1d_sz,
                                   UChar* dwarf1l, Int dwarf1l_sz );
 
@@ -64,7 +67,7 @@ void ML_(read_debuginfo_dwarf1) ( struct _DebugInfo* di,
    -------------------- */
 extern
 void ML_(read_callframe_info_dwarf3)
-        ( /*OUT*/struct _DebugInfo* di,
+        ( /*OUT*/ DebugInfo* di,
           DiSlice escn_frame, Addr frame_avma, Bool is_ehframe );
 
 
index 7cba4e22370862bb7504552ffdd39f0def3eb7b8..5e038a1e8cb20a8867084de669dcd6854dd2542d 100644 (file)
 #ifndef __PRIV_READDWARF3_H
 #define __PRIV_READDWARF3_H
 
+#include "pub_core_debuginfo.h"   // DebugInfo
+#include "priv_image.h"           // DiSlice
 
 /* Read variables and types from DWARF3 ".debug_info" sections. */
 void 
 ML_(new_dwarf3_reader) (
-   struct _DebugInfo* di,
+   DebugInfo* di,
    DiSlice escn_debug_info,      DiSlice escn_debug_types,
    DiSlice escn_debug_abbv,      DiSlice escn_debug_line,
    DiSlice escn_debug_str,       DiSlice escn_debug_ranges,
index a78cbb9332f2183cb227a358bb93337109a2c82f..d5a2a1cbdd47a40cf146b17d0ddc177a2f4ef5d2 100644 (file)
@@ -32,6 +32,9 @@
 #ifndef __PRIV_READELF_H
 #define __PRIV_READELF_H
 
+#include "pub_core_basics.h"     // SizeT
+#include "pub_core_debuginfo.h"  // DebugInfo
+
 /*
    Stabs reader greatly improved by Nick Nethercote, Apr 02.
    This module was also extensively hacked on by Jeremy Fitzhardinge
@@ -48,7 +51,7 @@ extern Bool ML_(is_elf_object_file)( void* image, SizeT n_image, Bool rel_ok );
    info) and anything else we want, into the tables within the
    supplied SegInfo.
 */
-extern Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di );
+extern Bool ML_(read_elf_debug_info) ( DebugInfo* di );
 
 
 #endif /* ndef __PRIV_READELF_H */
index e9da383a79990e4b53bda75b3410ebb24485ff40..c5697cb4f7ecc10ebca31bc2bf82a1dd916eab1b 100644 (file)
@@ -32,6 +32,9 @@
 #ifndef __PRIV_READMACHO_H
 #define __PRIV_READMACHO_H
 
+#include "pub_core_basics.h"     // SizeT
+#include "pub_core_debuginfo.h"  // DebugInfo
+
 /* Identify a Mach-O object file by peering at the first few bytes of
    it. */
 extern Bool ML_(is_macho_object_file)( const void* buf, SizeT size );
@@ -42,7 +45,7 @@ extern Bool ML_(is_macho_object_file)( const void* buf, SizeT size );
    info) and anything else we want, into the tables within the
    supplied DebugInfo.
 */
-extern Bool ML_(read_macho_debug_info) ( struct _DebugInfo* si );
+extern Bool ML_(read_macho_debug_info) ( DebugInfo* si );
 
 
 #endif /* ndef __PRIV_READMACHO_H */
index 328e5f0ba98fcafe40805d8116f9878993cbec8a..5baeff63c6576e3b073200f6ca157800780ed7ca 100644 (file)
@@ -37,6 +37,9 @@
 #ifndef __PRIV_READPDB_H
 #define __PRIV_READPDB_H
 
+#include "pub_core_basics.h"     // Addr
+#include "pub_core_debuginfo.h"  // DebugInfo
+
 /* Returns True if OK, False for any kind of failure. */
 extern Bool ML_(read_pdb_debug_info)(
                DebugInfo* di,
index f0e657dda6f418bd73a9f71937c5ae1940103b25..5b35d09bf1c27929fefc4984d3dc3f529afaa0ba 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PRIV_READSTABS_H
 #define __PRIV_READSTABS_H
 
+#include "pub_core_basics.h"      // UChar
+#include "pub_core_debuginfo.h"   // DebugInfo
+
 /*
    Stabs reader greatly improved by Nick Nethercote, Apr 02.
    This module was also extensively hacked on by Jeremy Fitzhardinge
@@ -41,7 +44,7 @@
    Stabs reader
    -------------------- */
 extern
-void ML_(read_debuginfo_stabs) ( struct _DebugInfo* di,
+void ML_(read_debuginfo_stabs) ( DebugInfo* di,
                                  UChar* stabC,   Int stab_sz,
                                  HChar* stabstr, Int stabstr_sz );
 
index 662837378de580cb198e97dbc83ffa0af76ea0e8..36c93935b895fe71e9f97ed7dd26824ce71d346b 100644 (file)
 #ifndef __PRIV_STORAGE_H
 #define __PRIV_STORAGE_H
 
+#include "pub_core_basics.h"   // Addr
+#include "pub_core_xarray.h"   // XArray
+#include "priv_d3basics.h"     // GExpr et al.
+#include "priv_image.h"        // DiCursor
+
 /* --------------------- SYMBOLS --------------------- */
 
 /* A structure to hold an ELF/MachO symbol (very crudely).  Usually
index 5a208b4c1cde0fb396cb7c664f9dbde46f547eac..5d4dc0c7e0323aea3309123f3e260ed4b2e7fb5f 100644 (file)
 #ifndef __PRIV_TYTYPES_H
 #define __PRIV_TYTYPES_H
 
+#include "pub_core_basics.h"   // UWord
+#include "pub_core_xarray.h"   // XArray
+#include "priv_misc.h"         // MaybeULong
+
 typedef
    enum {
       Te_EMPTY=10, /* empty (contains no info) */
index abd4eb72177d388c50c1a4cdc4e9931bb6883f7c..cb6fef799005a7994045298ba6045fff3f05da50 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef REGCACHE_H
 #define REGCACHE_H
 
+#include "pub_core_basics.h"    // Bool
+
 struct inferior_list_entry;
 
 /* Create a new register cache for INFERIOR.  */
index 2d4949cb079b61f27d43e0ec77fc5a19a89fc6c0..2b783ed3191775f4c807c76b3c8776949032c789 100644 (file)
@@ -26,6 +26,9 @@
 #ifndef TARGET_H
 #define TARGET_H
 
+#include "pub_core_basics.h"    // Addr
+#include "server.h"             // CORE_ADDR
+
 /* This file defines the architecture independent Valgrind gdbserver
    high level operations such as read memory, get/set registers, ...
 
index c8d53cbaf5846913f24c4718045450486fb30444..707d43806f9597a195d34fbbaf45159bb6206a44 100644 (file)
@@ -26,6 +26,9 @@
 #ifndef VALGRIND_LOW_H
 #define VALGRIND_LOW_H
 
+#include "pub_core_basics.h"    // ThreadId
+#include "server.h"             // CORE_ADDR
+
 /* defines the characteristics of the "low" valgrind target architecture.
    In other words, struct valgrind_target_ops defines the functions and 
    data which are specific to the architecture (x86 or amd64 or 
index 1afb9a15d5fa746524ea820a407a751318a4f9a1..deb01589694397a8e7ce55bf74b4f968d196f575 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PRIV_INITIMG_PATHSCAN_H
 #define __PRIV_INITIMG_PATHSCAN_
 
+#include "pub_core_basics.h"   // HChar
+
 extern const HChar* ML_(find_executable) ( const HChar* exec );
 
 #endif
index efff82e22b062b276a860caf264265798d364b55..e49250ccdcba7d048d4c8cd9db919656f3074622 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PRIV_SCHED_LOCK_IMPL_H
 #define __PRIV_SCHED_LOCK_IMPL_H
 
+#include "pub_core_basics.h"    // HChar
+
 struct sched_lock_ops {
    const HChar *(*get_sched_lock_name)(void);
    struct sched_lock *(*create_sched_lock)(void);
index a0b3488015baa13c3ef958dd384f9f46cc284efe..a07d83d21603c4687035c78073dc15824288ee21 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PRIV_SCHED_LOCK_H
 #define __PRIV_SCHED_LOCK_H
 
+#include "pub_core_basics.h"   // Bool
+
 struct sched_lock;
 
 enum SchedLockType { sched_lock_generic, sched_lock_ticket };
index d0443226b9388788609a27b63c773bd45ff0c8a0..1f2f7e955d7197c991443d2526ea0795f6ebcea9 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PRIV_SEMA_H
 #define __PRIV_SEMA_H
 
+#include "pub_core_basics.h"   // Bool
+
 /* Not really a semaphore, but use a pipe for a token-passing scheme */
 typedef struct {
    Int  pipe[2];
index ec012c081c7d176310cb0604a48add8f41716fff..d0ecd23115d494850154fefd8b0021db7a5aa226 100644 (file)
@@ -31,7 +31,8 @@
 #ifndef __PRIV_SYSWRAP_DARWIN_H
 #define __PRIV_SYSWRAP_DARWIN_H
 
-/* requires #include "priv_types_n_macros.h" */
+#include "pub_core_basics.h"         // ThreadId
+#include "priv_types_n_macros.h"     // DECL_TEMPLATE
 
 // syswrap-darwin.c
 Addr allocstack ( ThreadId tid );
index 0aa02611e2accf69b8eab26f2c84dcd60b170c9d..6faf6616ea26a583bb5c81a44bb130544880c3a4 100644 (file)
@@ -31,7 +31,9 @@
 #ifndef __PRIV_SYSWRAP_GENERIC_H
 #define __PRIV_SYSWRAP_GENERIC_H
 
-/* requires #include "priv_types_n_macros.h" */
+#include "pub_core_basics.h"      // ThreadId
+#include "pub_core_vki.h"         // vki_msghdr
+#include "priv_types_n_macros.h"  // DECL_TEMPLATE
 
 
 // Return true if address range entirely contained within client
index 047ea131c2ac459659e207238d6f2e1a961426f6..6bd0563b29e04fca9cf9165c1dd9cdb74ac76060 100644 (file)
@@ -32,8 +32,7 @@
 #ifndef __PRIV_SYSWRAP_LINUX_VARIANTS_H
 #define __PRIV_SYSWRAP_LINUX_VARIANTS_H
 
-/* requires #include "priv_types_n_macros.h" */
-
+#include "pub_core_basics.h"   // ThreadId
 
 /* ---------------------------------------------------------------
    BProc wrappers
index c09dc103adb15d245b6daeb590d2426518b0abd4..482891f416b94e45a6794ce2aa859cf3c6fb6001 100644 (file)
@@ -31,7 +31,8 @@
 #ifndef __PRIV_SYSWRAP_LINUX_H
 #define __PRIV_SYSWRAP_LINUX_H
 
-/* requires #include "priv_types_n_macros.h" */
+#include "pub_core_basics.h"     // ThreadId
+#include "priv_types_n_macros.h" // DECL_TEMPLATE
 
 // Clone-related functions
 extern Word ML_(start_thread_NORETURN) ( void* arg );
index 1fbf8a4c3349ad677f9bc058c26413206b19fe86..46563264b54a9ee37a6b890da7f3f55e75270a91 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PRIV_SYSWRAP_MAIN_H
 #define __PRIV_SYSWRAP_MAIN_H
 
+#include "pub_core_basics.h"        // ThreadID
+#include "pub_core_threadstate.h"   // ThreadArchState
+
 /* Back up a thread so as to restart a system call. */
 extern
 void ML_(fixup_guest_state_to_restart_syscall) ( ThreadArchState* arch );
index 4dc4748d89a8af1bbcb7a4797c2bf76e0b749ed6..b17bc862b016f6dc5ac64e39b844a6aa9c4c8319 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __PRIV_SYSWRAP_XEN_H
 #define __PRIV_SYSWRAP_XEN_H
 
+#include "priv_types_n_macros.h"    // DECL_TEMPLATE
+
 DECL_TEMPLATE(xen, hypercall);
 
 #endif   // __PRIV_SYSWRAP_XEN_H
index ce07877da4456954effc6708952a027addff2ea8..a37ad6ac91f11431841d6259037a6a446d6a0860 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PRIV_TYPES_N_MACROS_H
 #define __PRIV_TYPES_N_MACROS_H
 
+#include "pub_core_basics.h"    // Addr
+
 /* requires #include "pub_core_options.h" */
 /* requires #include "pub_core_signals.h" */
 
index cba484abe6455463177876bfb3a0b4c71cd99820..1b6e561690a9122c0c8b0f664d97fbbc119eeb61 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PRIV_UME_H
 #define __PRIV_UME_H
 
+#include "pub_core_ume.h"   // ExeInfo
+
 extern int VG_(do_exec_inner)(const HChar *exe, ExeInfo *info);
 
 #if defined(VGO_linux)
index 422080cbb8db4566f7eabd65b58cbd53adfad153..4429b19bad016f263294b11777a4b0ecf9d374d3 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef __PUB_CORE_COMMANDLINE_H
 #define __PUB_CORE_COMMANDLINE_H
 
+#include "pub_core_basics.h"      // VG_ macro
 
 /* Split up the args presented by the launcher to m_main.main(), and
    park them in VG_(args_for_client), VG_(args_for_valgrind) and
index b2caa563d9891468c06742ad25929789580faae5..9d94fbf2e8d7507c525b18599d59d8a4a1edbfd0 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_CORE_COREDUMP_H
 #define __PUB_CORE_COREDUMP_H
 
+#include "pub_core_basics.h"      // ThreadId
+#include "pub_core_vki.h"         // vki_siginfo_t
+
 //--------------------------------------------------------------------
 // PURPOSE: This module produces a core dump when asked.
 //--------------------------------------------------------------------
index 269ae57df8d420155de24040b2499ff994c4dd3d..43f4fd91f2dc622440c6a2cd89bfd03aa61b9c80 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_CPUID_H
 #define __PUB_CORE_CPUID_H
 
+#include "pub_core_basics.h"      // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module provides Valgrind's interface to the x86/amd64
 // CPUID instruction.
index c82e60ebc68b20daf6efb18897fbdb1e63c29567..e55df1a25938a21d83ad3225cfa90d1eabe1787e 100644 (file)
@@ -36,6 +36,8 @@
 // running program.
 //--------------------------------------------------------------------
 
+#include "pub_core_basics.h"      // ThreadId
+
 extern void VG_(start_debugger) ( ThreadId tid );
 
 #endif   // __PUB_CORE_DEBUGGER_H
index 749ede18b7a4222a6e9d570ceb1cb018bf5d7125..94b3fffa4fd526d620d8b6d81200432ff778118c 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_DEMANGLE_H
 #define __PUB_CORE_DEMANGLE_H
 
+#include "pub_core_basics.h"      // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module exports functions for demangling C++ and 
 // Z-encoded names.
index 8438556a419a55ffbba7b04e0e3d39d303fc4c8e..bf29e0b46b254d1b6575215f43a98caeb58ea634 100644 (file)
@@ -40,6 +40,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_core_dispatch_asm.h"
+#include "pub_core_basics.h"        // Addr
 
 /* Run translations, with the given guest state, and starting by
    running the host code at 'host_addr'.  It is almost always the case
index 912eced652977afd01bd6fefc17ce596b9ec9167..915583c20e307f9afd502716dcb3b91e0bf52f6e 100644 (file)
@@ -32,6 +32,7 @@
 #ifndef __PUB_CORE_INITIMG_H
 #define __PUB_CORE_INITIMG_H
 
+#include "pub_core_basics.h"      // Addr
 
 //--------------------------------------------------------------------
 // PURPOSE: Map the client executable into memory, then set up its
index b7880d814030e9d99c4fd98961b5a5a0ccdb1cef..2f7e03ed0fce48cb5fec3a49235631ff32bde0b3 100644 (file)
@@ -37,6 +37,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_libcassert.h"
+#include "pub_core_basics.h"      // UnwindStartRegs
 
 // Useful for making failing stubs, when certain things haven't yet been
 // implemented.
index 97324a3807181e72502bfee755dc16506db6dd9a..5652779f0fdd5ac62c8b7d5e93ada8611dd0a017 100644 (file)
@@ -38,6 +38,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_machine.h"
+#include "pub_core_basics.h"      // UnwindStartRegs
 
 // XXX: this is *really* the wrong spot for these things
 #if defined(VGP_x86_linux)
index 1d7811297469e0ee0dfe275c7044999668dc4cb6..1956a103508a0042228dda7f5ae49257e5af0832 100644 (file)
@@ -55,7 +55,8 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_redir.h"
-
+#include "pub_core_basics.h"      // Addr
+#include "pub_core_debuginfo.h"   // DebugInfo
 
 //--------------------------------------------------------------------
 // Notifications - by which we are told of state changes
index e0eabb040d779077ed7cbadf85e0564a4eb8954f..44c0241e59b7c690b32bb5b75e66cff301917803 100644 (file)
@@ -37,6 +37,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_replacemalloc.h"
+#include "pub_core_mallocfree.h"      // vg_mallinfo
 
 // things vg_replace_malloc.o needs to know about
 struct vg_mallocfunc_info {
index 4b5845695d3772c35f6528a61634cafb455ce63e..d5d61273a8932198dc8f0ec693b08769f8baa0c4 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PUB_CORE_SBPROFILE_H
 #define __PUB_CORE_SBPROFILE_H
 
+#include "pub_core_basics.h"   // VG_ macro
+
 /* Get and print a profile.  Also, zero out the counters so that if we
    call it again later, the second call will only show new work done
    since the first call.  ecs_done == 0 is taken to mean this is a
index 60d8c87520510ef4cac76069a58778dd9c16c95f..c011312c32a24a4dfb1225ee1a3c9be765e54e18 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_CORE_SCHEDULER_H
 #define __PUB_CORE_SCHEDULER_H
 
+#include "pub_core_basics.h"        // VG_ macro
+#include "pub_core_threadstate.h"   // VgSchedReturnCode
+
 //--------------------------------------------------------------------
 // PURPOSE: This module is the scheduler, which is the main loop
 // controlling the running of all the program's threads.
index 67b864d940a9debe80427208f84a1d00f457084a..194f666e8d98ae5f18d37a657d1d53dbc856445f 100644 (file)
 #ifndef __PUB_CORE_SIGFRAME_H
 #define __PUB_CORE_SIGFRAME_H
 
+#include "pub_core_basics.h"     // VG_ macro
+#include "pub_tool_vki.h"        // vki_sigset_t et al.
+
 //--------------------------------------------------------------------
 // PURPOSE: This module creates and destroys signal delivery frames
 // for client threads, saving/restoring the thread CPU state in the
 // frame appropriately.
 //--------------------------------------------------------------------
 
-/* There are no tool-visible exports from m_sigframe, hence no header
-   file for it. */
-/* #include "pub_tool_sigframe.h" */
-
 /* Create a signal frame for thread 'tid'. */
 extern 
 void VG_(sigframe_create) ( ThreadId tid, 
index 0731a4f0399ada648d491b51b9bdabdbcef2193e..7560f5aeeaef9fd7fc90643eb2316bde97ab7221 100644 (file)
@@ -36,6 +36,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_signals.h"       // I want to get rid of this header...
+#include "pub_tool_vki.h"           // vki_sigset_t et al.
 
 /* Highest signal the kernel will let us use */
 extern Int VG_(max_signal);
index 0a05b5031df98374ac20070731670b18f405ac6c..4f342f4b18a04979cc779c15bc1ae9782fa3cb49 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_STACKS_H
 #define __PUB_CORE_STACKS_H
 
+#include "pub_core_basics.h"    // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module deals with the registration of stacks for the
 // purposes of detecting stack switches.
index 36c7fd8d87c7fed845228208a645c2275e7d62db..ace9b58e2b405da78da301efaea96c9d047bee46 100644 (file)
@@ -37,6 +37,7 @@
 //--------------------------------------------------------------------
 
 #include "pub_tool_stacktrace.h"
+#include "pub_core_basics.h"         // UnwindStartRegs
 
 // Variant that gives a little more control over the stack-walking
 // (this is the "worker" function that actually does the walking).
index 1648f8c15ccc87a816b948cd2d0a7126409c14b2..6f2eb08bfdbc1327edf954d94220f7b63eadffec 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_SYSCALL_H
 #define __PUB_CORE_SYSCALL_H
 
+#include "pub_core_basics.h"   // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module contains the code for actually executing syscalls.
 //--------------------------------------------------------------------
index 02cc9b731443acc43635493892b952074ba6f473..890d80ec58312a717b87f1212809df71d9d06a19 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_CORE_SYSWRAP_H
 #define __PUB_CORE_SYSWRAP_H
 
+#include "pub_core_basics.h"        // VG_ macro
+#include "pub_core_threadstate.h"   // ThreadArchState
+
 //--------------------------------------------------------------------
 // PURPOSE: This module contains all the syscall junk:  mostly PRE/POST
 // wrappers, but also the main syscall jacketing code.
index 6f25ec9d2c12b4a892ed0b1ac342e87b7f63870a..54dce4a58889bcd4367e7eda957b78b7efc41766 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "pub_tool_threadstate.h"
 #include "pub_core_libcsetjmp.h"   // VG_MINIMAL_JMP_BUF
+#include "pub_core_vki.h"          // vki_sigset_t
 
 /*------------------------------------------------------------*/
 /*--- Types                                                ---*/
index b536edec175df3fdd40b522508eac679a635def7..69f8037ee4f52bff63c93162dda90de13f20ba54 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_TRAMPOLINE_H
 #define __PUB_CORE_TRAMPOLINE_H
 
+#include "pub_core_basics.h"   // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module defines a few replacement functions for Linux
 // vsyscalls, which we can't implement directly.  It also contains
index c399d5886ff743d5dfa040768089a729df434fa2..bdac572d68c2df240279a30d31e56886f68b5cf5 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_TRANSLATE_H
 #define __PUB_CORE_TRANSLATE_H
 
+#include "pub_core_basics.h"   // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module is Valgrind's interface to the JITter.  It's
 // basically a wrapper around Vex.
index 2ac46003249bafd2a280cd0736cd89adc580339d..2903b590f2b2c650eafe9db0f7c893b0eaf86e2e 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_CORE_UME_H
 #define __PUB_CORE_UME_H
 
+#include "pub_core_basics.h"   // VG_ macro
+
 //--------------------------------------------------------------------
 // PURPOSE: This module implements user-mode execve, ie. program loading
 // and exec'ing.
index 457d0f6009157c000c76d38ef36cd5330a74b3c5..8b849b03e25544eb3afc4c227dd6a30b04cd605f 100644 (file)
@@ -42,6 +42,7 @@
    that means the only thing to be done here is ... */
 
 #include "pub_tool_vki.h"
+#include "pub_core_basics.h"   // VG_ macro
 
 /* Do initial consistency checks on some of the definitions to do with
    signals (vki_sigset_t and vki_sigaction_{toK,fromK}_t).  This stuff
index 82cebade3eb64a03deb62007938cc966a30bb4a8..2ec3ccfa58c1f62a34e7ae65ab4eab26405c2c84 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_ASPACEHL_H
 #define __PUB_TOOL_ASPACEHL_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+
 // Extract from aspacem a vector of the current segment start
 // addresses.  The vector is dynamically allocated and should be freed
 // by the caller when done.  REQUIRES m_mallocfree to be running.
index 3f02cfce2211bf2c26b33dbcc33aa226abb2bee2..4924b6142fe0faf163e881c6012cf5f5c6bb5883 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef __PUB_TOOL_ASPACEMGR_H
 #define __PUB_TOOL_ASPACEMGR_H
 
+#include "pub_tool_basics.h"   // VG_ macro
 
 //--------------------------------------------------------------
 // Definition of address-space segments
index d2d8a0672b6265c5fb638f73c6fefdb69375559f..86d3d4779aea4b895bfed90bac338a306d52360d 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_TOOL_CLIENTSTATE_H
 #define __PUB_TOOL_CLIENTSTATE_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+#include "pub_tool_xarray.h"   // XArray
+
 /* Note, this header requires pub_{core,tool}_xarray.h to be
    included ahead of it. */
 
index 2f734c803ec81e2f3ad8385ef8dec3da4d6dd4d9..9421551cd6373e74d148a9919a52a64225b732df 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_DEBUGINFO_H
 #define __PUB_TOOL_DEBUGINFO_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+
 /*====================================================================*/
 /*=== Obtaining debug information                                  ===*/
 /*====================================================================*/
index 66d90a40ba5f59be951e91fa4e0bea1daafc7f46..b7932fd8182c60f17fbdb79aa8c5baacebabf66b 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef __PUB_TOOL_EXECONTEXT_H
 #define __PUB_TOOL_EXECONTEXT_H
 
+#include "pub_tool_basics.h"   // ThreadID
+
 // It's an abstract type.
 typedef
    struct _ExeContext
index 6627a2f32c2a23cb5bdaca800b179427454e7833..c9890ab2a1a6cb9e1028f3049167cc5784a5845b 100644 (file)
@@ -30,6 +30,7 @@
 #ifndef __PUB_TOOL_GDBSERVER_H
 #define __PUB_TOOL_GDBSERVER_H
 
+#include "pub_tool_basics.h"   // VG_ macro
 #include "libvex.h"
 #include "libvex_ir.h"
 
index b8d80f4edd523e246570b55dc519839baf583893..91fe5f2dfa551b65b1a86ed2716a1b6f0d06da32 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_HASHTABLE_H
 #define __PUB_TOOL_HASHTABLE_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+
 /* Generic type for a separately-chained hash table.  Via a kind of dodgy
    C-as-C++ style inheritance, tools can extend the VgHashNode type, so long
    as the first two fields match the sizes of these two fields.  Requires
index 7a2c5bd3fa952d85de471dc385cf824ee4e9b97d..f30010438c454519e0d33b052bbf4f34b28cd61a 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_LIBCBASSERT_H
 #define __PUB_TOOL_LIBCBASSERT_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+
 #define tl_assert(expr)                                                 \
   ((void) (LIKELY(expr) ? 0 :                                           \
            (VG_(assert_fail) (/*isCore?*/False, #expr,                  \
index 05d6bfdf190a8ccec28d8e7f935b4839c0f29ba1..2800dd6ecd0d717d7f4e59a8a7e290b0d35709b6 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_LIBCBASE_H
 #define __PUB_TOOL_LIBCBASE_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+
 /* ---------------------------------------------------------------------
    Char functions.
    ------------------------------------------------------------------ */
index 3b4d7cef711a474c3ee4631b8ca6973b8acb6df7..58e0331dba1d93556657a7850eab089a5b4c5c1f 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_TOOL_LIBCFILE_H
 #define __PUB_TOOL_LIBCFILE_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+#include "pub_tool_vki.h"      // vki_dirent et al.
+
 /* ---------------------------------------------------------------------
    File-related functions.
    ------------------------------------------------------------------ */
index 8536a815b4cd621d044ff461402b0090cae25f8c..775e4f57302f0056564bc38292d15deaf2201a61 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_LIBCPRINT_H
 #define __PUB_TOOL_LIBCPRINT_H
 
+#include "pub_tool_basics.h"      // VG_ macro
+
 /* ---------------------------------------------------------------------
    Formatting functions
    ------------------------------------------------------------------ */
index 7432b82ae49f844c498d5a5dcbdbcfa09dd95a40..d55b9599f91803e6588acd811f2c770ab51481c1 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_TOOL_LIBCPROC_H
 #define __PUB_TOOL_LIBCPROC_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+#include "pub_tool_vki.h"      // vki_rlimit
+
 /* ---------------------------------------------------------------------
    Command-line and environment stuff
    ------------------------------------------------------------------ */
index cb81e93a485f11be74029641fa1d3c2473253aa0..475d16ec26d13da2fda9774a8e4076d62f7803bc 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PUB_TOOL_LIBCSETJMP_H
 #define __PUB_TOOL_LIBCSETJMP_H
 
+#include "pub_tool_basics.h"   // UWord
+
 //--------------------------------------------------------------------
 // PURPOSE: Provides a minimal setjmp/longjmp facility, that saves/
 // restores integer registers, but not necessarily anything more.
index bc5bc9c457a3a6b859e147ae3c331abd8ef7430b..48794bed523688e22d54b4056e7232c25bb07260 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef __PUB_TOOL_LIBCBSIGNAL_H
 #define __PUB_TOOL_LIBCBSIGNAL_H
 
+#include "pub_tool_basics.h"   // VG_ macro
+#include "pub_tool_vki.h"      // vki_sigset
+
 /* Note that these use the vki_ (kernel) structure
    definitions, which are different in places from those that glibc
    defines.  Since we're operating right at the kernel interface, glibc's view
index 99aae0317d661b13d9009179b2efc9c660fa4b36..8029b633cd65b1aceed4c3082b4e74edb3d35623 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef __PUB_TOOL_MACHINE_H
 #define __PUB_TOOL_MACHINE_H
 
+#include "pub_tool_basics.h"           // ThreadID
 #include "libvex.h"                    // VexArchInfo
 
 #if defined(VGP_x86_linux)
index c6c37d1e408772146f0c3fdf0e53cd98c59bad54..e182d1bf5c30f745a85569d999aa7ecabcd04432 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PUB_TOOL_MALLOCFREE_H
 #define __PUB_TOOL_MALLOCFREE_H
 
+#include "pub_tool_basics.h"   // SizeT
+
 // These can be for allocating memory used by tools.
 // Nb: the allocators *always succeed* -- they never return NULL (Valgrind
 // will abort if they can't allocate the memory).
index ef137126561b9b7ac4a03b578ff32ac63ecb0cdc..08d6dba2db011820a592493f88a15f651e8d0995 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef __PUB_TOOL_OPTIONS_H
 #define __PUB_TOOL_OPTIONS_H
 
+#include "pub_tool_basics.h"     // for VG_ macro
 #include "libvex.h"              // for VexControl
 
 
index 9eb789ba7ea51e53c4acd50b5fdbb9a435b60b7d..a22bda6bb8374f258fc3bf7893a2ec47a56da12d 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_OSET_H
 #define __PUB_TOOL_OSET_H
 
+#include "pub_tool_basics.h"   // Word
+
 // This module implements an ordered set, a data structure with fast
 // (eg. amortised log(n) or better) insertion, lookup and deletion of
 // elements.  It does not allow duplicates, and will assert if you insert a
index 385483ddfcb4a89759d2d6f01d7745cd4504e292..f829f0938d79548a4b2c901efd790655637edf20 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_POOLALLOC_H
 #define __PUB_TOOL_POOLALLOC_H
 
+#include "pub_tool_basics.h"   // UWord
+
 //--------------------------------------------------------------------
 // PURPOSE: Provides efficient allocation and free of elements of
 // the same size.
index a44e156236de7f92205214d0ba13e2fd2398e206..e0905737b18e37d9ec248faf8828bf58b916f309 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_REPLACEMALLOC_H
 #define __PUB_TOOL_REPLACEMALLOC_H
 
+#include "pub_tool_basics.h"   // Addr
+
 /* If a tool replaces malloc() et al, the easiest way to do so is to
    link libreplacemalloc_toolpreload.o into its vgpreload_*.so file, and
    use the functions declared below.  You can do it from scratch,
index 075c74d58bdb57e6643b93384830cc8d67885143..28cae8ae3c4e9df9cd331401f6ceb33351e771f1 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PUB_TOOL_SEQMATCH_H
 #define __PUB_TOOL_SEQMATCH_H
 
+#include "pub_tool_basics.h"   // UWord
+
 /* Perform totally abstractified sequence matching, of an input
    sequence against a pattern sequence.  The pattern sequence may
    include '*' elements (matches any number of anything) and '?'
index e5406367749cebde3d4ea5734d072b15ca17024f..3d34d8390a107748fcf676a024bb27f5fd4cb1ce 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_SIGNALS_H
 #define __PUB_TOOL_SIGNALS_H
 
+#include "pub_tool_basics.h"   // Addr
+
 // Register an interest in apparently internal faults; used code which
 // wanders around dangerous memory (ie, leakcheck).  The catcher is
 // not expected to return.
index 5336fee9c17d71d7ed94bb5ce1649e0427621415..4330569968066492d36638871262f42d05891d81 100644 (file)
@@ -32,6 +32,8 @@
 #ifndef __PUB_TOOL_SPARSEWA_H
 #define __PUB_TOOL_SPARSEWA_H
 
+#include "pub_tool_basics.h"   // UWord
+
 //--------------------------------------------------------------------
 // PURPOSE: (see coregrind/pub_core_sparsewa.h for details)
 //--------------------------------------------------------------------
index 8501e0a5bdc2840c79c819a3c242fafffeb55fa2..235dcd60427f03d7283de98d04f8a6b4fc829af8 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_STACKTRACE_H
 #define __PUB_TOOL_STACKTRACE_H
 
+#include "pub_tool_basics.h"   // Addr
+
 // The basic stack trace type:  just an array of code addresses.
 typedef Addr* StackTrace;
 
index a2a41a56e2ba6c5eb69465c5d840bbd7592a8e3c..f48a18c86cfdf6f5f15f5fe15eb198c523c850a0 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_THREADSTATE_H
 #define __PUB_TOOL_THREADSTATE_H
 
+#include "pub_tool_basics.h"   // ThreadID
+
 /* The maximum number of pthreads that we support.  This is
    deliberately not very high since our implementation of some of the
    scheduler algorithms is surely O(N) in the number of threads, since
index 074037b34b62f520b3a9282f90eb39b86ca19d5d..8e03079247a45b9058b729cee80b9a7de8028d2e 100644 (file)
@@ -34,6 +34,7 @@
 #define __PUB_TOOL_VKISCNUMS_H
 
 #include "pub_tool_vkiscnums_asm.h"
+#include "pub_tool_basics.h"    // Word
 
 
 // This converts a syscall number into a string, suitable for printing.  It is
index 15bf76a0e614b024e0f4bf1a264b8f174d4d142b..341adebbe2f7f9db3b285e30326f5654c9b17375 100644 (file)
@@ -52,6 +52,8 @@
 #ifndef __PUB_TOOL_WORDFM_H
 #define __PUB_TOOL_WORDFM_H
 
+#include "pub_tool_basics.h"    // Word
+
 //------------------------------------------------------------------//
 //---                           WordFM                           ---//
 //---                      Public interface                      ---//
index 91484e0943e2c9ea64ef75660c742e7e3859ba0d..16f036bf3b20c9400c67bf6fef61be6f8853f4da 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __PUB_TOOL_XARRAY_H
 #define __PUB_TOOL_XARRAY_H
 
+#include "pub_tool_basics.h"    // Word
+
 //--------------------------------------------------------------------
 // PURPOSE: Provides a simple but useful structure, which is an array
 // in which elements can be added at the end.  The array is expanded