Fix coregrind header files such that they can be included without

having to worry what other header files may have to be included
beforehand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549
This commit is contained in:
Florian Krohm 2013-09-15 13:54:34 +00:00
parent 5c4ba95a27
commit a6c7a2893c
78 changed files with 172 additions and 18 deletions

View 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+.

View File

@ -30,6 +30,11 @@
/* 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 ---*/

View 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 );

View 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 );

View File

@ -37,11 +37,13 @@
#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,

View 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 */

View 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 */

View 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,

View 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 );

View File

@ -43,6 +43,11 @@
#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

View File

@ -36,6 +36,10 @@
#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) */

View 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. */

View 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, ...

View 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

View 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

View 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);

View 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 };

View 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];

View 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 );

View 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

View 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

View 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 );

View 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 );

View 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

View 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" */

View 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)

View 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

View 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.
//--------------------------------------------------------------------

View 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.

View 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

View 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.

View 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

View 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

View 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.

View 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)

View 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

View 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 {

View 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

View 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.

View File

@ -32,16 +32,15 @@
#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,

View 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);

View 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.

View 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).

View 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.
//--------------------------------------------------------------------

View 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.

View 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 ---*/

View 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

View 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.

View 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.

View 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

View 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.

View 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

View 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. */

View 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 ===*/
/*====================================================================*/

View 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

View 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"

View 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

View 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, \

View File

@ -31,6 +31,8 @@
#ifndef __PUB_TOOL_LIBCBASE_H
#define __PUB_TOOL_LIBCBASE_H
#include "pub_tool_basics.h" // VG_ macro
/* ---------------------------------------------------------------------
Char functions.
------------------------------------------------------------------ */

View 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.
------------------------------------------------------------------ */

View File

@ -31,6 +31,8 @@
#ifndef __PUB_TOOL_LIBCPRINT_H
#define __PUB_TOOL_LIBCPRINT_H
#include "pub_tool_basics.h" // VG_ macro
/* ---------------------------------------------------------------------
Formatting functions
------------------------------------------------------------------ */

View 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
------------------------------------------------------------------ */

View 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.

View 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

View 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)

View 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).

View 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

View 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

View 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.

View 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,

View 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 '?'

View 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.

View 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)
//--------------------------------------------------------------------

View 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;

View 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

View 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

View File

@ -52,6 +52,8 @@
#ifndef __PUB_TOOL_WORDFM_H
#define __PUB_TOOL_WORDFM_H
#include "pub_tool_basics.h" // Word
//------------------------------------------------------------------//
//--- WordFM ---//
//--- Public interface ---//

View 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