mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.
include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.
This certainly breaks all platforms except x86. Will fix shortly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
This commit is contained in:
parent
4b572a567e
commit
ae8215b3ac
@ -46,6 +46,8 @@
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_libcassert.h" // For VG_BUGS_TO
|
||||
#include "pub_core_vki.h" // Avoids warnings from
|
||||
// pub_core_libcfile.h
|
||||
#include "pub_core_libcfile.h" // For VG_CLO_DEFAULT_LOGPORT
|
||||
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_tool_basics.h"
|
||||
#include "pub_tool_vki.h"
|
||||
#include "pub_tool_debuginfo.h"
|
||||
#include "pub_tool_libcbase.h"
|
||||
#include "pub_tool_libcassert.h"
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#define CLG_GLOBAL
|
||||
|
||||
#include "pub_tool_basics.h"
|
||||
#include "pub_tool_vki.h"
|
||||
#include "pub_tool_debuginfo.h"
|
||||
#include "pub_tool_libcbase.h"
|
||||
#include "pub_tool_libcassert.h"
|
||||
|
||||
@ -108,6 +108,7 @@ noinst_HEADERS = \
|
||||
pub_core_transtab.h \
|
||||
pub_core_transtab_asm.h \
|
||||
pub_core_ume.h \
|
||||
pub_core_vki.h \
|
||||
pub_core_vkiscnums.h \
|
||||
m_coredump/priv_elf.h \
|
||||
m_debuginfo/priv_storage.h \
|
||||
@ -162,6 +163,7 @@ COREGRIND_SOURCES_COMMON = \
|
||||
m_translate.c \
|
||||
m_transtab.c \
|
||||
m_ume.c \
|
||||
m_vki.c \
|
||||
m_vkiscnums.c \
|
||||
m_aspacemgr/aspacemgr.c \
|
||||
m_debuginfo/storage.c \
|
||||
|
||||
@ -46,6 +46,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "pub_core_debuglog.h"
|
||||
#include "pub_core_vki.h" // Avoids warnings from
|
||||
// pub_core_libcfile.h
|
||||
#include "pub_core_libcproc.h" // For VALGRIND_LIB, VALGRIND_LAUNCHER
|
||||
#include "pub_core_ume.h"
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
minimal set of imports. */
|
||||
|
||||
#include "pub_core_basics.h" // types
|
||||
#include "pub_core_vki.h"
|
||||
|
||||
#include "pub_core_debuglog.h" // VG_(debugLog)
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_clientstate.h"
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcfile.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_machine.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_coredump.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_clientstate.h"
|
||||
#include "pub_core_debugger.h"
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_debuginfo.h" /* self */
|
||||
#include "pub_core_demangle.h"
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcprint.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h" // For VG_N_THREADS
|
||||
#include "pub_core_debugger.h"
|
||||
#include "pub_core_debuginfo.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcfile.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_debuglog.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcprint.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcsignal.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_clientstate.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_debuglog.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
------------------------------------------------------------------ */
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h" // VKI_EINVAL, VKI_ENOMEM, VKI_PAGE_SIZE
|
||||
#include "pub_core_clreq.h" // for VALGRIND_INTERNAL_PRINTF,
|
||||
// VALGRIND_NON_SIMD_CALL[12]
|
||||
#include "pub_core_debuginfo.h" // needed for pub_core_redir.h :(
|
||||
|
||||
@ -58,6 +58,8 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_vkiscnums.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
#include "pub_core_clreq.h" // for VG_USERREQ__*
|
||||
@ -81,7 +83,6 @@
|
||||
#include "pub_core_tooliface.h"
|
||||
#include "pub_core_translate.h" // For VG_(translate)()
|
||||
#include "pub_core_transtab.h"
|
||||
#include "pub_core_vkiscnums.h"
|
||||
#include "priv_sema.h"
|
||||
|
||||
/* #include "pub_core_debuginfo.h" */ // DEBUGGING HACK ONLY
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_core_libcfile.h"
|
||||
#include "pub_core_libcproc.h" // For VG_(gettid)()
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_aspacemgr.h" /* find_segment */
|
||||
#include "pub_core_libcbase.h"
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_debuglog.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_clientstate.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_debuginfo.h"
|
||||
#include "pub_core_aspacemgr.h" // For VG_(is_addressable)()
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_syscall.h"
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_vkiscnums.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
|
||||
#include "pub_core_aspacemgr.h"
|
||||
@ -55,8 +57,6 @@
|
||||
#include "priv_types_n_macros.h"
|
||||
#include "priv_syswrap-generic.h"
|
||||
|
||||
#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
|
||||
|
||||
|
||||
/* Returns True iff address range is something the client can
|
||||
plausibly mess with: all of it is either already belongs to the
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_vkiscnums.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
|
||||
@ -53,7 +55,6 @@
|
||||
#include "priv_syswrap-generic.h"
|
||||
#include "priv_syswrap-linux.h"
|
||||
|
||||
#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
|
||||
|
||||
// Run a thread from beginning to end and return the thread's
|
||||
// scheduler-return-code.
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
|
||||
#include "libvex_guest_offsets.h"
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
@ -34,6 +34,8 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_vkiscnums.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_debuginfo.h" // VG_(di_notify_mmap)
|
||||
#include "pub_core_aspacemgr.h"
|
||||
@ -58,8 +60,6 @@
|
||||
#include "priv_syswrap-linux-variants.h" /* decls of linux variant wrappers */
|
||||
#include "priv_syswrap-main.h"
|
||||
|
||||
#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
clone() handling
|
||||
|
||||
@ -61,6 +61,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_errormgr.h"
|
||||
#include "pub_core_execontext.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_aspacemgr.h"
|
||||
|
||||
#include "pub_core_machine.h" // VG_(fnptr_to_fnentry)
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
// included ahead of the glibc ones. This fix is a kludge; the right
|
||||
// solution is to entirely remove the glibc dependency.
|
||||
#include "pub_core_basics.h"
|
||||
#include "pub_core_vki.h"
|
||||
#include "pub_core_aspacemgr.h" // various mapping fns
|
||||
#include "pub_core_debuglog.h"
|
||||
#include "pub_core_libcbase.h"
|
||||
|
||||
43
coregrind/m_vki.c
Normal file
43
coregrind/m_vki.c
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- Notional "implementation" for m_vki. ---*/
|
||||
/*--- m_vki.c ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
This file is part of Valgrind, a dynamic binary instrumentation
|
||||
framework.
|
||||
|
||||
Copyright (C) 2006-2006 OpenWorks LLP
|
||||
info@open-works.co.uk
|
||||
|
||||
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 "pub_core_basics.h"
|
||||
#include "pub_core_vki.h" /* self */
|
||||
|
||||
/* We have pub_{core,tool}_vki.h. This is the matching implementation
|
||||
for that interface. In fact there is no implementation, as the
|
||||
sole purpose of the module is to export types and constants
|
||||
describing the kernel interface, so this file is empty. */
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end m_vki.c ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
50
coregrind/pub_core_vki.h
Normal file
50
coregrind/pub_core_vki.h
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- Top level for kernel interface declarations. ---*/
|
||||
/*--- pub_core_vki.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
This file is part of Valgrind, a dynamic binary instrumentation
|
||||
framework.
|
||||
|
||||
Copyright (C) 2000-2006 Julian Seward
|
||||
jseward@acm.org
|
||||
Copyright (C) 2005-2006 Nicholas Nethercote
|
||||
njn@valgrind.org
|
||||
Copyright (C) 2006-2006 OpenWorks LLP
|
||||
info@open-works.co.uk
|
||||
|
||||
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_VKI_H
|
||||
#define __PUB_CORE_VKI_H
|
||||
|
||||
/* Most unfortunately, all the kernel decls are visible to tools. Not
|
||||
really necessary, but to avoid this would require some tedious
|
||||
refactoring of the sources. Anyway, we live with this kludge, and
|
||||
that means the only thing to be done here is ... */
|
||||
|
||||
#include "pub_tool_vki.h"
|
||||
|
||||
#endif // __PUB_CORE_VKI_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
@ -43,6 +43,7 @@
|
||||
// fundamentals in each case.
|
||||
|
||||
#include "pub_tool_basics.h"
|
||||
#include "pub_tool_vki.h"
|
||||
#include "pub_tool_threadstate.h"
|
||||
#include "pub_tool_aspacemgr.h"
|
||||
#include "pub_tool_debuginfo.h"
|
||||
|
||||
@ -30,11 +30,16 @@ incinc_HEADERS = \
|
||||
pub_tool_tooliface.h \
|
||||
pub_tool_vkiscnums.h \
|
||||
valgrind.h \
|
||||
vki-linux.h \
|
||||
vki-amd64-linux.h \
|
||||
vki-ppc32-linux.h \
|
||||
vki-ppc64-linux.h \
|
||||
vki-x86-linux.h \
|
||||
vki/vki-linux.h \
|
||||
vki/vki-amd64-linux.h \
|
||||
vki/vki-ppc32-linux.h \
|
||||
vki/vki-ppc64-linux.h \
|
||||
vki/vki-x86-linux.h \
|
||||
vki/vki-linux.h \
|
||||
vki/vki-posixtypes-amd64-linux.h \
|
||||
vki/vki-posixtypes-ppc32-linux.h \
|
||||
vki/vki-posixtypes-ppc64-linux.h \
|
||||
vki/vki-posixtypes-x86-linux.h \
|
||||
vki/vki-scnums-amd64-linux.h \
|
||||
vki/vki-scnums-ppc32-linux.h \
|
||||
vki/vki-scnums-ppc64-linux.h \
|
||||
|
||||
@ -52,13 +52,6 @@
|
||||
// For varargs types
|
||||
#include <stdarg.h>
|
||||
|
||||
// Kernel types. Might as well have them here, they're used so broadly
|
||||
// (eg. in pub_core_threadstate.h).
|
||||
#if defined(VGO_linux)
|
||||
# include "vki-linux.h"
|
||||
#else
|
||||
# error Unknown OS
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
builtin types
|
||||
|
||||
62
include/pub_tool_vki.h
Normal file
62
include/pub_tool_vki.h
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- Top level for kernel interface declarations. ---*/
|
||||
/*--- pub_tool_vki.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
This file is part of Valgrind, a dynamic binary instrumentation
|
||||
framework.
|
||||
|
||||
Copyright (C) 2000-2006 Julian Seward
|
||||
jseward@acm.org
|
||||
Copyright (C) 2005-2006 Nicholas Nethercote
|
||||
njn@valgrind.org
|
||||
Copyright (C) 2006-2006 OpenWorks LLP
|
||||
info@open-works.co.uk
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
/* This file defines types and constants for the kernel interface, and to
|
||||
make that clear everything is prefixed VKI_/vki_.
|
||||
|
||||
This file is merely a top-level "steering" file, which pulls in the
|
||||
correct bits for the relevant platform. You should not directly
|
||||
#include any file in include/vki; instead #include only this one or
|
||||
pub_core_vki.h.
|
||||
*/
|
||||
|
||||
#ifndef __PUB_TOOL_VKI_H
|
||||
#define __PUB_TOOL_VKI_H
|
||||
|
||||
#if defined(VGO_linux)
|
||||
# include "vki/vki-linux.h"
|
||||
#elif defined(VGP_ppc32_aix5)
|
||||
# include "vki/vki-ppc32-aix5.h"
|
||||
#elif defined(VGP_ppc64_aix5)
|
||||
# include "vki/vki-ppc64-aix5.h"
|
||||
#else
|
||||
# error Unknown Plat/OS
|
||||
#endif
|
||||
|
||||
#endif // __PUB_TOOL_VKI_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end pub_tool_vki.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
@ -57,6 +57,21 @@
|
||||
definitions, which affects some of them.
|
||||
*/
|
||||
|
||||
/* The structure is (aiui, jrs 20060504):
|
||||
|
||||
#include plat-specific posix types (vki-posixtypes-ARCH-linux.h)
|
||||
|
||||
Lots more types, structs, consts, in this file
|
||||
|
||||
#include other plat-specific stuff (vki-ARCH-linux.h)
|
||||
|
||||
Even more types, structs, consts, in this file
|
||||
|
||||
The system call numbers are dealt with by
|
||||
pub_{core,tool}_vkiscnums.h, not via pub_{core,tool}_vki.h, which
|
||||
is what this file is part of.
|
||||
*/
|
||||
|
||||
#ifndef __VKI_LINUX_H
|
||||
#define __VKI_LINUX_H
|
||||
|
||||
@ -65,13 +80,13 @@
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#if defined(VGA_x86)
|
||||
# include "vki_posixtypes-x86-linux.h"
|
||||
# include "vki-posixtypes-x86-linux.h"
|
||||
#elif defined(VGA_amd64)
|
||||
# include "vki_posixtypes-amd64-linux.h"
|
||||
# include "vki-posixtypes-amd64-linux.h"
|
||||
#elif defined(VGA_ppc32)
|
||||
# include "vki_posixtypes-ppc32-linux.h"
|
||||
# include "vki-posixtypes-ppc32-linux.h"
|
||||
#elif defined(VGA_ppc64)
|
||||
# include "vki_posixtypes-ppc64-linux.h"
|
||||
# include "vki-posixtypes-ppc64-linux.h"
|
||||
#else
|
||||
# error Unknown platform
|
||||
#endif
|
||||
@ -2121,8 +2136,6 @@ struct vki_serial_icounter_struct {
|
||||
int reserved[9];
|
||||
};
|
||||
|
||||
#endif // __VKI_LINUX_H
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-2.6.16/include/linux/vt.h
|
||||
//----------------------------------------------------------------------
|
||||
@ -2172,6 +2185,8 @@ struct vki_vt_consize {
|
||||
#define VKI_VT_LOCKSWITCH 0x560B /* disallow vt switching */
|
||||
#define VKI_VT_UNLOCKSWITCH 0x560C /* allow vt switching */
|
||||
|
||||
#endif // __VKI_LINUX_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- AMD64/Linux-specific kernel interface: posix types. ---*/
|
||||
/*--- vki_posixtypes-amd64-linux.h ---*/
|
||||
/*--- vki-posixtypes-amd64-linux.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- PPC32/Linux-specific kernel interface: posix types. ---*/
|
||||
/*--- vki_posixtypes-ppc32-linux.h ---*/
|
||||
/*--- vki-posixtypes-ppc32-linux.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
@ -29,8 +29,8 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#ifndef __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#define __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#ifndef __VKI_POSIXTYPES_PPC32_LINUX_H
|
||||
#define __VKI_POSIXTYPES_PPC32_LINUX_H
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-2.6.9/include/asm-ppc/posix_types.h
|
||||
@ -61,7 +61,7 @@ typedef struct {
|
||||
int val[2];
|
||||
} __vki_kernel_fsid_t;
|
||||
|
||||
#endif // __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#endif // __VKI_POSIXTYPES_PPC32_LINUX_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- PPC64/Linux-specific kernel interface: posix types. ---*/
|
||||
/*--- vki_posixtypes-ppc64-linux.h ---*/
|
||||
/*--- vki-posixtypes-ppc64-linux.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
@ -29,8 +29,8 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#ifndef __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#define __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#ifndef __VKI_POSIXTYPES_PPC64_LINUX_H
|
||||
#define __VKI_POSIXTYPES_PPC64_LINUX_H
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-2.6.13/include/asm-ppc64/posix_types.h
|
||||
@ -68,7 +68,7 @@ typedef struct {
|
||||
int val[2];
|
||||
} __vki_kernel_fsid_t;
|
||||
|
||||
#endif // __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
|
||||
#endif // __VKI_POSIXTYPES_PPC64_LINUX_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- x86/Linux-specific kernel interface: posix types. ---*/
|
||||
/*--- vki_posixtypes-x86-linux.h ---*/
|
||||
/*--- vki-posixtypes-x86-linux.h ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
@ -7,7 +7,7 @@
|
||||
This file is part of Valgrind, a dynamic binary instrumentation
|
||||
framework.
|
||||
|
||||
Copyright (C) 2005 Julian Seward
|
||||
Copyright (C) 2005-2006 Julian Seward
|
||||
jseward@acm.org
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -28,8 +28,8 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#ifndef __PPC32_LINUX_VKI_ARCH_H
|
||||
#define __PPC32_LINUX_VKI_ARCH_H
|
||||
#ifndef __VKI_PPC32_LINUX_H
|
||||
#define __VKI_PPC32_LINUX_H
|
||||
|
||||
// ppc32 is big-endian.
|
||||
#define VKI_BIG_ENDIAN 1
|
||||
@ -912,7 +912,7 @@ struct vki_shminfo64 {
|
||||
// And that's it!
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#endif // __PPC32_LINUX_VKI_ARCH_H
|
||||
#endif // __VKI_PPC32_LINUX_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
@ -7,7 +7,7 @@
|
||||
This file is part of Valgrind, a dynamic binary instrumentation
|
||||
framework.
|
||||
|
||||
Copyright (C) 2005 Julian Seward
|
||||
Copyright (C) 2005-2006 Julian Seward
|
||||
jseward@acm.org
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -28,8 +28,8 @@
|
||||
The GNU General Public License is contained in the file COPYING.
|
||||
*/
|
||||
|
||||
#ifndef __PPC64_LINUX_VKI_ARCH_H
|
||||
#define __PPC64_LINUX_VKI_ARCH_H
|
||||
#ifndef __VKI_PPC64_LINUX_H
|
||||
#define __VKI_PPC64_LINUX_H
|
||||
|
||||
// ppc64 is big-endian.
|
||||
#define VKI_BIG_ENDIAN 1
|
||||
@ -753,7 +753,7 @@ struct vki_shminfo64 {
|
||||
// end
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#endif // __PPC64_LINUX_VKI_ARCH_H
|
||||
#endif // __VKI_PPC64_LINUX_H
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end ---*/
|
||||
@ -35,6 +35,7 @@
|
||||
// structures below for more info on how things work.
|
||||
|
||||
#include "pub_tool_basics.h"
|
||||
#include "pub_tool_vki.h"
|
||||
#include "pub_tool_aspacemgr.h"
|
||||
#include "pub_tool_debuginfo.h"
|
||||
#include "pub_tool_hashtable.h"
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "pub_tool_basics.h"
|
||||
#include "pub_tool_vki.h"
|
||||
#include "pub_tool_aspacemgr.h"
|
||||
#include "pub_tool_execontext.h"
|
||||
#include "pub_tool_hashtable.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user