From: Nicholas Nethercote Date: Fri, 10 Sep 2004 14:23:59 +0000 (+0000) Subject: Arch-abstraction: X-Git-Tag: svn/VALGRIND_3_0_0~1604 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8d85f7180d4e200a0cfca3db00006fb81bf0d5b;p=thirdparty%2Fvalgrind.git Arch-abstraction: - create coregrind/x86-linux/ directory. - move vg_unistd.h into x86-linux/, because it's platform-dependent. Also rename it as vki_unistd.h to make clear it's a kernel interface thing. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2681 --- diff --git a/Makefile.core-AM_CPPFLAGS.am b/Makefile.core-AM_CPPFLAGS.am index ff660077e6..2e889b4f10 100644 --- a/Makefile.core-AM_CPPFLAGS.am +++ b/Makefile.core-AM_CPPFLAGS.am @@ -1,5 +1,6 @@ add_includes = -I$(top_builddir)/coregrind -I$(top_srcdir)/coregrind \ -I$(top_srcdir)/coregrind/$(VG_ARCH) \ + -I$(top_srcdir)/coregrind/$(VG_PLATFORM) \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/include/$(VG_ARCH) diff --git a/README_MISSING_SYSCALL_OR_IOCTL b/README_MISSING_SYSCALL_OR_IOCTL index a67fe06146..ad919252ec 100644 --- a/README_MISSING_SYSCALL_OR_IOCTL +++ b/README_MISSING_SYSCALL_OR_IOCTL @@ -96,7 +96,7 @@ following: grep NNN /usr/include/asm/unistd.h This should tell you something like __NR_mysyscallname. - Copy this entry to coregrind/vg_unistd.h. + Copy this entry to coregrind/$(VG_PLATFORM)/vki_unistd.h. 2. Do 'man 2 mysyscallname' to get some idea of what the syscall does. Note that the actual kernel interface can differ from this, diff --git a/configure.in b/configure.in index 8867f0749d..ffb10099c6 100644 --- a/configure.in +++ b/configure.in @@ -397,6 +397,7 @@ AC_OUTPUT( coregrind/demangle/Makefile coregrind/docs/Makefile coregrind/x86/Makefile + coregrind/x86-linux/Makefile addrcheck/Makefile addrcheck/tests/Makefile addrcheck/docs/Makefile diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 49ab635a72..aa505b35b5 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.all.am include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am -SUBDIRS = $(VG_ARCH) demangle . docs +SUBDIRS = $(VG_ARCH) $(VG_PLATFORM) demangle . docs AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" -I$(srcdir)/demangle \ -DKICKSTART_BASE=$(KICKSTART_BASE) \ @@ -145,7 +145,6 @@ noinst_HEADERS = \ ume.h \ ume_arch.h \ vg_symtab2.h \ - vg_unistd.h \ vg_symtypes.h \ vg_toolint.h \ vg_unsafe.h diff --git a/coregrind/core.h b/coregrind/core.h index 12285de3ae..bce17e3df3 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -81,7 +81,7 @@ /* For system call numbers __NR_... */ -#include "vg_unistd.h" +#include "vki_unistd.h" #include "core_asm.h" // asm stuff #include "tool.h" // tool stuff diff --git a/coregrind/vg_cpuid.S b/coregrind/vg_cpuid.S index 4b1ba8ddc5..439e6e1258 100644 --- a/coregrind/vg_cpuid.S +++ b/coregrind/vg_cpuid.S @@ -30,7 +30,7 @@ */ #include "core_asm.h" -#include "vg_unistd.h" +#include "vki_unistd.h" /* int VG_(cpuid)(UInt eax, diff --git a/coregrind/vg_syscall.S b/coregrind/vg_syscall.S index 7258adc6a8..24249c13ac 100644 --- a/coregrind/vg_syscall.S +++ b/coregrind/vg_syscall.S @@ -30,7 +30,7 @@ */ #include "core_asm.h" -#include "vg_unistd.h" +#include "vki_unistd.h" .globl VG_(do_syscall) diff --git a/coregrind/vg_unsafe.h b/coregrind/vg_unsafe.h index d5d9167669..e0fede6699 100644 --- a/coregrind/vg_unsafe.h +++ b/coregrind/vg_unsafe.h @@ -33,7 +33,7 @@ /* These includes are only used for making sense of the args for system calls. */ -#include "vg_unistd.h" /* for system call numbers */ +#include "vki_unistd.h" /* for system call numbers */ #include /* for PROT_* */ #include /* for uname */ #include /* for struct timeval & struct timezone */ diff --git a/coregrind/x86-linux/.cvgsigore b/coregrind/x86-linux/.cvgsigore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/coregrind/x86-linux/.cvgsigore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/coregrind/x86-linux/Makefile.am b/coregrind/x86-linux/Makefile.am new file mode 100644 index 0000000000..15936733cc --- /dev/null +++ b/coregrind/x86-linux/Makefile.am @@ -0,0 +1,7 @@ +include $(top_srcdir)/Makefile.all.am +include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am + +AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O -fomit-frame-pointer -g + +noinst_HEADERS = \ + vki_unistd.h diff --git a/coregrind/vg_unistd.h b/coregrind/x86-linux/vki_unistd.h similarity index 98% rename from coregrind/vg_unistd.h rename to coregrind/x86-linux/vki_unistd.h index 1e04dcf1f4..9f200201cb 100644 --- a/coregrind/vg_unistd.h +++ b/coregrind/x86-linux/vki_unistd.h @@ -24,8 +24,9 @@ The GNU General Public License is contained in the file COPYING. */ -#ifndef _VG_ASM_I386_UNISTD_H_ -#define _VG_ASM_I386_UNISTD_H_ +#ifndef __X86_LINUX_VKI_UNISTD_H_ +#define __X86_LINUX_VKI_UNISTD_H_ + /* Taken from Linux 2.6.0-test1 include/asm-i386/unistd.h */ /* @@ -319,4 +320,4 @@ #define NR_syscalls 284 -#endif /* _VG_ASM_I386_UNISTD_H_ */ +#endif /* __X86_LINUX_VKI_UNISTD_H_ */