pub_core_transtab.h \
pub_core_transtab_asm.h \
pub_core_ume.h \
- vki_unistd.h \
- vki_unistd-amd64-linux.h\
- vki_unistd-ppc32-linux.h\
- vki_unistd-ppc64-linux.h\
- vki_unistd-x86-linux.h \
+ pub_core_vkiscnums.h \
m_coredump/priv_elf.h \
m_debuginfo/priv_storage.h \
m_debuginfo/priv_readstabs.h \
m_translate.c \
m_transtab.c \
m_ume.c \
+ m_vkiscnums.c \
m_aspacemgr/aspacemgr.c \
m_debuginfo/storage.c \
m_debuginfo/readdwarf.c \
#include "pub_core_options.h" // VG_(clo_sanity_level)
-#include "vki_unistd.h" // __NR_* constants
+#include "pub_core_vkiscnums.h" // __NR_* constants
#include "pub_core_aspacemgr.h" // self
#include "pub_core_syscall.h"
#include "pub_core_tooliface.h" // For VG_(details).{name,bug_reports_to}
#include "pub_core_options.h" // For VG_(clo_xml)
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* ---------------------------------------------------------------------
Assertery.
#include "pub_core_libcproc.h" // VG_(getpid), VG_(getppid)
#include "pub_core_clientstate.h" // VG_(fd_hard_limit)
#include "pub_core_syscall.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* ---------------------------------------------------------------------
File stuff
#include "pub_core_mallocfree.h"
#include "pub_core_syscall.h"
#include "pub_core_clientstate.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* ---------------------------------------------------------------------
Command line and environment stuff
#include "pub_core_libcassert.h"
#include "pub_core_libcsignal.h"
#include "pub_core_syscall.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* sigemptyset, sigfullset, sigaddset and sigdelset return 0 on
success and -1 on error. */
#include "pub_core_tooliface.h"
#include "pub_core_translate.h" // For VG_(translate)()
#include "pub_core_transtab.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
#include "priv_sema.h"
/* #include "pub_core_debuginfo.h" */ // DEBUGGING HACK ONLY
#include "pub_core_syswrap.h"
#include "pub_core_tooliface.h"
#include "pub_core_coredump.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* ---------------------------------------------------------------------
*/
#include "pub_core_basics_asm.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
#include "libvex_guest_offsets.h"
#include "priv_types_n_macros.h"
#include "priv_syswrap-generic.h"
-#include "vki_unistd.h" /* for the __NR_* constants */
+#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
/* Returns True iff address range is something the client can
#include "priv_syswrap-generic.h"
#include "priv_syswrap-linux.h"
-#include "vki_unistd.h" /* for the __NR_* constants */
+#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
// Run a thread from beginning to end and return the thread's
// scheduler-return-code.
#include "priv_syswrap-linux-variants.h" /* decls of linux variant wrappers */
#include "priv_syswrap-main.h"
-#include "vki_unistd.h" /* for the __NR_* constants */
+#include "pub_core_vkiscnums.h" /* for the __NR_* constants */
/* ---------------------------------------------------------------------
*/
#include "pub_core_basics_asm.h"
-#include "vki_unistd.h"
+#include "pub_core_vkiscnums.h"
/* ------------------ SIMULATED CPU HELPERS ------------------ */
/*
#include "pub_core_libcassert.h" // VG_(exit), vg_assert
#include "pub_core_mallocfree.h" // VG_(malloc), VG_(free)
#include "pub_core_syscall.h" // VG_(strerror)
-#include "vki_unistd.h" // mmap-related constants
+#include "pub_core_vkiscnums.h" // mmap-related constants
#include "pub_core_ume.h"
pub_tool_stacktrace.h \
pub_tool_threadstate.h \
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_posixtypes-amd64-linux.h \
- vki_posixtypes-ppc32-linux.h \
- vki_posixtypes-ppc64-linux.h \
- vki_posixtypes-x86-linux.h
+ vki/vki-scnums-amd64-linux.h \
+ vki/vki-scnums-ppc32-linux.h \
+ vki/vki-scnums-ppc64-linux.h \
+ vki/vki-scnums-x86-linux.h
/*--------------------------------------------------------------------*/
-/*--- Generic header for Valgrind's kernel interface. ---*/
-/*--- vki_unistd.h ---*/
+/*--- Top level for kernel interface system call numbers. ---*/
+/*--- pub_tool_vkiscnums.h ---*/
/*--------------------------------------------------------------------*/
/*
This file is part of Valgrind, a dynamic binary instrumentation
framework.
- Copyright (C) 2005 Nicholas Nethercote
+ 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
The GNU General Public License is contained in the file COPYING.
*/
-#ifndef __VKI_UNISTD_H
-#define __VKI_UNISTD_H
+/* This file defines the system call numbers.
+
+ On Linux they are a bunch of #define'd constants of the form
+ __NR_name, and this file must contain nothing else, since it will
+ be included in assembly code (m_trampoline.S).
+
+ On AIX the __NR_name consts are renamings of global variables which
+ tell us the number for each syscall. This elaboration is necessary
+ because on AIX the syscall numbers are not constant; they can be
+ different for each process (in principle; in practice they rarely
+ change). 32- and 64-bit AIX5 share a common "implementation".
+
+ 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_vkiscnums.h.
+*/
+
+#ifndef __PUB_TOOL_VKISCNUMS_H
+#define __PUB_TOOL_VKISCNUMS_H
#if defined(VGP_x86_linux)
-# include "vki_unistd-x86-linux.h"
+# include "vki/vki-scnums-x86-linux.h"
#elif defined(VGP_amd64_linux)
-# include "vki_unistd-amd64-linux.h"
+# include "vki/vki-scnums-amd64-linux.h"
#elif defined(VGP_ppc32_linux)
-# include "vki_unistd-ppc32-linux.h"
+# include "vki/vki-scnums-ppc32-linux.h"
#elif defined(VGP_ppc64_linux)
-# include "vki_unistd-ppc64-linux.h"
+# include "vki/vki-scnums-ppc64-linux.h"
+#elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+# include "vki/vki-scnums-aix5.h"
#else
# error Unknown platform
#endif
-#endif // __VKI_UNISTD_H
+#endif // __PUB_TOOL_VKISCNUMS_H
/*--------------------------------------------------------------------*/
/*--- end ---*/
+/*--------------------------------------------------------------------*/
+/*--- System call numbers for amd64-linux. ---*/
+/*--- vki-scnums-amd64-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
/*
This file is part of Valgrind, a dynamic binary instrumentation
framework.
The GNU General Public License is contained in the file COPYING.
*/
-#ifndef __VKI_UNISTD_AMD64_LINUX_H
-#define __VKI_UNISTD_AMD64_LINUX_H
+#ifndef __VKI_SCNUMS_AMD64_LINUX_H
+#define __VKI_SCNUMS_AMD64_LINUX_H
// From linux-2.6.9/include/asm-x86_64/unistd.h
#define __NR_sync_file_range 277
#define __NR_vmsplice 278
-#endif /* __VKI_UNISTD_AMD64_LINUX_H */
+#endif /* __VKI_SCNUMS_AMD64_LINUX_H */
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------*/
+/*--- System call numbers for ppc32-linux. ---*/
+/*--- vki-scnums-ppc32-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
/*
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
The GNU General Public License is contained in the file COPYING.
*/
-#ifndef __VKI_UNISTD_PPC32_LINUX_H
-#define __VKI_UNISTD_PPC32_LINUX_H
+#ifndef __VKI_SCNUMS_PPC32_LINUX_H
+#define __VKI_SCNUMS_PPC32_LINUX_H
// From linux-2.6.9/include/asm-ppc/unistd.h
#define __NR_syscalls 301
-#endif /* __VKI_UNISTD_PPC32_LINUX_H */
+#endif /* __VKI_SCNUMS_PPC32_LINUX_H */
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+/*--------------------------------------------------------------------*/
+/*--- System call numbers for ppc64-linux. ---*/
+/*--- vki-scnums-ppc64-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
/*
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
The GNU General Public License is contained in the file COPYING.
*/
-#ifndef __VKI_UNISTD_PPC64_LINUX_H
-#define __VKI_UNISTD_PPC64_LINUX_H
+#ifndef __VKI_SCNUMS_PPC64_LINUX_H
+#define __VKI_SCNUMS_PPC64_LINUX_H
// From linux-2.6.16-rc4/include/asm-powerpc/unistd.h
#define __NR_get_robust_list 299
#define __NR_set_robust_list 300
-#endif /* __VKI_UNISTD_PPC64_LINUX_H */
+#endif /* __VKI_SCNUMS_PPC64_LINUX_H */
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+/*--------------------------------------------------------------------*/
+/*--- System call numbers for x86-linux. ---*/
+/*--- vki-scnums-x86-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
/*
This file is part of Valgrind, a dynamic binary instrumentation
framework.
The GNU General Public License is contained in the file COPYING.
*/
-#ifndef __VKI_UNISTD_X86_LINUX_H
-#define __VKI_UNISTD_X86_LINUX_H
+#ifndef __VKI_SCNUMS_X86_LINUX_H
+#define __VKI_SCNUMS_X86_LINUX_H
// From linux-2.6.9/include/asm-i386/unistd.h
#define __NR_tee 315
#define __NR_vmsplice 316
-#endif /* __VKI_UNISTD_X86_LINUX_H */
+#endif /* __VKI_SCNUMS_X86_LINUX_H */
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
-#include "../../../coregrind/vki_unistd-x86-linux.h"
+#include "../../../include/vki/vki-scnums-x86-linux.h"
#include <assert.h>
#include <errno.h>