You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(21) |
2
(18) |
3
(19) |
4
(17) |
|
5
(6) |
6
(5) |
7
(9) |
8
(21) |
9
(16) |
10
(21) |
11
(22) |
|
12
(19) |
13
(19) |
14
(8) |
15
(16) |
16
(17) |
17
(16) |
18
(33) |
|
19
(33) |
20
(34) |
21
(32) |
22
(26) |
23
(23) |
24
(16) |
25
(21) |
|
26
(19) |
27
(7) |
28
(29) |
29
(27) |
30
(55) |
|
|
|
From: <sv...@va...> - 2005-06-10 23:19:37
|
Author: njn Date: 2005-06-11 00:19:35 +0100 (Sat, 11 Jun 2005) New Revision: 3876 Log: Actually remove linux/core_os.h from the repository. Removed: trunk/coregrind/linux/core_os.h Deleted: trunk/coregrind/linux/core_os.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/linux/core_os.h 2005-06-10 23:18:16 UTC (rev 3875) +++ trunk/coregrind/linux/core_os.h 2005-06-10 23:19:35 UTC (rev 3876) @@ -1,39 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- Linux-specific stuff for the core. ---*/ -/*--- linux/core_os.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Nicholas Nethercote - nj...@va... - - 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 __LINUX_CORE_OS_H -#define __LINUX_CORE_OS_H - -#endif // __LINUX_CORE_OS_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ |
|
From: <sv...@va...> - 2005-06-10 23:18:18
|
Author: njn Date: 2005-06-11 00:18:16 +0100 (Sat, 11 Jun 2005) New Revision: 3875 Log: Remove dead declaration. Modified: trunk/coregrind/core.h Modified: trunk/coregrind/core.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/core.h 2005-06-10 23:16:13 UTC (rev 3874) +++ trunk/coregrind/core.h 2005-06-10 23:18:16 UTC (rev 3875) @@ -238,10 +238,6 @@ // Clean up the client by calling before the final reports extern void VGA_(final_tidyup)(ThreadId tid); =20 -// Arch-specific client requests -extern Bool VGA_(client_requests)(ThreadId tid, UWord *args); - - ///* -------------------------------------------------------------------= -- // Thread modelling // ------------------------------------------------------------------ = */ |
|
From: <sv...@va...> - 2005-06-10 23:16:16
|
Author: njn Date: 2005-06-11 00:16:13 +0100 (Sat, 11 Jun 2005) New Revision: 3874 Log: Move two decls out of core.h into pub_core_syscalls.h where they belong. Modified: trunk/coregrind/core.h trunk/coregrind/pub_core_syscalls.h Modified: trunk/coregrind/core.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/core.h 2005-06-10 23:09:45 UTC (rev 3873) +++ trunk/coregrind/core.h 2005-06-10 23:16:13 UTC (rev 3874) @@ -220,13 +220,6 @@ // Run a thread from beginning to end.=20 extern VgSchedReturnCode VGO_(thread_wrapper)(Word /*ThreadId*/ tid); =20 -// Allocates a stack for the first thread, then runs it, -// as if the thread had been set up by clone() -extern void VGP_(main_thread_wrapper_NORETURN)(ThreadId tid); - -// Return how many bytes of a thread's Valgrind stack are unused -extern SSizeT VGA_(stack_unused)(ThreadId tid); - // wait until all other threads are dead extern void VGA_(reap_threads)(ThreadId self); =20 @@ -300,3 +293,4 @@ /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ + Modified: trunk/coregrind/pub_core_syscalls.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/pub_core_syscalls.h 2005-06-10 23:09:45 UTC (rev 3873= ) +++ trunk/coregrind/pub_core_syscalls.h 2005-06-10 23:16:13 UTC (rev 3874= ) @@ -36,6 +36,13 @@ // but also the code that executes them, and related stuff. //-------------------------------------------------------------------- =20 +// Return how many bytes of a thread's Valgrind stack are unused +extern SSizeT VGA_(stack_unused)(ThreadId tid); + +// Allocates a stack for the first thread, then runs it, +// as if the thread had been set up by clone() +extern void VGP_(main_thread_wrapper_NORETURN)(ThreadId tid); + extern HChar* VG_(resolve_filename_nodup)(Int fd); extern HChar* VG_(resolve_filename)(Int fd); =20 |
|
From: <sv...@va...> - 2005-06-10 23:09:53
|
Author: njn
Date: 2005-06-11 00:09:45 +0100 (Sat, 11 Jun 2005)
New Revision: 3873
Log:
Killed coregrind/$ARCH/core_arch.h. Moved the relevant pieces into core.=
h
for the moment.
Removed:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/arm/core_arch.h
trunk/coregrind/x86/core_arch.h
Modified:
trunk/coregrind/amd64/Makefile.am
trunk/coregrind/arm/Makefile.am
trunk/coregrind/core.h
trunk/coregrind/x86/Makefile.am
Modified: trunk/coregrind/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64/Makefile.am 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/amd64/Makefile.am 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,9 +1,6 @@
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
=20
-noinst_HEADERS =3D \
- core_arch.h
-
noinst_LIBRARIES =3D libarch.a
=20
EXTRA_DIST =3D \
Deleted: trunk/coregrind/amd64/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64/core_arch.h 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/amd64/core_arch.h 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,62 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Arch-specific stuff for the core. amd64/core_arch.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- 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 __AMD64_CORE_ARCH_H
-#define __AMD64_CORE_ARCH_H
-
-#include "libvex.h"
-#include "libvex_guest_amd64.h"
-
-/* ---------------------------------------------------------------------
- Basic properties
- ------------------------------------------------------------------ */
-
-#define VGA_ELF_ENDIANNESS ELFDATA2LSB
-#define VGA_ELF_MACHINE EM_X86_64
-#define VGA_ELF_CLASS ELFCLASS64
-
-/* ---------------------------------------------------------------------
- Interesting registers
- ------------------------------------------------------------------ */
-
-// Vex field names
-#define VGA_INSTR_PTR guest_RIP
-#define VGA_STACK_PTR guest_RSP
-#define VGA_FRAME_PTR guest_RBP
-
-#define VGA_CLREQ_ARGS guest_RAX
-#define VGA_CLREQ_RET guest_RDX
-
-#endif // __AMD64_CORE_ARCH_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
-
Modified: trunk/coregrind/arm/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/arm/Makefile.am 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/arm/Makefile.am 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,9 +1,6 @@
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
=20
-noinst_HEADERS =3D \
- core_arch.h
-
noinst_LIBRARIES =3D libarch.a
=20
EXTRA_DIST =3D \
Deleted: trunk/coregrind/arm/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/arm/core_arch.h 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/arm/core_arch.h 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,66 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Arch-specific stuff for the core. arm/core_arch.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- 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 __ARM_CORE_ARCH_H
-#define __ARM_CORE_ARCH_H
-
-#include "libvex.h"
-#include "libvex_guest_arm.h"
-
-/* ---------------------------------------------------------------------
- Basic properties
- ------------------------------------------------------------------ */
-
-#define VGA_ELF_ENDIANNESS ELFDATA2LSB
-#define VGA_ELF_MACHINE EM_ARM
-#define VGA_ELF_CLASS ELFCLASS32
-
-/* ---------------------------------------------------------------------
- Interesting registers
- ------------------------------------------------------------------ */
-// Vex field names
-// XXX: Not sure, but I think:
-// r11 =3D frame pointer
-// r12 =3D "implicit parameter" (neither caller-save, nor callee-save)
-// r13 =3D stack pointer
-// r14 =3D link register
-// r15 =3D program counter
-#define VGA_INSTR_PTR guest_R15
-#define VGA_STACK_PTR guest_R13
-#define VGA_FRAME_PTR guest_R11
-
-#define VGA_CLREQ_ARGS guest_R0
-#define VGA_CLREQ_RET guest_R0
-
-#endif // __ARM_CORE_ARCH_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/core.h 2005-06-10 23:09:45 UTC (rev 3873)
@@ -33,12 +33,53 @@
#define __CORE_H
=20
#include "tool.h" // tool stuff
-#include "core_arch.h" // arch-specific stuff, eg. x86/core_arch.h
=20
+#include "libvex.h"
+#if defined(VGA_x86)
+#include "libvex_guest_x86.h"
+# define VGA_ELF_ENDIANNESS ELFDATA2LSB
+# define VGA_ELF_MACHINE EM_386
+# define VGA_ELF_CLASS ELFCLASS32
+# define VGA_INSTR_PTR guest_EIP
+# define VGA_STACK_PTR guest_ESP
+# define VGA_FRAME_PTR guest_EBP
+# define VGA_CLREQ_ARGS guest_EAX
+# define VGA_CLREQ_RET guest_EDX
+#elif defined(VGA_amd64)
+# define VGA_ELF_ENDIANNESS ELFDATA2LSB
+# define VGA_ELF_MACHINE EM_X86_64
+# define VGA_ELF_CLASS ELFCLASS64
+# define VGA_INSTR_PTR guest_RIP
+# define VGA_STACK_PTR guest_RSP
+# define VGA_FRAME_PTR guest_RBP
+# define VGA_CLREQ_ARGS guest_RAX
+# define VGA_CLREQ_RET guest_RDX
+#elif defined(VGA_arm)
+#define VGA_ELF_ENDIANNESS ELFDATA2LSB
+#define VGA_ELF_MACHINE EM_ARM
+#define VGA_ELF_CLASS ELFCLASS32
+ // XXX: Not sure, but I think:
+ // r11 =3D frame pointer
+ // r12 =3D "implicit parameter" (neither caller-save, nor callee-sa=
ve)
+ // r13 =3D stack pointer
+ // r14 =3D link register
+ // r15 =3D program counter
+# define VGA_INSTR_PTR guest_R15
+# define VGA_STACK_PTR guest_R13
+# define VGA_FRAME_PTR guest_R11
+# define VGA_CLREQ_ARGS guest_R0
+# define VGA_CLREQ_RET guest_R0
+#else
+# error Unknown arch
+#endif
+
+
+
+
#include <setjmp.h> // for jmp_buf
=20
#include "pub_core_mallocfree.h" // for type 'ArenaId'
-#include "pub_core_scheduler.h" // for types 'ThreadState', 'ThreadArc=
hState'
+#include "pub_core_scheduler.h" // for types 'ThreadArchState'
=20
/* ---------------------------------------------------------------------
Global macros.
@@ -158,6 +199,7 @@
// Returns False to indicate we cannot proceed further.
extern Bool VGA_(getArchAndSubArch)( /*OUT*/VexArch*,=20
/*OUT*/VexSubArch* );
+
// Accessors for the ThreadArchState
#define INSTR_PTR(regs) ((regs).vex.VGA_INSTR_PTR)
#define STACK_PTR(regs) ((regs).vex.VGA_STACK_PTR)
Modified: trunk/coregrind/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86/Makefile.am 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/x86/Makefile.am 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,9 +1,6 @@
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
=20
-noinst_HEADERS =3D \
- core_arch.h
-
noinst_LIBRARIES =3D libarch.a
=20
EXTRA_DIST =3D \
Deleted: trunk/coregrind/x86/core_arch.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86/core_arch.h 2005-06-10 22:59:56 UTC (rev 3872)
+++ trunk/coregrind/x86/core_arch.h 2005-06-10 23:09:45 UTC (rev 3873)
@@ -1,68 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Arch-specific stuff for the core. x86/core_arch.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Nicholas Nethercote
- nj...@va...
-
- 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 __X86_CORE_ARCH_H
-#define __X86_CORE_ARCH_H
-
-#include "libvex.h"
-#include "libvex_guest_x86.h"
-
-/* ---------------------------------------------------------------------
- Basic properties
- ------------------------------------------------------------------ */
-
-#define VGA_ELF_ENDIANNESS ELFDATA2LSB
-#define VGA_ELF_MACHINE EM_386
-#define VGA_ELF_CLASS ELFCLASS32
-
-/* ---------------------------------------------------------------------
- Interesting registers
- ------------------------------------------------------------------ */
-
-// Vex field names
-#define VGA_INSTR_PTR guest_EIP
-#define VGA_STACK_PTR guest_ESP
-#define VGA_FRAME_PTR guest_EBP
-
-#define VGA_CLREQ_ARGS guest_EAX
-#define VGA_CLREQ_RET guest_EDX
-
-//extern const Char VG_(helper_wrapper_before)[]; /* in dispatch.S */
-//extern const Char VG_(helper_wrapper_return)[]; /* in dispatch.S */
-
-//extern const Char VG_(helper_undefined_instruction)[];
-//extern const Char VG_(helper_INT)[];
-//extern const Char VG_(helper_breakpoint)[];
-
-#endif // __X86_CORE_ARCH_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-06-10 22:59:58
|
Author: njn
Date: 2005-06-10 23:59:56 +0100 (Fri, 10 Jun 2005)
New Revision: 3872
Log:
Moved various pieces of linux/core_os.c to the modules that use them.
Managed to kill linux/core_os.h, hooray.
Modified:
trunk/coregrind/core.h
trunk/coregrind/linux/Makefile.am
trunk/coregrind/linux/core_os.c
trunk/coregrind/linux/core_os.h
trunk/coregrind/m_main.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/pub_core_scheduler.h
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-06-10 22:39:04 UTC (rev 3871)
+++ trunk/coregrind/core.h 2005-06-10 22:59:56 UTC (rev 3872)
@@ -35,8 +35,6 @@
#include "tool.h" // tool stuff
#include "core_arch.h" // arch-specific stuff, eg. x86/core_arch.h
=20
-#include "core_os.h" // OS-specific stuff, eg. linux/core_os.h
-
#include <setjmp.h> // for jmp_buf
=20
#include "pub_core_mallocfree.h" // for type 'ArenaId'
@@ -177,18 +175,9 @@
Addr esp_at_startup,
/*MOD*/ ThreadArchState* arch );
=20
-// OS/Platform-specific thread clear (after thread exit)
-extern void VGO_(os_state_clear)(ThreadState *);
-
-// OS/Platform-specific thread init (at scheduler init time)
-extern void VGO_(os_state_init)(ThreadState *);
-
// Run a thread from beginning to end.=20
extern VgSchedReturnCode VGO_(thread_wrapper)(Word /*ThreadId*/ tid);
=20
-// Call here to exit the entire Valgrind system.
-extern void VGO_(terminate_NORETURN)(ThreadId tid, VgSchedReturnCode src=
);
-
// Allocates a stack for the first thread, then runs it,
// as if the thread had been set up by clone()
extern void VGP_(main_thread_wrapper_NORETURN)(ThreadId tid);
Modified: trunk/coregrind/linux/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/Makefile.am 2005-06-10 22:39:04 UTC (rev 3871)
+++ trunk/coregrind/linux/Makefile.am 2005-06-10 22:59:56 UTC (rev 3872)
@@ -1,9 +1,6 @@
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
=20
-noinst_HEADERS =3D \
- core_os.h
-
noinst_LIBRARIES =3D libos.a
=20
libos_a_SOURCES =3D \
Modified: trunk/coregrind/linux/core_os.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/core_os.c 2005-06-10 22:39:04 UTC (rev 3871)
+++ trunk/coregrind/linux/core_os.c 2005-06-10 22:59:56 UTC (rev 3872)
@@ -38,20 +38,6 @@
#include "pub_core_signals.h"
#include "pub_core_tooliface.h"
=20
-void VGO_(os_state_clear)(ThreadState *tst)
-{
- tst->os_state.lwpid =3D 0;
- tst->os_state.threadgroup =3D 0;
-}
-
-void VGO_(os_state_init)(ThreadState *tst)
-{
- tst->os_state.valgrind_stack_base =3D 0;
- tst->os_state.valgrind_stack_szB =3D 0;
-
- VGO_(os_state_clear)(tst);
-}
-
static Bool i_am_the_only_thread ( void )
{
Int c =3D VG_(count_living_threads)();
@@ -59,37 +45,6 @@
return c =3D=3D 1;
}
=20
-
-void VGO_(terminate_NORETURN)(ThreadId tid, VgSchedReturnCode src)
-{
- VG_(debugLog)(1, "core_os",=20
- "VGO_(terminate_NORETURN)(tid=3D%lld)\n", (ULong)tid=
);
-
- vg_assert(VG_(count_living_threads)() =3D=3D 0);
-
- //--------------------------------------------------------------
- // Exit, according to the scheduler's return code
- //--------------------------------------------------------------
- switch (src) {
- case VgSrc_ExitSyscall: /* the normal way out */
- VG_(exit)( VG_(threads)[tid].os_state.exitcode );
- /* NOT ALIVE HERE! */
- VG_(core_panic)("entered the afterlife in main() -- ExitSyscall");
- break; /* what the hell :) */
-
- case VgSrc_FatalSig:
- /* We were killed by a fatal signal, so replicate the effect */
- vg_assert(VG_(threads)[tid].os_state.fatalsig !=3D 0);
- VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
- VG_(core_panic)("main(): signal was supposed to be fatal");
- break;
-
- default:
- VG_(core_panic)("main(): unexpected scheduler return code");
- }
-}
-
-
/* Run a thread from beginning to end and return the thread's
scheduler-return-code. */
=20
Modified: trunk/coregrind/linux/core_os.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/core_os.h 2005-06-10 22:39:04 UTC (rev 3871)
+++ trunk/coregrind/linux/core_os.h 2005-06-10 22:59:56 UTC (rev 3872)
@@ -32,23 +32,6 @@
#ifndef __LINUX_CORE_OS_H
#define __LINUX_CORE_OS_H
=20
-/* OS-specific thread state */
-typedef struct {
- /* who we are */
- Int lwpid; /* PID of kernel task */
- Int threadgroup; /* thread group id */
-
- ThreadId parent; /* parent tid (if any) */
-
- /* runtime details */
- Addr valgrind_stack_base; /* Valgrind's stack base */
- SizeT valgrind_stack_szB; /* stack size in bytes */
-
- /* exit details */
- Int exitcode; /* in the case of exitgroup, set by someone else */
- Int fatalsig; /* fatal signal */
-} os_thread_t;
-
#endif // __LINUX_CORE_OS_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-06-10 22:39:04 UTC (rev 3871)
+++ trunk/coregrind/m_main.c 2005-06-10 22:59:56 UTC (rev 3872)
@@ -2877,11 +2877,32 @@
if (0)
LibVEX_ShowAllocStats();
=20
- /* Ok, finally exit in the os-specific way. In short, if the
- (last) thread exited by calling sys_exit, do likewise; if the
- (last) thread stopped due to a fatal signal, terminate the
- entire system with that same fatal signal. */
- VGO_(terminate_NORETURN)( tid, tids_schedretcode );
+ /* Ok, finally exit in the os-specific way, according to the schedule=
r's
+ return code. In short, if the (last) thread exited by calling
+ sys_exit, do likewise; if the (last) thread stopped due to a fatal
+ signal, terminate the entire system with that same fatal signal. *=
/
+ VG_(debugLog)(1, "core_os",=20
+ "VGO_(terminate_NORETURN)(tid=3D%lld)\n", (ULong)tid=
);
+
+ vg_assert(VG_(count_living_threads)() =3D=3D 0);
+
+ switch (tids_schedretcode) {
+ case VgSrc_ExitSyscall: /* the normal way out */
+ VG_(exit)( VG_(threads)[tid].os_state.exitcode );
+ /* NOT ALIVE HERE! */
+ VG_(core_panic)("entered the afterlife in main() -- ExitSyscall");
+ break; /* what the hell :) */
+
+ case VgSrc_FatalSig:
+ /* We were killed by a fatal signal, so replicate the effect */
+ vg_assert(VG_(threads)[tid].os_state.fatalsig !=3D 0);
+ VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
+ VG_(core_panic)("main(): signal was supposed to be fatal");
+ break;
+
+ default:
+ VG_(core_panic)("main(): unexpected scheduler return code");
+ }
}
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2005-06-10 22:39:04 UTC (rev =
3871)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-10 22:59:56 UTC (rev =
3872)
@@ -553,6 +553,20 @@
}
=20
=20
+static void os_state_clear(ThreadState *tst)
+{
+ tst->os_state.lwpid =3D 0;
+ tst->os_state.threadgroup =3D 0;
+}
+
+static void os_state_init(ThreadState *tst)
+{
+ tst->os_state.valgrind_stack_base =3D 0;
+ tst->os_state.valgrind_stack_szB =3D 0;
+
+ os_state_clear(tst);
+}
+
static=20
void mostly_clear_thread_record ( ThreadId tid )
{
@@ -569,7 +583,7 @@
VG_(sigemptyset)(&VG_(threads)[tid].sig_mask);
VG_(sigemptyset)(&VG_(threads)[tid].tmp_sig_mask);
=20
- VGO_(os_state_clear)(&VG_(threads)[tid]);
+ os_state_clear(&VG_(threads)[tid]);
=20
/* start with no altstack */
VG_(threads)[tid].altstack.ss_sp =3D (void *)0xdeadbeef;
@@ -641,7 +655,7 @@
=20
VG_(threads)[i].sig_queue =3D NULL;
=20
- VGO_(os_state_init)(&VG_(threads)[i]);
+ os_state_init(&VG_(threads)[i]);
mostly_clear_thread_record(i);
=20
VG_(threads)[i].status =3D VgTs_Empty;
Modified: trunk/coregrind/pub_core_scheduler.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_scheduler.h 2005-06-10 22:39:04 UTC (rev 387=
1)
+++ trunk/coregrind/pub_core_scheduler.h 2005-06-10 22:59:56 UTC (rev 387=
2)
@@ -95,7 +95,24 @@
}=20
ThreadArchState;
=20
+/* OS-specific thread state */
+typedef struct {
+ /* who we are */
+ Int lwpid; // PID of kernel task
+ Int threadgroup; // thread group id
=20
+ ThreadId parent; // parent tid (if any)
+
+ /* runtime details */
+ Addr valgrind_stack_base; // Valgrind's stack base
+ SizeT valgrind_stack_szB; // stack size in bytes
+
+ /* exit details */
+ Int exitcode; // in the case of exitgroup, set by someone else
+ Int fatalsig; // fatal signal
+} os_thread_t;
+
+
typedef struct {
/* ThreadId =3D=3D 0 (and hence vg_threads[0]) is NEVER USED.
The thread identity is simply the index in vg_threads[].
|
|
From: <sv...@va...> - 2005-06-10 22:39:09
|
Author: njn
Date: 2005-06-10 23:39:04 +0100 (Fri, 10 Jun 2005)
New Revision: 3871
Log:
Moved VG_(fd_{hard,soft}_limit) into a better spot.
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_main.c
trunk/coregrind/pub_core_libcfile.h
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-06-10 22:08:14 UTC (rev 3870)
+++ trunk/coregrind/core.h 2005-06-10 22:39:04 UTC (rev 3871)
@@ -56,10 +56,6 @@
/* The directory we look for all our auxillary files in */
#define VALGRINDLIB "VALGRINDLIB"
=20
-/* Application-visible file descriptor limits */
-extern Int VG_(fd_soft_limit);
-extern Int VG_(fd_hard_limit);
-
/* ---------------------------------------------------------------------
Exports of vg_intercept.c
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_libcfile.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcfile.c 2005-06-10 22:08:14 UTC (rev 3870)
+++ trunk/coregrind/m_libcfile.c 2005-06-10 22:39:04 UTC (rev 3871)
@@ -39,6 +39,10 @@
File stuff
------------------------------------------------------------------ */
=20
+/* Application-visible file descriptor limits */
+Int VG_(fd_soft_limit) =3D -1;
+Int VG_(fd_hard_limit) =3D -1;
+
static inline Bool fd_exists(Int fd)
{
struct vki_stat st;
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-06-10 22:08:14 UTC (rev 3870)
+++ trunk/coregrind/m_main.c 2005-06-10 22:39:04 UTC (rev 3871)
@@ -125,10 +125,6 @@
static Int vg_argc;
static Char **vg_argv;
=20
-/* Application-visible file descriptor limits */
-Int VG_(fd_soft_limit) =3D -1;
-Int VG_(fd_hard_limit) =3D -1;
-
/* As deduced from sp_at_startup, the client's argc, argv[] and
envp[] as extracted from the client's stack at startup-time. */
Int VG_(client_argc);
Modified: trunk/coregrind/pub_core_libcfile.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_libcfile.h 2005-06-10 22:08:14 UTC (rev 3870=
)
+++ trunk/coregrind/pub_core_libcfile.h 2005-06-10 22:39:04 UTC (rev 3871=
)
@@ -38,6 +38,10 @@
=20
#include "pub_tool_libcfile.h"
=20
+/* Application-visible file descriptor limits */
+extern Int VG_(fd_soft_limit);
+extern Int VG_(fd_hard_limit);
+
/* Move an fd into the Valgrind-safe range */
extern Int VG_(safe_fd)(Int oldfd);
=20
|
|
From: <sv...@va...> - 2005-06-10 22:08:52
|
Author: njn
Date: 2005-06-10 23:08:14 +0100 (Fri, 10 Jun 2005)
New Revision: 3870
Log:
Modularised signal libc stuff into m_libcsignal.
Added:
trunk/coregrind/m_libcsignal.c
trunk/coregrind/pub_core_libcsignal.h
trunk/include/pub_tool_libcsignal.h
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/linux/core_os.c
trunk/coregrind/m_debuginfo/symtypes.c
trunk/coregrind/m_main.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-generic.c
trunk/coregrind/m_syscalls/syscalls-main.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/vg_mylibc.c
trunk/include/Makefile.am
trunk/include/tool.h
trunk/memcheck/mac_leakcheck.c
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/Makefile.am 2005-06-10 22:08:14 UTC (rev 3870)
@@ -50,6 +50,7 @@
pub_core_libcassert.h \
pub_core_libcfile.h \
pub_core_libcprint.h \
+ pub_core_libcsignal.h \
pub_core_main.h \
pub_core_mallocfree.h \
pub_core_options.h \
@@ -95,6 +96,7 @@
m_libcassert.c \
m_libcfile.c \
m_libcprint.c \
+ m_libcsignal.c \
m_main.c \
m_mallocfree.c \
m_options.c \
Modified: trunk/coregrind/linux/core_os.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/linux/core_os.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/linux/core_os.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -33,6 +33,7 @@
#include "pub_core_debuglog.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_options.h"
#include "pub_core_signals.h"
#include "pub_core_tooliface.h"
Modified: trunk/coregrind/m_debuginfo/symtypes.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtypes.c 2005-06-10 13:34:14 UTC (rev 3=
869)
+++ trunk/coregrind/m_debuginfo/symtypes.c 2005-06-10 22:08:14 UTC (rev 3=
870)
@@ -34,6 +34,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_tooliface.h"
#include "priv_symtypes.h"
=20
Added: trunk/coregrind/m_libcsignal.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcsignal.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/m_libcsignal.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -0,0 +1,236 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Signal-related libc stuff. m_libcsignal.c ---*/
+/*--------------------------------------------------------------------*/
+=20
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward=20
+ js...@ac...
+
+ 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 "core.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcsignal.h"
+#include "vki_unistd.h"
+
+/* sigemptyset, sigfullset, sigaddset and sigdelset return 0 on
+ success and -1 on error. */
+
+Int VG_(sigfillset)( vki_sigset_t* set )
+{
+ Int i;
+ if (set =3D=3D NULL)
+ return -1;
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ set->sig[i] =3D ~(UWord)0x0;
+ return 0;
+}
+
+Int VG_(sigemptyset)( vki_sigset_t* set )
+{
+ Int i;
+ if (set =3D=3D NULL)
+ return -1;
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ set->sig[i] =3D 0x0;
+ return 0;
+}
+
+Bool VG_(isemptysigset)( const vki_sigset_t* set )
+{
+ Int i;
+ vg_assert(set !=3D NULL);
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ if (set->sig[i] !=3D 0x0) return False;
+ return True;
+}
+
+Bool VG_(isfullsigset)( const vki_sigset_t* set )
+{
+ Int i;
+ vg_assert(set !=3D NULL);
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ if (set->sig[i] !=3D ~(UWord)0x0) return False;
+ return True;
+}
+
+Bool VG_(iseqsigset)( const vki_sigset_t* set1, const vki_sigset_t* set2=
)
+{
+ Int i;
+ vg_assert(set1 !=3D NULL && set2 !=3D NULL);
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ if (set1->sig[i] !=3D set2->sig[i]) return False;
+ return True;
+}
+
+
+Int VG_(sigaddset)( vki_sigset_t* set, Int signum )
+{
+ if (set =3D=3D NULL)
+ return -1;
+ if (signum < 1 || signum > _VKI_NSIG)
+ return -1;
+ signum--;
+ set->sig[signum / _VKI_NSIG_BPW] |=3D (1UL << (signum % _VKI_NSIG_BPW=
));
+ return 0;
+}
+
+Int VG_(sigdelset)( vki_sigset_t* set, Int signum )
+{
+ if (set =3D=3D NULL)
+ return -1;
+ if (signum < 1 || signum > _VKI_NSIG)
+ return -1;
+ signum--;
+ set->sig[signum / _VKI_NSIG_BPW] &=3D ~(1UL << (signum % _VKI_NSIG_BP=
W));
+ return 0;
+}
+
+Int VG_(sigismember) ( const vki_sigset_t* set, Int signum )
+{
+ if (set =3D=3D NULL)
+ return 0;
+ if (signum < 1 || signum > _VKI_NSIG)
+ return 0;
+ signum--;
+ if (1 & ((set->sig[signum / _VKI_NSIG_BPW]) >> (signum % _VKI_NSIG_BP=
W)))
+ return 1;
+ else
+ return 0;
+}
+
+
+/* Add all signals in src to dst. */
+void VG_(sigaddset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
+{
+ Int i;
+ vg_assert(dst !=3D NULL && src !=3D NULL);
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] |=3D src->sig[i];
+}
+
+/* Remove all signals in src from dst. */
+void VG_(sigdelset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
+{
+ Int i;
+ vg_assert(dst !=3D NULL && src !=3D NULL);
+ for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
+ dst->sig[i] &=3D ~(src->sig[i]);
+}
+
+
+/* The functions sigaction, sigprocmask, sigpending and sigsuspend
+ return 0 on success and -1 on error. =20
+*/
+Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* ol=
dset)
+{
+ SysRes res =3D VG_(do_syscall4)(__NR_rt_sigprocmask,=20
+ how, (UWord)set, (UWord)oldset,=20
+ _VKI_NSIG_WORDS * sizeof(UWord));
+ return res.isError ? -1 : 0;
+}
+
+
+Int VG_(sigaction) ( Int signum, const struct vki_sigaction* act, =20
+ struct vki_sigaction* oldact)
+{
+ SysRes res =3D VG_(do_syscall4)(__NR_rt_sigaction,
+ signum, (UWord)act, (UWord)oldact,=20
+ _VKI_NSIG_WORDS * sizeof(UWord));
+ return res.isError ? -1 : 0;
+}
+
+
+Int VG_(sigaltstack)( const vki_stack_t* ss, vki_stack_t* oss )
+{
+ SysRes res =3D VG_(do_syscall2)(__NR_sigaltstack, (UWord)ss, (UWord)o=
ss);
+ return res.isError ? -1 : 0;
+}
+
+Int VG_(sigtimedwait)( const vki_sigset_t *set, vki_siginfo_t *info,=20
+ const struct vki_timespec *timeout )
+{
+ SysRes res =3D VG_(do_syscall4)(__NR_rt_sigtimedwait, (UWord)set, (UW=
ord)info,=20
+ (UWord)timeout, sizeof(*set));
+ return res.isError ? -1 : res.val;
+}
+=20
+Int VG_(signal)(Int signum, void (*sighandler)(Int))
+{
+ SysRes res;
+ Int n;
+ struct vki_sigaction sa;
+ sa.ksa_handler =3D sighandler;
+ sa.sa_flags =3D VKI_SA_ONSTACK | VKI_SA_RESTART;
+ sa.sa_restorer =3D NULL;
+ n =3D VG_(sigemptyset)( &sa.sa_mask );
+ vg_assert(n =3D=3D 0);
+ res =3D VG_(do_syscall4)(__NR_rt_sigaction, signum, (UWord)&sa, (UWor=
d)NULL,
+ _VKI_NSIG_WORDS * sizeof(UWord));
+ return res.isError ? -1 : 0;
+}
+
+
+Int VG_(kill)( Int pid, Int signo )
+{
+ SysRes res =3D VG_(do_syscall2)(__NR_kill, pid, signo);
+ return res.isError ? -1 : 0;
+}
+
+
+Int VG_(tkill)( ThreadId tid, Int signo )
+{
+ SysRes res =3D VG_(mk_SysRes_Error)(VKI_ENOSYS);
+
+#if 0
+ /* This isn't right because the client may create a process
+ structure with multiple thread groups */
+ res =3D VG_(do_syscall)(__NR_tgkill, VG_(getpid)(), tid, signo);
+#endif
+
+ res =3D VG_(do_syscall2)(__NR_tkill, tid, signo);
+
+ if (res.isError && res.val =3D=3D VKI_ENOSYS)
+ res =3D VG_(do_syscall2)(__NR_kill, tid, signo);
+
+ return res.isError ? -1 : 0;
+}
+
+Int VG_(sigpending) ( vki_sigset_t* set )
+{
+// Nb: AMD64/Linux doesn't have __NR_sigpending; it only provides
+// __NR_rt_sigpending. This function will have to be abstracted in some
+// way to account for this. In the meantime, the easy option is to forg=
et
+// about it for AMD64 until it's needed.
+#ifdef __amd64__
+ I_die_here;
+#else
+ SysRes res =3D VG_(do_syscall1)(__NR_sigpending, (UWord)set);
+ return res.isError ? -1 : 0;
+#endif
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/m_main.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -40,6 +40,7 @@
#include "pub_core_libcassert.h"
#include "pub_core_libcfile.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_main.h"
#include "pub_core_options.h"
#include "pub_core_profile.h"
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2005-06-10 13:34:14 UTC (rev =
3869)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-10 22:08:14 UTC (rev =
3870)
@@ -66,6 +66,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_main.h"
#include "pub_core_options.h"
#include "pub_core_profile.h"
Modified: trunk/coregrind/m_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_signals.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/m_signals.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -86,6 +86,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_main.h"
#include "pub_core_options.h"
#include "pub_core_signals.h"
Modified: trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-10 13:34:14=
UTC (rev 3869)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-10 22:08:14=
UTC (rev 3870)
@@ -36,10 +36,11 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_sigframe.h"
+#include "pub_core_signals.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
-#include "pub_core_signals.h"
=20
#include "priv_types_n_macros.h"
#include "priv_syscalls-generic.h" /* for decls of generic wrappers */
Modified: trunk/coregrind/m_syscalls/syscalls-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-generic.c 2005-06-10 13:34:14 UTC=
(rev 3869)
+++ trunk/coregrind/m_syscalls/syscalls-generic.c 2005-06-10 22:08:14 UTC=
(rev 3870)
@@ -32,9 +32,10 @@
#include "pub_core_debuglog.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcfile.h"
#include "pub_core_libcprint.h"
-#include "pub_core_libcfile.h"
-#include "pub_core_libcassert.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_main.h"
#include "pub_core_stacktrace.h"
#include "pub_core_tooliface.h"
Modified: trunk/coregrind/m_syscalls/syscalls-main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-main.c 2005-06-10 13:34:14 UTC (r=
ev 3869)
+++ trunk/coregrind/m_syscalls/syscalls-main.c 2005-06-10 22:08:14 UTC (r=
ev 3870)
@@ -33,6 +33,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_stacktrace.h"
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
Modified: trunk/coregrind/m_syscalls/syscalls-x86-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-06-10 13:34:14 U=
TC (rev 3869)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-06-10 22:08:14 U=
TC (rev 3870)
@@ -41,10 +41,11 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsignal.h"
#include "pub_core_sigframe.h"
+#include "pub_core_signals.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
-#include "pub_core_signals.h"
=20
#include "priv_types_n_macros.h"
#include "priv_syscalls-generic.h" /* for decls of generic wrappers */
Added: trunk/coregrind/pub_core_libcsignal.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_libcsignal.h 2005-06-10 13:34:14 UTC (rev 38=
69)
+++ trunk/coregrind/pub_core_libcsignal.h 2005-06-10 22:08:14 UTC (rev 38=
70)
@@ -0,0 +1,44 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Signal-related libc stuff. pub_core_libcsignal.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ 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_LIBCSIGNAL_H
+#define __PUB_CORE_LIBCSIGNAL_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module contains all the libc code related to signals.
+//--------------------------------------------------------------------
+
+#include "pub_tool_libcsignal.h"
+
+#endif // __PUB_CORE_LIBCSIGNAL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_mylibc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_mylibc.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/coregrind/vg_mylibc.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -45,207 +45,6 @@
#include "vki_unistd.h"
=20
=20
-/* ---------------------------------------------------------------------
- Wrappers around system calls, and other stuff, to do with signals.
- ------------------------------------------------------------------ */
-
-/* sigemptyset, sigfullset, sigaddset and sigdelset return 0 on
- success and -1 on error. =20
-*/
-Int VG_(sigfillset)( vki_sigset_t* set )
-{
- Int i;
- if (set =3D=3D NULL)
- return -1;
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] =3D ~(UWord)0x0;
- return 0;
-}
-
-Int VG_(sigemptyset)( vki_sigset_t* set )
-{
- Int i;
- if (set =3D=3D NULL)
- return -1;
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] =3D 0x0;
- return 0;
-}
-
-Bool VG_(isemptysigset)( const vki_sigset_t* set )
-{
- Int i;
- vg_assert(set !=3D NULL);
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] !=3D 0x0) return False;
- return True;
-}
-
-Bool VG_(isfullsigset)( const vki_sigset_t* set )
-{
- Int i;
- vg_assert(set !=3D NULL);
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- if (set->sig[i] !=3D ~(UWord)0x0) return False;
- return True;
-}
-
-Bool VG_(iseqsigset)( const vki_sigset_t* set1, const vki_sigset_t* set2=
)
-{
- Int i;
- vg_assert(set1 !=3D NULL && set2 !=3D NULL);
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- if (set1->sig[i] !=3D set2->sig[i]) return False;
- return True;
-}
-
-
-Int VG_(sigaddset)( vki_sigset_t* set, Int signum )
-{
- if (set =3D=3D NULL)
- return -1;
- if (signum < 1 || signum > _VKI_NSIG)
- return -1;
- signum--;
- set->sig[signum / _VKI_NSIG_BPW] |=3D (1UL << (signum % _VKI_NSIG_BPW=
));
- return 0;
-}
-
-Int VG_(sigdelset)( vki_sigset_t* set, Int signum )
-{
- if (set =3D=3D NULL)
- return -1;
- if (signum < 1 || signum > _VKI_NSIG)
- return -1;
- signum--;
- set->sig[signum / _VKI_NSIG_BPW] &=3D ~(1UL << (signum % _VKI_NSIG_BP=
W));
- return 0;
-}
-
-Int VG_(sigismember) ( const vki_sigset_t* set, Int signum )
-{
- if (set =3D=3D NULL)
- return 0;
- if (signum < 1 || signum > _VKI_NSIG)
- return 0;
- signum--;
- if (1 & ((set->sig[signum / _VKI_NSIG_BPW]) >> (signum % _VKI_NSIG_BP=
W)))
- return 1;
- else
- return 0;
-}
-
-
-/* Add all signals in src to dst. */
-void VG_(sigaddset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
-{
- Int i;
- vg_assert(dst !=3D NULL && src !=3D NULL);
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- dst->sig[i] |=3D src->sig[i];
-}
-
-/* Remove all signals in src from dst. */
-void VG_(sigdelset_from_set)( vki_sigset_t* dst, vki_sigset_t* src )
-{
- Int i;
- vg_assert(dst !=3D NULL && src !=3D NULL);
- for (i =3D 0; i < _VKI_NSIG_WORDS; i++)
- dst->sig[i] &=3D ~(src->sig[i]);
-}
-
-
-/* The functions sigaction, sigprocmask, sigpending and sigsuspend
- return 0 on success and -1 on error. =20
-*/
-Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* ol=
dset)
-{
- SysRes res =3D VG_(do_syscall4)(__NR_rt_sigprocmask,=20
- how, (UWord)set, (UWord)oldset,=20
- _VKI_NSIG_WORDS * sizeof(UWord));
- return res.isError ? -1 : 0;
-}
-
-
-Int VG_(sigaction) ( Int signum, const struct vki_sigaction* act, =20
- struct vki_sigaction* oldact)
-{
- SysRes res =3D VG_(do_syscall4)(__NR_rt_sigaction,
- signum, (UWord)act, (UWord)oldact,=20
- _VKI_NSIG_WORDS * sizeof(UWord));
- return res.isError ? -1 : 0;
-}
-
-
-Int VG_(sigaltstack)( const vki_stack_t* ss, vki_stack_t* oss )
-{
- SysRes res =3D VG_(do_syscall2)(__NR_sigaltstack, (UWord)ss, (UWord)o=
ss);
- return res.isError ? -1 : 0;
-}
-
-Int VG_(sigtimedwait)( const vki_sigset_t *set, vki_siginfo_t *info,=20
- const struct vki_timespec *timeout )
-{
- SysRes res =3D VG_(do_syscall4)(__NR_rt_sigtimedwait, (UWord)set, (UW=
ord)info,=20
- (UWord)timeout, sizeof(*set));
- return res.isError ? -1 : res.val;
-}
-=20
-Int VG_(signal)(Int signum, void (*sighandler)(Int))
-{
- SysRes res;
- Int n;
- struct vki_sigaction sa;
- sa.ksa_handler =3D sighandler;
- sa.sa_flags =3D VKI_SA_ONSTACK | VKI_SA_RESTART;
- sa.sa_restorer =3D NULL;
- n =3D VG_(sigemptyset)( &sa.sa_mask );
- vg_assert(n =3D=3D 0);
- res =3D VG_(do_syscall4)(__NR_rt_sigaction, signum, (UWord)&sa, (UWor=
d)NULL,
- _VKI_NSIG_WORDS * sizeof(UWord));
- return res.isError ? -1 : 0;
-}
-
-
-Int VG_(kill)( Int pid, Int signo )
-{
- SysRes res =3D VG_(do_syscall2)(__NR_kill, pid, signo);
- return res.isError ? -1 : 0;
-}
-
-
-Int VG_(tkill)( ThreadId tid, Int signo )
-{
- SysRes res =3D VG_(mk_SysRes_Error)(VKI_ENOSYS);
-
-#if 0
- /* This isn't right because the client may create a process
- structure with multiple thread groups */
- res =3D VG_(do_syscall)(__NR_tgkill, VG_(getpid)(), tid, signo);
-#endif
-
- res =3D VG_(do_syscall2)(__NR_tkill, tid, signo);
-
- if (res.isError && res.val =3D=3D VKI_ENOSYS)
- res =3D VG_(do_syscall2)(__NR_kill, tid, signo);
-
- return res.isError ? -1 : 0;
-}
-
-Int VG_(sigpending) ( vki_sigset_t* set )
-{
-// Nb: AMD64/Linux doesn't have __NR_sigpending; it only provides
-// __NR_rt_sigpending. This function will have to be abstracted in some
-// way to account for this. In the meantime, the easy option is to forg=
et
-// about it for AMD64 until it's needed.
-#ifdef __amd64__
- I_die_here;
-#else
- SysRes res =3D VG_(do_syscall1)(__NR_sigpending, (UWord)set);
- return res.isError ? -1 : 0;
-#endif
-}
-
Int VG_(waitpid)(Int pid, Int *status, Int options)
{
SysRes res =3D VG_(do_syscall4)(__NR_wait4, pid, (UWord)status, optio=
ns, 0);
@@ -857,3 +656,4 @@
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
+
Modified: trunk/include/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/Makefile.am 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/include/Makefile.am 2005-06-10 22:08:14 UTC (rev 3870)
@@ -12,6 +12,7 @@
pub_tool_libcassert.h \
pub_tool_libcfile.h \
pub_tool_libcprint.h \
+ pub_tool_libcsignal.h \
pub_tool_mallocfree.h \
pub_tool_options.h \
pub_tool_profile.h \
Added: trunk/include/pub_tool_libcsignal.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_libcsignal.h 2005-06-10 13:34:14 UTC (rev 3869=
)
+++ trunk/include/pub_tool_libcsignal.h 2005-06-10 22:08:14 UTC (rev 3870=
)
@@ -0,0 +1,76 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Signal-related libc stuff. pub_tool_libcsignal.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ 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_TOOL_LIBCBSIGNAL_H
+#define __PUB_TOOL_LIBCBSIGNAL_H
+
+/* 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
+ of the world is entirely irrelevant. */
+
+/* --- Signal set ops --- */
+extern Int VG_(sigfillset) ( vki_sigset_t* set );
+extern Int VG_(sigemptyset) ( vki_sigset_t* set );
+
+extern Bool VG_(isfullsigset) ( const vki_sigset_t* set );
+extern Bool VG_(isemptysigset) ( const vki_sigset_t* set );
+extern Bool VG_(iseqsigset) ( const vki_sigset_t* set1,
+ const vki_sigset_t* set2 );
+
+extern Int VG_(sigaddset) ( vki_sigset_t* set, Int signum );
+extern Int VG_(sigdelset) ( vki_sigset_t* set, Int signum );
+extern Int VG_(sigismember) ( const vki_sigset_t* set, Int signum );
+
+extern void VG_(sigaddset_from_set) ( vki_sigset_t* dst, vki_sigset_t* s=
rc );
+extern void VG_(sigdelset_from_set) ( vki_sigset_t* dst, vki_sigset_t* s=
rc );
+
+/* --- Mess with the kernel's sig state --- */
+extern Int VG_(sigprocmask) ( Int how, const vki_sigset_t* set,
+ vki_sigset_t* oldset );
+extern Int VG_(sigaction) ( Int signum,
+ const struct vki_sigaction* act,
+ struct vki_sigaction* oldact );
+
+extern Int VG_(sigtimedwait)( const vki_sigset_t *, vki_siginfo_t *,=20
+ const struct vki_timespec * );
+
+extern Int VG_(signal) ( Int signum, void (*sighandler)(Int) );
+extern Int VG_(sigaltstack) ( const vki_stack_t* ss, vki_stack_t* oss );
+
+extern Int VG_(kill) ( Int pid, Int signo );
+extern Int VG_(tkill) ( ThreadId tid, Int signo );
+extern Int VG_(sigpending) ( vki_sigset_t* set );
+
+#endif // __PUB_TOOL_LIBCBSIGNAL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/include/tool.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/tool.h 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/include/tool.h 2005-06-10 22:08:14 UTC (rev 3870)
@@ -176,47 +176,6 @@
/* Calls "mark_addr" with register values (which may or may not be point=
ers) */
extern void VG_(mark_from_registers)(void (*mark_addr)(Addr addr));
=20
-/* ------------------------------------------------------------------ */
-/* signal.h.
-
- Note that these use the vk_ (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
- of the world is entirely irrelevant. */
-
-/* --- Signal set ops --- */
-extern Int VG_(sigfillset) ( vki_sigset_t* set );
-extern Int VG_(sigemptyset) ( vki_sigset_t* set );
-
-extern Bool VG_(isfullsigset) ( const vki_sigset_t* set );
-extern Bool VG_(isemptysigset) ( const vki_sigset_t* set );
-extern Bool VG_(iseqsigset) ( const vki_sigset_t* set1,
- const vki_sigset_t* set2 );
-
-extern Int VG_(sigaddset) ( vki_sigset_t* set, Int signum );
-extern Int VG_(sigdelset) ( vki_sigset_t* set, Int signum );
-extern Int VG_(sigismember) ( const vki_sigset_t* set, Int signum );
-
-extern void VG_(sigaddset_from_set) ( vki_sigset_t* dst, vki_sigset_t* s=
rc );
-extern void VG_(sigdelset_from_set) ( vki_sigset_t* dst, vki_sigset_t* s=
rc );
-
-/* --- Mess with the kernel's sig state --- */
-extern Int VG_(sigprocmask) ( Int how, const vki_sigset_t* set,
- vki_sigset_t* oldset );
-extern Int VG_(sigaction) ( Int signum,
- const struct vki_sigaction* act,
- struct vki_sigaction* oldact );
-
-extern Int VG_(sigtimedwait)( const vki_sigset_t *, vki_siginfo_t *,=20
- const struct vki_timespec * );
-
-extern Int VG_(signal) ( Int signum, void (*sighandler)(Int) );
-extern Int VG_(sigaltstack) ( const vki_stack_t* ss, vki_stack_t* oss );
-
-extern Int VG_(kill) ( Int pid, Int signo );
-extern Int VG_(tkill) ( ThreadId tid, Int signo );
-extern Int VG_(sigpending) ( vki_sigset_t* set );
-
extern Int VG_(waitpid) ( Int pid, Int *status, Int options );
=20
/* ------------------------------------------------------------------ */
Modified: trunk/memcheck/mac_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_leakcheck.c 2005-06-10 13:34:14 UTC (rev 3869)
+++ trunk/memcheck/mac_leakcheck.c 2005-06-10 22:08:14 UTC (rev 3870)
@@ -35,6 +35,7 @@
#include "pub_tool_libcbase.h"
#include "pub_tool_libcassert.h"
#include "pub_tool_libcprint.h"
+#include "pub_tool_libcsignal.h"
=20
/* Define to debug the memory-leak-detector. */
#define VG_DEBUG_LEAKCHECK 0
|
|
From: Craig C. <cc...@us...> - 2005-06-10 21:17:26
|
Hi, This patch applies to Paul Mackerras' latest Valgrind PPC port (http://valgrind.org/downloads/pmk/valgrind-2.4.0-ppc.tar.bz2). Before restarting an interrupted system call, gpr3 was getting corrupted causing the system call to restart with an incorrect first parameter. I added code to the previous patch to restore the correct value into gpr3 before exiting sys_sigreturn. Important: the patch in the parent post (named sigprocmask.patch) is superceded by this patch. Thanks, Craig -- Craig Chaney cc...@us... |
|
From: <sv...@va...> - 2005-06-10 13:34:19
|
Author: njn Date: 2005-06-10 14:34:14 +0100 (Fri, 10 Jun 2005) New Revision: 3869 Log: Removed unneeded headers. Removed: trunk/coregrind/m_syscalls/priv_syscalls-amd64-linux.h trunk/coregrind/m_syscalls/priv_syscalls-arm-linux.h trunk/coregrind/m_syscalls/priv_syscalls-x86-linux.h Modified: trunk/NOTES.txt trunk/coregrind/m_syscalls/Makefile.am Modified: trunk/NOTES.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/NOTES.txt 2005-06-10 10:40:48 UTC (rev 3868) +++ trunk/NOTES.txt 2005-06-10 13:34:14 UTC (rev 3869) @@ -2,11 +2,6 @@ ~~~~~~~~~ ToDo: vex-amd64: check above/below the line for reg-alloc =20 -9 June 05 (after major syscalls overhaul) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -corecheck/m_syscalls/syscalls-x86-linux.h is now empty. Should it be -deleted? Ditto corecheck/m_syscalls/syscalls-amd64-linux.h. - 23 Apr 05 (memcheck-on-amd64 notes) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * If a thread is given an initial stack with address range [lo .. hi], Modified: trunk/coregrind/m_syscalls/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/m_syscalls/Makefile.am 2005-06-10 10:40:48 UTC (rev 3= 868) +++ trunk/coregrind/m_syscalls/Makefile.am 2005-06-10 13:34:14 UTC (rev 3= 869) @@ -7,10 +7,7 @@ noinst_HEADERS =3D \ priv_types_n_macros.h \ priv_syscalls-generic.h \ - priv_syscalls-linux.h \ - priv_syscalls-amd64-linux.h \ - priv_syscalls-arm-linux.h \ - priv_syscalls-x86-linux.h + priv_syscalls-linux.h =20 noinst_LIBRARIES =3D libsyscalls.a =20 Deleted: trunk/coregrind/m_syscalls/priv_syscalls-amd64-linux.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/m_syscalls/priv_syscalls-amd64-linux.h 2005-06-10 10:= 40:48 UTC (rev 3868) +++ trunk/coregrind/m_syscalls/priv_syscalls-amd64-linux.h 2005-06-10 13:= 34:14 UTC (rev 3869) @@ -1,41 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- AMD64/Linux-specific syscall stuff. ---*/ -/*--- priv_syscalls-amd64-linux.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Nicholas Nethercote - nj...@va... - - 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 __PRIV_SYSCALLS_AMD64_LINUX_H -#define __PRIV_SYSCALLS_AMD64_LINUX_H - -#endif // __PRIV_SYSCALLS_AMD64_LINUX_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ - - Deleted: trunk/coregrind/m_syscalls/priv_syscalls-arm-linux.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/m_syscalls/priv_syscalls-arm-linux.h 2005-06-10 10:40= :48 UTC (rev 3868) +++ trunk/coregrind/m_syscalls/priv_syscalls-arm-linux.h 2005-06-10 13:34= :14 UTC (rev 3869) @@ -1,57 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- ARM/Linux-specific syscall stuff. priv_syscalls-arm-linux.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Nicholas Nethercote - nj...@va... - - 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 __PRIV_SYSCALLS_ARM_LINUX_H -#define __PRIV_SYSCALLS_ARM_LINUX_H - -// Accessors for the ThreadArchState -#define VGP_SYSCALL_NUM guest_SYSCALLNO -#define VGP_SYSCALL_ARG1 guest_R0 -#define VGP_SYSCALL_ARG2 guest_R1 -#define VGP_SYSCALL_ARG3 guest_R2 -#define VGP_SYSCALL_ARG4 guest_R3 -#define VGP_SYSCALL_ARG5 guest_R4 -#define VGP_SYSCALL_ARG6 guest_R5 -#define VGP_SYSCALL_RET guest_R0 // ToDo XXX ???????? - -// ToDo XXX ???????? -#define VGP_SET_SYSCALL_RESULT(regs, val) ((regs).vex.guest_R0 =3D (v= al)) - -// For informing tools that a syscall result has been set. -// XXX ToDo: not sure about this -#define VGP_TRACK_SYSCALL_RETVAL(zztid) \ - VG_TRACK( post_reg_write, Vg_CoreSysCall, zztid, O_SYSCALL_RET, sizeo= f(UWord) ); - -#endif // __PRIV_SYSCALLS_ARM_LINUX_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ - Deleted: trunk/coregrind/m_syscalls/priv_syscalls-x86-linux.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/m_syscalls/priv_syscalls-x86-linux.h 2005-06-10 10:40= :48 UTC (rev 3868) +++ trunk/coregrind/m_syscalls/priv_syscalls-x86-linux.h 2005-06-10 13:34= :14 UTC (rev 3869) @@ -1,39 +0,0 @@ - -/*--------------------------------------------------------------------*/ -/*--- x86/Linux-specific syscall stuff. priv_syscalls-x86-linux.h ---*/ -/*--------------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright (C) 2000-2005 Nicholas Nethercote - nj...@va... - - 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 __PRIV_SYSCALLS_X86_LINUX_H -#define __PRIV_SYSCALLS_X86_LINUX_H - -#endif // __PRIV_SYSCALLS_X86_LINUX_H - -/*--------------------------------------------------------------------*/ -/*--- end ---*/ -/*--------------------------------------------------------------------*/ - |
|
From: <sv...@va...> - 2005-06-10 11:04:56
|
Author: sewardj
Date: 2005-06-10 12:04:52 +0100 (Fri, 10 Jun 2005)
New Revision: 1205
Log:
amd64: handle MOVUPS G to E
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2005-05-30 11:19:54 UTC (rev 1204)
+++ trunk/priv/guest-amd64/toIR.c 2005-06-10 11:04:52 UTC (rev 1205)
@@ -8571,16 +8571,17 @@
}
=20
/* 0F 29 =3D MOVAPS -- move from G (xmm) to E (mem or xmm). */
+ /* 0F 11 =3D MOVUPS -- move from G (xmm) to E (mem or xmm). */
if (haveNo66noF2noF3(pfx) && sz =3D=3D 4
- && insn[0] =3D=3D 0x0F && insn[1] =3D=3D 0x29) {
+ && insn[0] =3D=3D 0x0F && (insn[1] =3D=3D 0x29 || insn[1] =3D=3D =
0x11)) {
modrm =3D getUChar(delta+2);
if (epartIsReg(modrm)) {
/* fall through; awaiting test case */
} else {
addr =3D disAMode ( &alen, pfx, delta+2, dis_buf, 0 );
storeLE( mkexpr(addr), getXMMReg(gregOfRexRM(pfx,modrm)) );
- DIP("movaps %s,%s\n", nameXMMReg(gregOfRexRM(pfx,modrm)),
- dis_buf );
+ DIP("mov[ua]ps %s,%s\n", nameXMMReg(gregOfRexRM(pfx,modrm)),
+ dis_buf );
delta +=3D 2+alen;
goto decode_success;
}
|
|
From: <sv...@va...> - 2005-06-10 10:40:50
|
Author: sewardj
Date: 2005-06-10 11:40:48 +0100 (Fri, 10 Jun 2005)
New Revision: 3868
Log:
Fix copy-n-paste error which could cause many syscalls to fail on amd64.
Modified:
trunk/coregrind/m_syscalls/syscalls-main.c
Modified: trunk/coregrind/m_syscalls/syscalls-main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-main.c 2005-06-10 10:27:55 UTC (r=
ev 3867)
+++ trunk/coregrind/m_syscalls/syscalls-main.c 2005-06-10 10:40:48 UTC (r=
ev 3868)
@@ -327,7 +327,7 @@
# else
# if defined(VGP_amd64_linux)
VexGuestAMD64State* gst =3D (VexGuestAMD64State*)gst_vanilla;
- Long i =3D (Int)gst->guest_RAX;
+ Long i =3D (Long)gst->guest_RAX;
canonical->what =3D i >=3D -4095 && i <=3D -1 ? SsFailure : SsSucce=
ss;
canonical->val =3D (UWord)(canonical->what=3D=3DSsFailure ? -i : i);
# else
|
|
From: <sv...@va...> - 2005-06-10 10:27:59
|
Author: sewardj
Date: 2005-06-10 11:27:55 +0100 (Fri, 10 Jun 2005)
New Revision: 3867
Log:
Clean up after m_syscalls changes: reinstate enough syscalls that
memcheck/tests/x86/scalar works again.
Modified:
trunk/coregrind/m_syscalls/priv_types_n_macros.h
trunk/coregrind/m_syscalls/syscalls-generic.c
trunk/coregrind/m_syscalls/syscalls-linux.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
Modified: trunk/coregrind/m_syscalls/priv_types_n_macros.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/priv_types_n_macros.h 2005-06-10 10:25:02 =
UTC (rev 3866)
+++ trunk/coregrind/m_syscalls/priv_types_n_macros.h 2005-06-10 10:27:55 =
UTC (rev 3867)
@@ -83,11 +83,10 @@
SyscallArgLayout;
=20
/* Flags describing syscall wrappers */
-#define SfMayBlock (1 << 1) /* may block =
*/
-#define SfPostOnFail (1 << 2) /* call POST() function on failure =
*/
-/* #define SfPadAddr (1 << 3) */ /* pad+unpad address space around sysca=
ll */
-#define SfPollAfter (1 << 4) /* poll for signals on completion =
*/
-#define SfYieldAfter (1 << 5) /* yield on completion =
*/
+#define SfMayBlock (1 << 1) /* may block */
+#define SfPostOnFail (1 << 2) /* call POST() function on failure */
+#define SfPollAfter (1 << 3) /* poll for signals on completion */
+#define SfYieldAfter (1 << 4) /* yield on completion */
=20
=20
/* ---------------------------------------------------------------------
@@ -143,13 +142,18 @@
=20
You should create corresponding global declarations using
DECL_TEMPLATE (indirectly) below. =20
+
+ Note. The silly name "arrghs" is used rather than just "args"
+ because a few wrappers declare the name "args" themselves, and
+ renaming those decls can change the name that comes out in error
+ messages (on scalar arg checks). Hence rename this instead.
*/
=20
#define DEFN_PRE_TEMPLATE(auxstr, name) \
void vgSysWrap_##auxstr##_##name##_before \
( ThreadId tid, \
SyscallArgLayout* layout, \
- /*MOD*/SyscallArgs* args, \
+ /*MOD*/SyscallArgs* arrghs, \
/*OUT*/SyscallStatus* status, \
/*OUT*/UWord* flags \
)
@@ -157,7 +161,7 @@
#define DEFN_POST_TEMPLATE(auxstr, name) \
void vgSysWrap_##auxstr##_##name##_after \
( ThreadId tid, \
- SyscallArgs* args, \
+ SyscallArgs* arrghs, \
SyscallStatus* status \
)
=20
@@ -171,14 +175,14 @@
void vgSysWrap_##auxstr##_##name##_before \
( ThreadId tid, \
SyscallArgLayout* layout, \
- /*MOD*/SyscallArgs* args, \
+ /*MOD*/SyscallArgs* arrghs, \
/*OUT*/SyscallStatus* status, \
/*OUT*/UWord* flags \
); \
extern \
void vgSysWrap_##auxstr##_##name##_after \
( ThreadId tid, \
- SyscallArgs* args, \
+ SyscallArgs* arrghs, \
SyscallStatus* status \
);
=20
@@ -213,13 +217,13 @@
=20
/* Reference to the syscall's arguments -- the ones which the
pre-wrapper may have modified, not the original copy. */
-#define SYSNO (args->sysno)
-#define ARG1 (args->arg1)
-#define ARG2 (args->arg2)
-#define ARG3 (args->arg3)
-#define ARG4 (args->arg4)
-#define ARG5 (args->arg5)
-#define ARG6 (args->arg6)
+#define SYSNO (arrghs->sysno)
+#define ARG1 (arrghs->arg1)
+#define ARG2 (arrghs->arg2)
+#define ARG3 (arrghs->arg3)
+#define ARG4 (arrghs->arg4)
+#define ARG5 (arrghs->arg5)
+#define ARG6 (arrghs->arg6)
=20
/* Reference to the syscall's current result status/value. Note that
=20
Modified: trunk/coregrind/m_syscalls/syscalls-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-generic.c 2005-06-10 10:25:02 UTC=
(rev 3866)
+++ trunk/coregrind/m_syscalls/syscalls-generic.c 2005-06-10 10:27:55 UTC=
(rev 3867)
@@ -1690,41 +1690,44 @@
PRE_REG_READ1(long, "iopl", unsigned long, level);
}
=20
-//zz PRE(sys_setxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_setxattr ( %p, %p, %p, %llu, %d )",
-//zz ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
-//zz PRE_REG_READ5(long, "setxattr",
-//zz char *, path, char *, name,
-//zz void *, value, vki_size_t, size, int, flags);
-//zz PRE_MEM_RASCIIZ( "setxattr(path)", ARG1 );
-//zz PRE_MEM_RASCIIZ( "setxattr(name)", ARG2 );
-//zz PRE_MEM_READ( "setxattr(value)", ARG3, ARG4 );
-//zz }
-//zz=20
-//zz PRE(sys_lsetxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_lsetxattr ( %p, %p, %p, %llu, %d )",
-//zz ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
-//zz PRE_REG_READ5(long, "lsetxattr",
-//zz char *, path, char *, name,
-//zz void *, value, vki_size_t, size, int, flags);
-//zz PRE_MEM_RASCIIZ( "lsetxattr(path)", ARG1 );
-//zz PRE_MEM_RASCIIZ( "lsetxattr(name)", ARG2 );
-//zz PRE_MEM_READ( "lsetxattr(value)", ARG3, ARG4 );
-//zz }
-//zz=20
-//zz PRE(sys_fsetxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_fsetxattr ( %d, %p, %p, %llu, %d )",
-//zz ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
-//zz PRE_REG_READ5(long, "fsetxattr",
-//zz int, fd, char *, name, void *, value,
-//zz vki_size_t, size, int, flags);
-//zz PRE_MEM_RASCIIZ( "fsetxattr(name)", ARG2 );
-//zz PRE_MEM_READ( "fsetxattr(value)", ARG3, ARG4 );
-//zz }
+PRE(sys_setxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_setxattr ( %p, %p, %p, %llu, %d )",
+ ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
+ PRE_REG_READ5(long, "setxattr",
+ char *, path, char *, name,
+ void *, value, vki_size_t, size, int, flags);
+ PRE_MEM_RASCIIZ( "setxattr(path)", ARG1 );
+ PRE_MEM_RASCIIZ( "setxattr(name)", ARG2 );
+ PRE_MEM_READ( "setxattr(value)", ARG3, ARG4 );
+}
=20
+PRE(sys_lsetxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_lsetxattr ( %p, %p, %p, %llu, %d )",
+ ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
+ PRE_REG_READ5(long, "lsetxattr",
+ char *, path, char *, name,
+ void *, value, vki_size_t, size, int, flags);
+ PRE_MEM_RASCIIZ( "lsetxattr(path)", ARG1 );
+ PRE_MEM_RASCIIZ( "lsetxattr(name)", ARG2 );
+ PRE_MEM_READ( "lsetxattr(value)", ARG3, ARG4 );
+}
+
+PRE(sys_fsetxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_fsetxattr ( %d, %p, %p, %llu, %d )",
+ ARG1, ARG2, ARG3, (ULong)ARG4, ARG5);
+ PRE_REG_READ5(long, "fsetxattr",
+ int, fd, char *, name, void *, value,
+ vki_size_t, size, int, flags);
+ PRE_MEM_RASCIIZ( "fsetxattr(name)", ARG2 );
+ PRE_MEM_READ( "fsetxattr(value)", ARG3, ARG4 );
+}
+
PRE(sys_getxattr)
{
*flags |=3D SfMayBlock;
@@ -1735,7 +1738,6 @@
PRE_MEM_RASCIIZ( "getxattr(name)", ARG2 );
PRE_MEM_WRITE( "getxattr(value)", ARG3, ARG4 );
}
-
POST(sys_getxattr)
{
vg_assert(SUCCESS);
@@ -1744,105 +1746,109 @@
}
}
=20
-//zz PRE(sys_lgetxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_lgetxattr ( %p, %p, %p, %llu )", ARG1,ARG2,ARG3, (ULo=
ng)ARG4);
-//zz PRE_REG_READ4(ssize_t, "lgetxattr",
-//zz char *, path, char *, name, void *, value, vki_siz=
e_t, size);
-//zz PRE_MEM_RASCIIZ( "lgetxattr(path)", ARG1 );
-//zz PRE_MEM_RASCIIZ( "lgetxattr(name)", ARG2 );
-//zz PRE_MEM_WRITE( "lgetxattr(value)", ARG3, ARG4 );
-//zz }
-//zz=20
-//zz POST(sys_lgetxattr)
-//zz {
-//zz if (RES > 0 && ARG3 !=3D (Addr)NULL) {
-//zz POST_MEM_WRITE( ARG3, RES );
-//zz }
-//zz }
-//zz=20
-//zz PRE(sys_fgetxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_fgetxattr ( %d, %p, %p, %llu )", ARG1, ARG2, ARG3, (U=
Long)ARG4);
-//zz PRE_REG_READ4(ssize_t, "fgetxattr",
-//zz int, fd, char *, name, void *, value, vki_size_t, =
size);
-//zz PRE_MEM_RASCIIZ( "fgetxattr(name)", ARG2 );
-//zz PRE_MEM_WRITE( "fgetxattr(value)", ARG3, ARG4 );
-//zz }
-//zz=20
-//zz POST(sys_fgetxattr)
-//zz {
-//zz if (RES > 0 && ARG3 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG3, RES );
-//zz }
-//zz=20
-//zz PRE(sys_listxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_listxattr ( %p, %p, %llu )", ARG1, ARG2, (ULong)ARG3)=
;
-//zz PRE_REG_READ3(ssize_t, "listxattr",
-//zz char *, path, char *, list, vki_size_t, size);
-//zz PRE_MEM_RASCIIZ( "listxattr(path)", ARG1 );
-//zz PRE_MEM_WRITE( "listxattr(list)", ARG2, ARG3 );
-//zz }
-//zz=20
-//zz POST(sys_listxattr)
-//zz {
-//zz if (RES > 0 && ARG2 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG2, RES );
-//zz }
-//zz=20
-//zz PRE(sys_llistxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_llistxattr ( %p, %p, %llu )", ARG1, ARG2, (ULong)ARG3=
);
-//zz PRE_REG_READ3(ssize_t, "llistxattr",
-//zz char *, path, char *, list, vki_size_t, size);
-//zz PRE_MEM_RASCIIZ( "llistxattr(path)", ARG1 );
-//zz PRE_MEM_WRITE( "llistxattr(list)", ARG2, ARG3 );
-//zz }
-//zz=20
-//zz POST(sys_llistxattr)
-//zz {
-//zz if (RES > 0 && ARG2 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG2, RES );
-//zz }
-//zz=20
-//zz PRE(sys_flistxattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_flistxattr ( %d, %p, %llu )", ARG1, ARG2, (ULong)ARG3=
);
-//zz PRE_REG_READ3(ssize_t, "flistxattr",
-//zz int, fd, char *, list, vki_size_t, size);
-//zz PRE_MEM_WRITE( "flistxattr(list)", ARG2, ARG3 );
-//zz }
-//zz=20
-//zz POST(sys_flistxattr)
-//zz {
-//zz if (RES > 0 && ARG2 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG2, RES );
-//zz }
-//zz=20
-//zz PRE(sys_removexattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_removexattr ( %p, %p )", ARG1, ARG2);
-//zz PRE_REG_READ2(long, "removexattr", char *, path, char *, name);
-//zz PRE_MEM_RASCIIZ( "removexattr(path)", ARG1 );
-//zz PRE_MEM_RASCIIZ( "removexattr(name)", ARG2 );
-//zz }
-//zz=20
-//zz PRE(sys_lremovexattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_lremovexattr ( %p, %p )", ARG1, ARG2);
-//zz PRE_REG_READ2(long, "lremovexattr", char *, path, char *, name);
-//zz PRE_MEM_RASCIIZ( "lremovexattr(path)", ARG1 );
-//zz PRE_MEM_RASCIIZ( "lremovexattr(name)", ARG2 );
-//zz }
-//zz=20
-//zz PRE(sys_fremovexattr, SfMayBlock)
-//zz {
-//zz PRINT("sys_fremovexattr ( %d, %p )", ARG1, ARG2);
-//zz PRE_REG_READ2(long, "fremovexattr", int, fd, char *, name);
-//zz PRE_MEM_RASCIIZ( "fremovexattr(name)", ARG2 );
-//zz }
+PRE(sys_lgetxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_lgetxattr ( %p, %p, %p, %llu )", ARG1,ARG2,ARG3, (ULong)AR=
G4);
+ PRE_REG_READ4(ssize_t, "lgetxattr",
+ char *, path, char *, name, void *, value, vki_size_t, =
size);
+ PRE_MEM_RASCIIZ( "lgetxattr(path)", ARG1 );
+ PRE_MEM_RASCIIZ( "lgetxattr(name)", ARG2 );
+ PRE_MEM_WRITE( "lgetxattr(value)", ARG3, ARG4 );
+}
+POST(sys_lgetxattr)
+{
+ vg_assert(SUCCESS);
+ if (RES > 0 && ARG3 !=3D (Addr)NULL) {
+ POST_MEM_WRITE( ARG3, RES );
+ }
+}
=20
+PRE(sys_fgetxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_fgetxattr ( %d, %p, %p, %llu )", ARG1, ARG2, ARG3, (ULong)=
ARG4);
+ PRE_REG_READ4(ssize_t, "fgetxattr",
+ int, fd, char *, name, void *, value, vki_size_t, size)=
;
+ PRE_MEM_RASCIIZ( "fgetxattr(name)", ARG2 );
+ PRE_MEM_WRITE( "fgetxattr(value)", ARG3, ARG4 );
+}
+POST(sys_fgetxattr)
+{
+ if (RES > 0 && ARG3 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG3, RES );
+}
+
+PRE(sys_listxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_listxattr ( %p, %p, %llu )", ARG1, ARG2, (ULong)ARG3);
+ PRE_REG_READ3(ssize_t, "listxattr",
+ char *, path, char *, list, vki_size_t, size);
+ PRE_MEM_RASCIIZ( "listxattr(path)", ARG1 );
+ PRE_MEM_WRITE( "listxattr(list)", ARG2, ARG3 );
+}
+POST(sys_listxattr)
+{
+ if (RES > 0 && ARG2 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG2, RES );
+}
+
+PRE(sys_llistxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_llistxattr ( %p, %p, %llu )", ARG1, ARG2, (ULong)ARG3);
+ PRE_REG_READ3(ssize_t, "llistxattr",
+ char *, path, char *, list, vki_size_t, size);
+ PRE_MEM_RASCIIZ( "llistxattr(path)", ARG1 );
+ PRE_MEM_WRITE( "llistxattr(list)", ARG2, ARG3 );
+}
+POST(sys_llistxattr)
+{
+ if (RES > 0 && ARG2 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG2, RES );
+}
+
+PRE(sys_flistxattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_flistxattr ( %d, %p, %llu )", ARG1, ARG2, (ULong)ARG3);
+ PRE_REG_READ3(ssize_t, "flistxattr",
+ int, fd, char *, list, vki_size_t, size);
+ PRE_MEM_WRITE( "flistxattr(list)", ARG2, ARG3 );
+}
+POST(sys_flistxattr)
+{
+ if (RES > 0 && ARG2 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG2, RES );
+}
+
+PRE(sys_removexattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_removexattr ( %p, %p )", ARG1, ARG2);
+ PRE_REG_READ2(long, "removexattr", char *, path, char *, name);
+ PRE_MEM_RASCIIZ( "removexattr(path)", ARG1 );
+ PRE_MEM_RASCIIZ( "removexattr(name)", ARG2 );
+}
+
+PRE(sys_lremovexattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_lremovexattr ( %p, %p )", ARG1, ARG2);
+ PRE_REG_READ2(long, "lremovexattr", char *, path, char *, name);
+ PRE_MEM_RASCIIZ( "lremovexattr(path)", ARG1 );
+ PRE_MEM_RASCIIZ( "lremovexattr(name)", ARG2 );
+}
+
+PRE(sys_fremovexattr)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_fremovexattr ( %d, %p )", ARG1, ARG2);
+ PRE_REG_READ2(long, "fremovexattr", int, fd, char *, name);
+ PRE_MEM_RASCIIZ( "fremovexattr(name)", ARG2 );
+}
+
PRE(sys_quotactl)
{
PRINT("sys_quotactl (0x%x, %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3, ARG4);
@@ -1852,21 +1858,23 @@
PRE_MEM_RASCIIZ( "quotactl(special)", ARG2 );
}
=20
-//zz // XXX: this wrapper is only suitable for 32-bit platforms
-//zz PRE(sys_lookup_dcookie, 0)
-//zz {
-//zz PRINT("sys_lookup_dcookie (0x%llx, %p, %d)", LOHI64(ARG1,ARG2), =
ARG3, ARG4);
-//zz PRE_REG_READ4(long, "lookup_dcookie",
-//zz vki_u32, cookie_low32, vki_u32, cookie_high32,
-//zz char *, buf, vki_size_t, len);
-//zz PRE_MEM_WRITE( "lookup_dcookie(buf)", ARG3, ARG4);
-//zz }
-//zz=20
-//zz POST(sys_lookup_dcookie)
-//zz {
-//zz if (ARG3 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG3, RES);
-//zz }
+// XXX: this wrapper is only suitable for 32-bit platforms
+#if defined(VGP_x86_linux)
+PRE(sys_lookup_dcookie)
+{
+ PRINT("sys_lookup_dcookie (0x%llx, %p, %d)", LOHI64(ARG1,ARG2), ARG3,=
ARG4);
+ PRE_REG_READ4(long, "lookup_dcookie",
+ vki_u32, cookie_low32, vki_u32, cookie_high32,
+ char *, buf, vki_size_t, len);
+ PRE_MEM_WRITE( "lookup_dcookie(buf)", ARG3, ARG4);
+}
+POST(sys_lookup_dcookie)
+{
+ vg_assert(SUCCESS);
+ if (ARG3 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG3, RES);
+}
+#endif
=20
PRE(sys_fsync)
{
@@ -1891,76 +1899,75 @@
PRE_MEM_READ( "msync(start)", ARG1, ARG2 );
}
=20
-//zz // Nb: getpmsg() and putpmsg() are special additional syscalls used=
in early
-//zz // versions of LiS (Linux Streams). They are not part of the kerne=
l.
-//zz // Therefore, we have to provide this type ourself, rather than get=
ting it
-//zz // from the kernel sources.
-//zz struct vki_pmsg_strbuf {
-//zz int maxlen; /* no. of bytes in buffer */
-//zz int len; /* no. of bytes returned */
-//zz vki_caddr_t buf; /* pointer to data */
-//zz };
-//zz=20
-//zz PRE(sys_getpmsg, SfMayBlock)
-//zz {
-//zz /* LiS getpmsg from http://www.gcom.com/home/linux/lis/ */
-//zz struct vki_pmsg_strbuf *ctrl;
-//zz struct vki_pmsg_strbuf *data;
-//zz PRINT("sys_getpmsg ( %d, %p, %p, %p, %p )", ARG1,ARG2,ARG3,ARG4,=
ARG5);
-//zz PRE_REG_READ5(int, "getpmsg",
-//zz int, fd, struct strbuf *, ctrl, struct strbuf *, d=
ata,=20
-//zz int *, bandp, int *, flagsp);
-//zz ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
-//zz data =3D (struct vki_pmsg_strbuf *)ARG3;
-//zz if (ctrl && ctrl->maxlen > 0)
-//zz PRE_MEM_WRITE( "getpmsg(ctrl)", (Addr)ctrl->buf, ctrl->maxlen=
);
-//zz if (data && data->maxlen > 0)
-//zz PRE_MEM_WRITE( "getpmsg(data)", (Addr)data->buf, data->maxlen=
);
-//zz if (ARG4)
-//zz PRE_MEM_WRITE( "getpmsg(bandp)", (Addr)ARG4, sizeof(int));
-//zz if (ARG5)
-//zz PRE_MEM_WRITE( "getpmsg(flagsp)", (Addr)ARG5, sizeof(int));
-//zz }
-//zz=20
-//zz POST(sys_getpmsg)
-//zz {
-//zz struct vki_pmsg_strbuf *ctrl;
-//zz struct vki_pmsg_strbuf *data;
-//zz=20
-//zz ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
-//zz data =3D (struct vki_pmsg_strbuf *)ARG3;
-//zz if (RES =3D=3D 0 && ctrl && ctrl->len > 0) {
-//zz POST_MEM_WRITE( (Addr)ctrl->buf, ctrl->len);
-//zz }
-//zz if (RES =3D=3D 0 && data && data->len > 0) {
-//zz POST_MEM_WRITE( (Addr)data->buf, data->len);
-//zz }
-//zz }
-//zz=20
-//zz PRE(sys_putpmsg, SfMayBlock)
-//zz {
-//zz /* LiS putpmsg from http://www.gcom.com/home/linux/lis/ */
-//zz struct vki_pmsg_strbuf *ctrl;
-//zz struct vki_pmsg_strbuf *data;
-//zz PRINT("sys_putpmsg ( %d, %p, %p, %d, %d )", ARG1,ARG2,ARG3,ARG4,=
ARG5);
-//zz PRE_REG_READ5(int, "putpmsg",
-//zz int, fd, struct strbuf *, ctrl, struct strbuf *, d=
ata,=20
-//zz int, band, int, flags);
-//zz ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
-//zz data =3D (struct vki_pmsg_strbuf *)ARG3;
-//zz if (ctrl && ctrl->len > 0)
-//zz PRE_MEM_READ( "putpmsg(ctrl)", (Addr)ctrl->buf, ctrl->len);
-//zz if (data && data->len > 0)
-//zz PRE_MEM_READ( "putpmsg(data)", (Addr)data->buf, data->len);
-//zz }
+// Nb: getpmsg() and putpmsg() are special additional syscalls used in e=
arly
+// versions of LiS (Linux Streams). They are not part of the kernel.
+// Therefore, we have to provide this type ourself, rather than getting =
it
+// from the kernel sources.
+struct vki_pmsg_strbuf {
+ int maxlen; /* no. of bytes in buffer */
+ int len; /* no. of bytes returned */
+ vki_caddr_t buf; /* pointer to data */
+};
+PRE(sys_getpmsg)
+{
+ /* LiS getpmsg from http://www.gcom.com/home/linux/lis/ */
+ struct vki_pmsg_strbuf *ctrl;
+ struct vki_pmsg_strbuf *data;
+ *flags |=3D SfMayBlock;
+ PRINT("sys_getpmsg ( %d, %p, %p, %p, %p )", ARG1,ARG2,ARG3,ARG4,ARG5)=
;
+ PRE_REG_READ5(int, "getpmsg",
+ int, fd, struct strbuf *, ctrl, struct strbuf *, data,=20
+ int *, bandp, int *, flagsp);
+ ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
+ data =3D (struct vki_pmsg_strbuf *)ARG3;
+ if (ctrl && ctrl->maxlen > 0)
+ PRE_MEM_WRITE( "getpmsg(ctrl)", (Addr)ctrl->buf, ctrl->maxlen);
+ if (data && data->maxlen > 0)
+ PRE_MEM_WRITE( "getpmsg(data)", (Addr)data->buf, data->maxlen);
+ if (ARG4)
+ PRE_MEM_WRITE( "getpmsg(bandp)", (Addr)ARG4, sizeof(int));
+ if (ARG5)
+ PRE_MEM_WRITE( "getpmsg(flagsp)", (Addr)ARG5, sizeof(int));
+}
+POST(sys_getpmsg)
+{
+ struct vki_pmsg_strbuf *ctrl;
+ struct vki_pmsg_strbuf *data;
+ vg_assert(SUCCESS);
+ ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
+ data =3D (struct vki_pmsg_strbuf *)ARG3;
+ if (RES =3D=3D 0 && ctrl && ctrl->len > 0) {
+ POST_MEM_WRITE( (Addr)ctrl->buf, ctrl->len);
+ }
+ if (RES =3D=3D 0 && data && data->len > 0) {
+ POST_MEM_WRITE( (Addr)data->buf, data->len);
+ }
+}
=20
+PRE(sys_putpmsg)
+{
+ /* LiS putpmsg from http://www.gcom.com/home/linux/lis/ */
+ struct vki_pmsg_strbuf *ctrl;
+ struct vki_pmsg_strbuf *data;
+ *flags |=3D SfMayBlock;
+ PRINT("sys_putpmsg ( %d, %p, %p, %d, %d )", ARG1,ARG2,ARG3,ARG4,ARG5)=
;
+ PRE_REG_READ5(int, "putpmsg",
+ int, fd, struct strbuf *, ctrl, struct strbuf *, data,=20
+ int, band, int, flags);
+ ctrl =3D (struct vki_pmsg_strbuf *)ARG2;
+ data =3D (struct vki_pmsg_strbuf *)ARG3;
+ if (ctrl && ctrl->len > 0)
+ PRE_MEM_READ( "putpmsg(ctrl)", (Addr)ctrl->buf, ctrl->len);
+ if (data && data->len > 0)
+ PRE_MEM_READ( "putpmsg(data)", (Addr)data->buf, data->len);
+}
+
PRE(sys_getitimer)
{
PRINT("sys_getitimer ( %d, %p )", ARG1, ARG2);
PRE_REG_READ2(long, "getitimer", int, which, struct itimerval *, valu=
e);
PRE_MEM_WRITE( "getitimer(value)", ARG2, sizeof(struct vki_itimerval)=
);
}
-
POST(sys_getitimer)
{
if (ARG2 !=3D (Addr)NULL) {
@@ -2097,16 +2104,19 @@
PRE_REG_READ2(long, "setregid16", vki_old_gid_t, rgid, vki_old_gid_t,=
egid);
}
=20
-//zz // XXX: only for 32-bit archs
-//zz PRE(sys_pwrite64, SfMayBlock)
-//zz {
-//zz PRINT("sys_pwrite64 ( %d, %p, %llu, %lld )",
-//zz ARG1, ARG2, (ULong)ARG3, LOHI64(ARG4,ARG5));
-//zz PRE_REG_READ5(ssize_t, "pwrite64",
-//zz unsigned int, fd, const char *, buf, vki_size_t, c=
ount,
-//zz vki_u32, offset_low32, vki_u32, offset_high32);
-//zz PRE_MEM_READ( "pwrite64(buf)", ARG2, ARG3 );
-//zz }
+// XXX: only for 32-bit archs
+#if defined(VGP_x86_linux)
+PRE(sys_pwrite64)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_pwrite64 ( %d, %p, %llu, %lld )",
+ ARG1, ARG2, (ULong)ARG3, LOHI64(ARG4,ARG5));
+ PRE_REG_READ5(ssize_t, "pwrite64",
+ unsigned int, fd, const char *, buf, vki_size_t, count,
+ vki_u32, offset_low32, vki_u32, offset_high32);
+ PRE_MEM_READ( "pwrite64(buf)", ARG2, ARG3 );
+}
+#endif
=20
PRE(sys_sync)
{
@@ -2128,18 +2138,17 @@
POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs) );
}
=20
-//zz PRE(sys_fstatfs64, 0)
-//zz {
-//zz PRINT("sys_fstatfs64 ( %d, %llu, %p )",ARG1,(ULong)ARG2,ARG3);
-//zz PRE_REG_READ3(long, "fstatfs64",
-//zz unsigned int, fd, vki_size_t, size, struct statfs6=
4 *, buf);
-//zz PRE_MEM_WRITE( "fstatfs64(buf)", ARG3, ARG2 );
-//zz }
-//zz=20
-//zz POST(sys_fstatfs64)
-//zz {
-//zz POST_MEM_WRITE( ARG3, ARG2 );
-//zz }
+PRE(sys_fstatfs64)
+{
+ PRINT("sys_fstatfs64 ( %d, %llu, %p )",ARG1,(ULong)ARG2,ARG3);
+ PRE_REG_READ3(long, "fstatfs64",
+ unsigned int, fd, vki_size_t, size, struct statfs64 *, =
buf);
+ PRE_MEM_WRITE( "fstatfs64(buf)", ARG3, ARG2 );
+}
+POST(sys_fstatfs64)
+{
+ POST_MEM_WRITE( ARG3, ARG2 );
+}
=20
PRE(sys_getsid)
{
@@ -2194,35 +2203,34 @@
PRE_MEM_RASCIIZ( "init_module(uargs)", ARG3 );
}
=20
-//zz PRE(sys_capget, 0)
-//zz {
-//zz PRINT("sys_capget ( %p, %p )", ARG1, ARG2 );
-//zz PRE_REG_READ2(long, "capget",=20
-//zz vki_cap_user_header_t, header, vki_cap_user_data_t=
, data);
-//zz PRE_MEM_READ( "capget(header)", ARG1,=20
-//zz sizeof(struct __vki_user_cap_header_struct) );
-//zz PRE_MEM_WRITE( "capget(data)", ARG2,=20
-//zz sizeof(struct __vki_user_cap_data_struct) );
-//zz }
-//zz=20
-//zz POST(sys_capget)
-//zz {
-//zz if (ARG2 !=3D (Addr)NULL)
-//zz POST_MEM_WRITE( ARG2, sizeof(struct __vki_user_cap_data_struc=
t) );
-//zz }
-//zz=20
-//zz PRE(sys_capset, 0)
-//zz {
-//zz PRINT("sys_capset ( %p, %p )", ARG1, ARG2 );
-//zz PRE_REG_READ2(long, "capset",=20
-//zz vki_cap_user_header_t, header,
-//zz const vki_cap_user_data_t, data);
-//zz PRE_MEM_READ( "capset(header)",=20
-//zz ARG1, sizeof(struct __vki_user_cap_header_struct)=
);
-//zz PRE_MEM_READ( "capset(data)",=20
-//zz ARG2, sizeof(struct __vki_user_cap_data_struct) )=
;
-//zz }
+PRE(sys_capget)
+{
+ PRINT("sys_capget ( %p, %p )", ARG1, ARG2 );
+ PRE_REG_READ2(long, "capget",=20
+ vki_cap_user_header_t, header, vki_cap_user_data_t, dat=
a);
+ PRE_MEM_READ( "capget(header)", ARG1,=20
+ sizeof(struct __vki_user_cap_header_struct) );
+ PRE_MEM_WRITE( "capget(data)", ARG2,=20
+ sizeof(struct __vki_user_cap_data_struct) );
+}
+POST(sys_capget)
+{
+ if (ARG2 !=3D (Addr)NULL)
+ POST_MEM_WRITE( ARG2, sizeof(struct __vki_user_cap_data_struct) );
+}
=20
+PRE(sys_capset)
+{
+ PRINT("sys_capset ( %p, %p )", ARG1, ARG2 );
+ PRE_REG_READ2(long, "capset",=20
+ vki_cap_user_header_t, header,
+ const vki_cap_user_data_t, data);
+ PRE_MEM_READ( "capset(header)",=20
+ ARG1, sizeof(struct __vki_user_cap_header_struct) );
+ PRE_MEM_READ( "capset(data)",=20
+ ARG2, sizeof(struct __vki_user_cap_data_struct) );
+}
+
// Pre_read a char** argument.
static void pre_argv_envp(Addr a, ThreadId tid, Char* s1, Char* s2)
{
@@ -2452,32 +2460,32 @@
PRE_MEM_RASCIIZ( "chmod(path)", ARG1 );
}
=20
-//zz PRE(sys_chown16, 0)
-//zz {
-//zz PRINT("sys_chown16 ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "chown16",
-//zz const char *, path,
-//zz vki_old_uid_t, owner, vki_old_gid_t, group);
-//zz PRE_MEM_RASCIIZ( "chown16(path)", ARG1 );
-//zz }
-//zz=20
-//zz PRE(sys_chown, 0)
-//zz {
-//zz /* int chown(const char *path, uid_t owner, gid_t group); */
-//zz PRINT("sys_chown ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "chown",
-//zz const char *, path, vki_uid_t, owner, vki_gid_t, g=
roup);
-//zz PRE_MEM_RASCIIZ( "chown(path)", ARG1 );
-//zz }
-//zz=20
-//zz PRE(sys_lchown, 0)
-//zz {
-//zz PRINT("sys_lchown ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "lchown",
-//zz const char *, path, vki_uid_t, owner, vki_gid_t, g=
roup);
-//zz PRE_MEM_RASCIIZ( "lchown(path)", ARG1 );
-//zz }
+PRE(sys_chown16)
+{
+ PRINT("sys_chown16 ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "chown16",
+ const char *, path,
+ vki_old_uid_t, owner, vki_old_gid_t, group);
+ PRE_MEM_RASCIIZ( "chown16(path)", ARG1 );
+}
=20
+PRE(sys_chown)
+{
+ /* int chown(const char *path, uid_t owner, gid_t group); */
+ PRINT("sys_chown ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "chown",
+ const char *, path, vki_uid_t, owner, vki_gid_t, group)=
;
+ PRE_MEM_RASCIIZ( "chown(path)", ARG1 );
+}
+
+PRE(sys_lchown)
+{
+ PRINT("sys_lchown ( %p, 0x%x, 0x%x )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "lchown",
+ const char *, path, vki_uid_t, owner, vki_gid_t, group)=
;
+ PRE_MEM_RASCIIZ( "lchown(path)", ARG1 );
+}
+
PRE(sys_close)
{
PRINT("sys_close ( %d )", ARG1);
@@ -2539,12 +2547,12 @@
unsigned int, fd, vki_old_uid_t, owner, vki_old_gid_t, =
group);
}
=20
-//zz PRE(sys_fchown, 0)
-//zz {
-//zz PRINT("sys_fchown ( %d, %d, %d )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "fchown",
-//zz unsigned int, fd, vki_uid_t, owner, vki_gid_t, gro=
up);
-//zz }
+PRE(sys_fchown)
+{
+ PRINT("sys_fchown ( %d, %d, %d )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "fchown",
+ unsigned int, fd, vki_uid_t, owner, vki_gid_t, group);
+}
=20
PRE(sys_fchmod)
{
@@ -2745,26 +2753,31 @@
PRE_MEM_RASCIIZ( "truncate(path)", ARG1 );
}
=20
-//zz // XXX: this wrapper is only suitable for 32-bit platforms
-//zz PRE(sys_ftruncate64, SfMayBlock)
-//zz {
-//zz PRINT("sys_ftruncate64 ( %d, %lld )", ARG1, LOHI64(ARG2,ARG3));
-//zz PRE_REG_READ3(long, "ftruncate64",
-//zz unsigned int, fd,
-//zz vki_u32, length_low32, vki_u32, length_high32);
-//zz }
-//zz=20
-//zz // XXX: this wrapper is only suitable for 32-bit platforms
-//zz PRE(sys_truncate64, SfMayBlock)
-//zz {
-//zz PRINT("sys_truncate64 ( %p, %lld )", ARG1, LOHI64(ARG2, ARG3));
-//zz PRE_REG_READ3(long, "truncate64",
-//zz const char *, path,
-//zz vki_u32, length_low32, vki_u32, length_high32);
-//zz PRE_MEM_RASCIIZ( "truncate64(path)", ARG1 );
-//zz }
-//zz=20
+// XXX: this wrapper is only suitable for 32-bit platforms
+#if defined(VGP_x86_linux)
+PRE(sys_ftruncate64)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_ftruncate64 ( %d, %lld )", ARG1, LOHI64(ARG2,ARG3));
+ PRE_REG_READ3(long, "ftruncate64",
+ unsigned int, fd,
+ vki_u32, length_low32, vki_u32, length_high32);
+}
+#endif
=20
+// XXX: this wrapper is only suitable for 32-bit platforms
+#if defined(VGP_x86_linux)
+PRE(sys_truncate64)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_truncate64 ( %p, %lld )", ARG1, LOHI64(ARG2, ARG3));
+ PRE_REG_READ3(long, "truncate64",
+ const char *, path,
+ vki_u32, length_low32, vki_u32, length_high32);
+ PRE_MEM_RASCIIZ( "truncate64(path)", ARG1 );
+}
+#endif
+
PRE(sys_getdents)
{
*flags |=3D SfMayBlock;
@@ -4495,19 +4508,18 @@
VG_TRACK( die_mem_munmap, a, len );
}
=20
-//zz PRE(sys_mincore, 0)
-//zz {
-//zz PRINT("sys_mincore ( %p, %llu, %p )", ARG1,(ULong)ARG2,ARG3);
-//zz PRE_REG_READ3(long, "mincore",
-//zz unsigned long, start, vki_size_t, length,
-//zz unsigned char *, vec);
-//zz PRE_MEM_WRITE( "mincore(vec)", ARG3, (ARG2 + 4096 - 1) / 4096);
-//zz }
-//zz=20
-//zz POST(sys_mincore)
-//zz {
-//zz POST_MEM_WRITE( ARG3, (ARG2 + 4096 - 1) / 4096 ); =20
-//zz }
+PRE(sys_mincore)
+{
+ PRINT("sys_mincore ( %p, %llu, %p )", ARG1,(ULong)ARG2,ARG3);
+ PRE_REG_READ3(long, "mincore",
+ unsigned long, start, vki_size_t, length,
+ unsigned char *, vec);
+ PRE_MEM_WRITE( "mincore(vec)", ARG3, (ARG2 + 4096 - 1) / 4096);
+}
+POST(sys_mincore)
+{
+ POST_MEM_WRITE( ARG3, (ARG2 + 4096 - 1) / 4096 ); =20
+}
=20
PRE(sys_nanosleep)
{
@@ -4764,18 +4776,17 @@
PRE_MEM_RASCIIZ( "rmdir(pathname)", ARG1 );
}
=20
-//zz PRE(sys_sched_setparam, 0)
-//zz {
-//zz PRINT("sched_setparam ( %d, %p )", ARG1, ARG2 );
-//zz PRE_REG_READ2(long, "sched_setparam",=20
-//zz vki_pid_t, pid, struct sched_param *, p);
-//zz PRE_MEM_READ( "sched_setparam(p)", ARG2, sizeof(struct vki_sched=
_param) );
-//zz }
-//zz=20
-//zz POST(sys_sched_setparam)
-//zz {
-//zz POST_MEM_WRITE( ARG2, sizeof(struct vki_sched_param) );
-//zz }
+PRE(sys_sched_setparam)
+{
+ PRINT("sched_setparam ( %d, %p )", ARG1, ARG2 );
+ PRE_REG_READ2(long, "sched_setparam",=20
+ vki_pid_t, pid, struct sched_param *, p);
+ PRE_MEM_READ( "sched_setparam(p)", ARG2, sizeof(struct vki_sched_para=
m) );
+}
+POST(sys_sched_setparam)
+{
+ POST_MEM_WRITE( ARG2, sizeof(struct vki_sched_param) );
+}
=20
PRE(sys_sched_getparam)
{
@@ -4817,11 +4828,11 @@
PRE_REG_READ1(long, "setgid16", vki_old_gid_t, gid);
}
=20
-//zz PRE(sys_setgid, 0)
-//zz {
-//zz PRINT("sys_setgid ( %d )", ARG1);
-//zz PRE_REG_READ1(long, "setgid", vki_gid_t, gid);
-//zz }
+PRE(sys_setgid)
+{
+ PRINT("sys_setgid ( %d )", ARG1);
+ PRE_REG_READ1(long, "setgid", vki_gid_t, gid);
+}
=20
PRE(sys_setsid)
{
@@ -4837,13 +4848,13 @@
PRE_MEM_READ( "setgroups16(list)", ARG2, ARG1 * sizeof(vki_old_gid=
_t) );
}
=20
-//zz PRE(sys_setgroups, 0)
-//zz {
-//zz PRINT("setgroups ( %llu, %p )", (ULong)ARG1, ARG2);
-//zz PRE_REG_READ2(long, "setgroups", int, size, vki_gid_t *, list);
-//zz if (ARG1 > 0)
-//zz PRE_MEM_READ( "setgroups(list)", ARG2, ARG1 * sizeof(vki_gid_=
t) );
-//zz }
+PRE(sys_setgroups)
+{
+ PRINT("setgroups ( %llu, %p )", (ULong)ARG1, ARG2);
+ PRE_REG_READ2(long, "setgroups", int, size, vki_gid_t *, list);
+ if (ARG1 > 0)
+ PRE_MEM_READ( "setgroups(list)", ARG2, ARG1 * sizeof(vki_gid_t) );
+}
=20
PRE(sys_setpgid)
{
@@ -4863,11 +4874,11 @@
PRE_REG_READ2(long, "setreuid16", vki_old_uid_t, ruid, vki_old_uid_t,=
euid);
}
=20
-//zz PRE(sys_setreuid, 0)
-//zz {
-//zz PRINT("sys_setreuid ( 0x%x, 0x%x )", ARG1, ARG2);
-//zz PRE_REG_READ2(long, "setreuid", vki_uid_t, ruid, vki_uid_t, euid=
);
-//zz }
+PRE(sys_setreuid)
+{
+ PRINT("sys_setreuid ( 0x%x, 0x%x )", ARG1, ARG2);
+ PRE_REG_READ2(long, "setreuid", vki_uid_t, ruid, vki_uid_t, euid);
+}
=20
PRE(sys_setrlimit)
{
@@ -4915,11 +4926,11 @@
PRE_REG_READ1(long, "setuid16", vki_old_uid_t, uid);
}
=20
-//zz PRE(sys_setuid, 0)
-//zz {
-//zz PRINT("sys_setuid ( %d )", ARG1);
-//zz PRE_REG_READ1(long, "setuid", vki_uid_t, uid);
-//zz }
+PRE(sys_setuid)
+{
+ PRINT("sys_setuid ( %d )", ARG1);
+ PRE_REG_READ1(long, "setuid", vki_uid_t, uid);
+}
=20
PRE(sys_newstat)
{
@@ -4941,25 +4952,23 @@
PRE_MEM_RASCIIZ( "statfs(path)", ARG1 );
PRE_MEM_WRITE( "statfs(buf)", ARG2, sizeof(struct vki_statfs) );
}
-
POST(sys_statfs)
{
POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs) );
}
=20
-//zz PRE(sys_statfs64, 0)
-//zz {
-//zz PRINT("sys_statfs64 ( %p, %llu, %p )",ARG1,(ULong)ARG2,ARG3);
-//zz PRE_REG_READ3(long, "statfs64",
-//zz const char *, path, vki_size_t, size, struct statf=
s64 *, buf);
-//zz PRE_MEM_RASCIIZ( "statfs64(path)", ARG1 );
-//zz PRE_MEM_WRITE( "statfs64(buf)", ARG3, ARG2 );
-//zz }
-//zz=20
-//zz POST(sys_statfs64)
-//zz {
-//zz POST_MEM_WRITE( ARG3, ARG2 );
-//zz }
+PRE(sys_statfs64)
+{
+ PRINT("sys_statfs64 ( %p, %llu, %p )",ARG1,(ULong)ARG2,ARG3);
+ PRE_REG_READ3(long, "statfs64",
+ const char *, path, vki_size_t, size, struct statfs64 *=
, buf);
+ PRE_MEM_RASCIIZ( "statfs64(path)", ARG1 );
+ PRE_MEM_WRITE( "statfs64(buf)", ARG3, ARG2 );
+}
+POST(sys_statfs64)
+{
+ POST_MEM_WRITE( ARG3, ARG2 );
+}
=20
PRE(sys_symlink)
{
@@ -5102,36 +5111,35 @@
}
}
=20
-//zz PRE(sys_utimes, 0)
-//zz {
-//zz PRINT("sys_utimes ( %p, %p )", ARG1,ARG2);
-//zz PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *=
, tvp);
-//zz PRE_MEM_RASCIIZ( "utimes(filename)", ARG1 );
-//zz if (ARG2 !=3D 0)
-//zz PRE_MEM_READ( "utimes(tvp)", ARG2, sizeof(struct vki_timeval)=
);
-//zz }
-//zz=20
-//zz PRE(sys_sched_setaffinity, 0)
-//zz {
-//zz PRINT("sched_setaffinity ( %d, %d, %p )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "sched_setaffinity",=20
-//zz vki_pid_t, pid, unsigned int, len, unsigned long *=
, mask);
-//zz PRE_MEM_READ( "sched_setaffinity(mask)", ARG3, ARG2);
-//zz }
-//zz=20
-//zz PRE(sys_sched_getaffinity, 0)
-//zz {
-//zz PRINT("sched_getaffinity ( %d, %d, %p )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "sched_getaffinity",=20
-//zz vki_pid_t, pid, unsigned int, len, unsigned long *=
, mask);
-//zz PRE_MEM_WRITE( "sched_getaffinity(mask)", ARG3, ARG2);
-//zz }
-//zz=20
-//zz POST(sys_sched_getaffinity)
-//zz {
-//zz POST_MEM_WRITE(ARG3, ARG2);
-//zz }
+PRE(sys_utimes)
+{
+ PRINT("sys_utimes ( %p, %p )", ARG1,ARG2);
+ PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *, tvp=
);
+ PRE_MEM_RASCIIZ( "utimes(filename)", ARG1 );
+ if (ARG2 !=3D 0)
+ PRE_MEM_READ( "utimes(tvp)", ARG2, sizeof(struct vki_timeval) );
+}
=20
+PRE(sys_sched_setaffinity)
+{
+ PRINT("sched_setaffinity ( %d, %d, %p )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "sched_setaffinity",=20
+ vki_pid_t, pid, unsigned int, len, unsigned long *, mas=
k);
+ PRE_MEM_READ( "sched_setaffinity(mask)", ARG3, ARG2);
+}
+
+PRE(sys_sched_getaffinity)
+{
+ PRINT("sched_getaffinity ( %d, %d, %p )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "sched_getaffinity",=20
+ vki_pid_t, pid, unsigned int, len, unsigned long *, mas=
k);
+ PRE_MEM_WRITE( "sched_getaffinity(mask)", ARG3, ARG2);
+}
+POST(sys_sched_getaffinity)
+{
+ POST_MEM_WRITE(ARG3, ARG2);
+}
+
PRE(sys_acct)
{
PRINT("sys_acct ( %p )", ARG1);
@@ -5203,25 +5211,19 @@
POST_MEM_WRITE( ARG2, sizeof(vki_siginfo_t) );
}
=20
-//zz PRE(sys_rt_sigqueueinfo, 0)
-//zz {
-//zz PRINT("sys_rt_sigqueueinfo(%d, %d, %p)", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "rt_sigqueueinfo",=20
-//zz int, pid, int, sig, vki_siginfo_t *, uinfo);
-//zz if (ARG2 !=3D 0)
-//zz PRE_MEM_READ( "rt_sigqueueinfo(uinfo)", ARG3, sizeof(vki_sigi=
nfo_t) );
-//zz }
-//zz=20
-//zz POST(sys_rt_sigqueueinfo)
-//zz {
-//zz PRINT("sys_rt_sigqueueinfo(%d, %d, %p)", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "rt_sigqueueinfo",
-//zz int, pid, int, sig, vki_siginfo_t *, uinfo);
-//zz if (ARG2 !=3D 0)
-//zz PRE_MEM_READ( "rt_sigqueueinfo(uinfo)", ARG3, sizeof(vki_sigi=
nfo_t) );
-//zz if (!VG_(client_signal_OK)(ARG2))
-//zz SET_STATUS_( -VKI_EINVAL );
-//zz }
+PRE(sys_rt_sigqueueinfo)
+{
+ PRINT("sys_rt_sigqueueinfo(%d, %d, %p)", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "rt_sigqueueinfo",=20
+ int, pid, int, sig, vki_siginfo_t *, uinfo);
+ if (ARG2 !=3D 0)
+ PRE_MEM_READ( "rt_sigqueueinfo(uinfo)", ARG3, sizeof(vki_siginfo_t=
) );
+}
+POST(sys_rt_sigqueueinfo)
+{
+ if (!VG_(client_signal_OK)(ARG2))
+ SET_STATUS_Failure( VKI_EINVAL );
+}
=20
// XXX: x86-specific
PRE(sys_sigaltstack)
@@ -5242,7 +5244,6 @@
(vki_stack_t*)ARG2)
);
}
-
POST(sys_sigaltstack)
{
vg_assert(SUCCESS);
@@ -5272,7 +5273,6 @@
(struct vki_sigaction *)ARG3)
);
}
-
POST(sys_rt_sigaction)
{
vg_assert(SUCCESS);
@@ -5375,18 +5375,17 @@
POST_MEM_WRITE( ARG1, sizeof(vki_old_sigset_t) ) ;
}
=20
-//zz PRE(sys_rt_sigpending, 0)
-//zz {
-//zz PRINT( "sys_rt_sigpending ( %p )", ARG1 );
-//zz PRE_REG_READ2(long, "rt_sigpending",=20
-//zz vki_sigset_t *, set, vki_size_t, sigsetsize);
-//zz PRE_MEM_WRITE( "rt_sigpending(set)", ARG1, sizeof(vki_sigset_t))=
;
-//zz }
-//zz=20
-//zz POST(sys_rt_sigpending)
-//zz {
-//zz POST_MEM_WRITE( ARG1, sizeof(vki_sigset_t) ) ;
-//zz }
+PRE(sys_rt_sigpending)
+{
+ PRINT( "sys_rt_sigpending ( %p )", ARG1 );
+ PRE_REG_READ2(long, "rt_sigpending",=20
+ vki_sigset_t *, set, vki_size_t, sigsetsize);
+ PRE_MEM_WRITE( "rt_sigpending(set)", ARG1, sizeof(vki_sigset_t));
+}
+POST(sys_rt_sigpending)
+{
+ POST_MEM_WRITE( ARG1, sizeof(vki_sigset_t) ) ;
+}
=20
PRE(sys_mq_open)
{
@@ -5509,76 +5508,73 @@
POST_MEM_WRITE( ARG3, sizeof(struct vki_mq_attr) );
}
=20
-//zz PRE(sys_timer_create, 0)
-//zz {
-//zz PRINT("sys_timer_create( %d, %p, %p )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "timer_create",
-//zz vki_clockid_t, clockid, struct sigevent *, evp,
-//zz vki_timer_t *, timerid);
-//zz if (ARG2 !=3D 0)
-//zz PRE_MEM_READ( "timer_create(evp)", ARG2, sizeof(struct vki_si=
gevent) );
-//zz PRE_MEM_WRITE( "timer_create(timerid)", ARG3, sizeof(vki_timer_t=
) );
-//zz }
-//zz=20
-//zz POST(sys_timer_create)
-//zz {
-//zz POST_MEM_WRITE( ARG3, sizeof(vki_timer_t) );
-//zz }
-//zz=20
-//zz PRE(sys_timer_settime, 0)
-//zz {
-//zz PRINT("sys_timer_settime( %lld, %d, %p, %p )", (ULong)ARG1,ARG2,=
ARG3,ARG4);
-//zz PRE_REG_READ4(long, "timer_settime",=20
-//zz vki_timer_t, timerid, int, flags,
-//zz const struct itimerspec *, value,
-//zz struct itimerspec *, ovalue);
-//zz PRE_MEM_READ( "timer_settime(value)", ARG3,
-//zz sizeof(struct vki_itimerspec) );
-//zz if (ARG4 !=3D 0)
-//zz PRE_MEM_WRITE( "timer_settime(ovalue)", ARG4,
-//zz sizeof(struct vki_itimerspec) );
-//zz }
-//zz=20
-//zz POST(sys_timer_settime)
-//zz {
-//zz if (ARG4 !=3D 0)
-//zz POST_MEM_WRITE( ARG4, sizeof(struct vki_itimerspec) );
-//zz }
-//zz=20
-//zz PRE(sys_timer_gettime, 0)
-//zz {
-//zz PRINT("sys_timer_gettime( %lld, %p )", (ULong)ARG1,ARG2);
-//zz PRE_REG_READ2(long, "timer_gettime",=20
-//zz vki_timer_t, timerid, struct itimerspec *, value);
-//zz PRE_MEM_WRITE( "timer_gettime(value)", ARG2,
-//zz sizeof(struct vki_itimerspec));
-//zz }
-//zz=20
-//zz POST(sys_timer_gettime)
-//zz {
-//zz POST_MEM_WRITE( ARG2, sizeof(struct vki_itimerspec) );
-//zz }
-//zz=20
-//zz PRE(sys_timer_getoverrun, 0)
-//zz {
-//zz PRINT("sys_timer_getoverrun( %p )", ARG1);
-//zz PRE_REG_READ1(long, "timer_getoverrun", vki_timer_t, timerid);
-//zz }
-//zz=20
-//zz PRE(sys_timer_delete, 0)
-//zz {
-//zz PRINT("sys_timer_delete( %p )", ARG1);
-//zz PRE_REG_READ1(long, "timer_delete", vki_timer_t, timerid);
-//zz }
-//zz=20
-//zz PRE(sys_clock_settime, 0)
-//zz {
-//zz PRINT("sys_clock_settime( %d, %p )", ARG1,ARG2);
-//zz PRE_REG_READ2(long, "clock_settime",=20
-//zz vki_clockid_t, clk_id, const struct timespec *, tp=
);
-//zz PRE_MEM_READ( "clock_settime(tp)", ARG2, sizeof(struct vki_times=
pec) );
-//zz }
+PRE(sys_timer_create)
+{
+ PRINT("sys_timer_create( %d, %p, %p )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "timer_create",
+ vki_clockid_t, clockid, struct sigevent *, evp,
+ vki_timer_t *, timerid);
+ if (ARG2 !=3D 0)
+ PRE_MEM_READ( "timer_create(evp)", ARG2, sizeof(struct vki_sigeven=
t) );
+ PRE_MEM_WRITE( "timer_create(timerid)", ARG3, sizeof(vki_timer_t) );
+}
+POST(sys_timer_create)
+{
+ POST_MEM_WRITE( ARG3, sizeof(vki_timer_t) );
+}
=20
+PRE(sys_timer_settime)
+{
+ PRINT("sys_timer_settime( %lld, %d, %p, %p )", (ULong)ARG1,ARG2,ARG3,=
ARG4);
+ PRE_REG_READ4(long, "timer_settime",=20
+ vki_timer_t, timerid, int, flags,
+ const struct itimerspec *, value,
+ struct itimerspec *, ovalue);
+ PRE_MEM_READ( "timer_settime(value)", ARG3,
+ sizeof(struct vki_itimerspec) );
+ if (ARG4 !=3D 0)
+ PRE_MEM_WRITE( "timer_settime(ovalue)", ARG4,
+ sizeof(struct vki_itimerspec) );
+}
+POST(sys_timer_settime)
+{
+ if (ARG4 !=3D 0)
+ POST_MEM_WRITE( ARG4, sizeof(struct vki_itimerspec) );
+}
+
+PRE(sys_timer_gettime)
+{
+ PRINT("sys_timer_gettime( %lld, %p )", (ULong)ARG1,ARG2);
+ PRE_REG_READ2(long, "timer_gettime",=20
+ vki_timer_t, timerid, struct itimerspec *, value);
+ PRE_MEM_WRITE( "timer_gettime(value)", ARG2,
+ sizeof(struct vki_itimerspec));
+}
+POST(sys_timer_gettime)
+{
+ POST_MEM_WRITE( ARG2, sizeof(struct vki_itimerspec) );
+}
+
+PRE(sys_timer_getoverrun)
+{
+ PRINT("sys_timer_getoverrun( %p )", ARG1);
+ PRE_REG_READ1(long, "timer_getoverrun", vki_timer_t, timerid);
+}
+
+PRE(sys_timer_delete)
+{
+ PRINT("sys_timer_delete( %p )", ARG1);
+ PRE_REG_READ1(long, "timer_delete", vki_timer_t, timerid);
+}
+
+PRE(sys_clock_settime)
+{
+ PRINT("sys_clock_settime( %d, %p )", ARG1,ARG2);
+ PRE_REG_READ2(long, "clock_settime",=20
+ vki_clockid_t, clk_id, const struct timespec *, tp);
+ PRE_MEM_READ( "clock_settime(tp)", ARG2, sizeof(struct vki_timespec) =
);
+}
+
PRE(sys_clock_gettime)
{
PRINT("sys_clock_gettime( %d, %p )" , ARG1,ARG2);
@@ -5586,27 +5582,27 @@
vki_clockid_t, clk_id, struct timespec *, tp);
PRE_MEM_WRITE( "clock_gettime(tp)", ARG2, sizeof(struct vki_timespec)=
);
}
-
POST(sys_clock_gettime)
{
POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) );
}
=20
-//zz PRE(sys_clock_getres, 0)
-//zz {
-//zz PRINT("sys_clock_getres( %d, %p )" , ARG1,ARG2);
-//zz // Nb: we can't use "RES" as the param name because that's a mac=
ro
-//zz // defined above!
-//zz PRE_REG_READ2(long, "clock_getres",=20
-//zz vki_clockid_t, clk_id, struct timespec *, res);
-//zz PRE_MEM_WRITE( "clock_getres(res)", ARG2, sizeof(struct vki_time=
spec) );
-//zz }
-//zz=20
-//zz POST(sys_clock_getres)
-//zz {
-//zz POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) );
-//zz }
+PRE(sys_clock_getres)
+{
+ PRINT("sys_clock_getres( %d, %p )" , ARG1,ARG2);
+ // Nb: we can't use "RES" as the param name because that's a macro
+ // defined above!
+ PRE_REG_READ2(long, "clock_getres",=20
+ vki_clockid_t, clk_id, struct timespec *, res);
+ PRE_MEM_WRITE( "clock_getres(res)", ARG2, sizeof(struct vki_timespec)=
);
+}
+POST(sys_clock_getres)
+{
+ POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) );
+}
=20
+#undef PRE
+#undef POST
=20
/*--------------------------------------------------------------------*/
/*--- end syscalls-generic.c ---*/
Modified: trunk/coregrind/m_syscalls/syscalls-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-linux.c 2005-06-10 10:25:02 UTC (=
rev 3866)
+++ trunk/coregrind/m_syscalls/syscalls-linux.c 2005-06-10 10:27:55 UTC (=
rev 3867)
@@ -169,11 +169,11 @@
PRE_REG_READ1(long, "setfsuid16", vki_old_uid_t, uid);
}
=20
-//zz PRE(sys_setfsuid, 0)
-//zz {
-//zz PRINT("sys_setfsuid ( %d )", ARG1);
-//zz PRE_REG_READ1(long, "setfsuid", vki_uid_t, uid);
-//zz }
+PRE(sys_setfsuid)
+{
+ PRINT("sys_setfsuid ( %d )", ARG1);
+ PRE_REG_READ1(long, "setfsuid", vki_uid_t, uid);
+}
=20
PRE(sys_setfsgid16)
{
@@ -181,46 +181,46 @@
PRE_REG_READ1(long, "setfsgid16", vki_old_gid_t, gid);
}
=20
-//zz PRE(sys_setfsgid, 0)
-//zz {
-//zz PRINT("sys_setfsgid ( %d )", ARG1);
-//zz PRE_REG_READ1(long, "setfsgid", vki_gid_t, gid);
-//zz }
-//zz=20
-//zz PRE(sys_setresuid16, 0)
-//zz {
-//zz PRINT("sys_setresuid16 ( %d, %d, %d )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "setresuid16",
-//zz vki_old_uid_t, ruid, vki_old_uid_t, euid, vki_old_=
uid_t, suid);
-//zz }
-//zz=20
-//zz PRE(sys_setresuid, 0)
-//zz {
-//zz PRINT("sys_setresuid ( %d, %d, %d )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "setresuid",
-//zz vki_uid_t, ruid, vki_uid_t, euid, vki_uid_t, suid)=
;
-//zz }
-//zz=20
-//zz PRE(sys_getresuid16, 0)
-//zz {
-//zz PRINT("sys_getresuid16 ( %p, %p, %p )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "getresuid16",
-//zz vki_old_uid_t *, ruid, vki_old_uid_t *, euid,
-//zz vki_old_uid_t *, suid);
-//zz PRE_MEM_WRITE( "getresuid16(ruid)", ARG1, sizeof(vki_old_uid_t) =
);
-//zz PRE_MEM_WRITE( "getresuid16(euid)", ARG2, sizeof(vki_old_uid_t) =
);
-//zz PRE_MEM_WRITE( "getresuid16(suid)", ARG3, sizeof(vki_old_uid_t) =
);
-//zz }
-//zz=20
-//zz POST(sys_getresuid16)
-//zz {
-//zz if (RES =3D=3D 0) {
-//zz POST_MEM_WRITE( ARG1, sizeof(vki_old_uid_t) );
-//zz POST_MEM_WRITE( ARG2, sizeof(vki_old_uid_t) );
-//zz POST_MEM_WRITE( ARG3, sizeof(vki_old_uid_t) );
-//zz }
-//zz }
+PRE(sys_setfsgid)
+{
+ PRINT("sys_setfsgid ( %d )", ARG1);
+ PRE_REG_READ1(long, "setfsgid", vki_gid_t, gid);
+}
=20
+PRE(sys_setresuid16)
+{
+ PRINT("sys_setresuid16 ( %d, %d, %d )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "setresuid16",
+ vki_old_uid_t, ruid, vki_old_uid_t, euid, vki_old_uid_t=
, suid);
+}
+
+PRE(sys_setresuid)
+{
+ PRINT("sys_setresuid ( %d, %d, %d )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "setresuid",
+ vki_uid_t, ruid, vki_uid_t, euid, vki_uid_t, suid);
+}
+
+PRE(sys_getresuid16)
+{
+ PRINT("sys_getresuid16 ( %p, %p, %p )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "getresuid16",
+ vki_old_uid_t *, ruid, vki_old_uid_t *, euid,
+ vki_old_uid_t *, suid);
+ PRE_MEM_WRITE( "getresuid16(ruid)", ARG1, sizeof(vki_old_uid_t) );
+ PRE_MEM_WRITE( "getresuid16(euid)", ARG2, sizeof(vki_old_uid_t) );
+ PRE_MEM_WRITE( "getresuid16(suid)", ARG3, sizeof(vki_old_uid_t) );
+}
+POST(sys_getresuid16)
+{
+ vg_assert(SUCCESS);
+ if (RES =3D=3D 0) {
+ POST_MEM_WRITE( ARG1, sizeof(vki_old_uid_t) );
+ POST_MEM_WRITE( ARG2, sizeof(vki_old_uid_t) );
+ POST_MEM_WRITE( ARG3, sizeof(vki_old_uid_t) );
+ }
+}
+
PRE(sys_getresuid)
{
PRINT("sys_getresuid ( %p, %p, %p )", ARG1,ARG2,ARG3);
@@ -230,7 +230,6 @@
PRE_MEM_WRITE( "getresuid(euid)", ARG2, sizeof(vki_uid_t) );
PRE_MEM_WRITE( "getresuid(suid)", ARG3, sizeof(vki_uid_t) );
}
-
POST(sys_getresuid)
{
vg_assert(SUCCESS);
@@ -241,40 +240,41 @@
}
}
=20
-//zz PRE(sys_setresgid16, 0)
-//zz {
-//zz PRINT("sys_setresgid16 ( %d, %d, %d )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "setresgid16",
-//zz vki_old_gid_t, rgid, vki_old_gid_t, egid, vki_old_=
gid_t, sgid);
-//zz }
-//zz=20
-//zz PRE(sys_setresgid, 0)
-//zz {
-//zz PRINT("sys_setresgid ( %d, %d, %d )", ARG1, ARG2, ARG3);
-//zz PRE_REG_READ3(long, "setresgid",
-//zz vki_gid_t, rgid, vki_gid_t, egid, vki_gid_t, sgid)=
;
-//zz }
-//zz=20
-//zz PRE(sys_getresgid16, 0)
-//zz {
-//zz PRINT("sys_getresgid16 ( %p, %p, %p )", ARG1,ARG2,ARG3);
-//zz PRE_REG_READ3(long, "getresgid16",
-//zz vki_old_gid_t *, rgid, vki_old_gid_t *, egid,
-//zz vki_old_gid_t *, sgid);
-//zz PRE_MEM_WRITE( "getresgid16(rgid)", ARG1, sizeof(vki_old_gid_t) =
);
-//zz PRE_MEM_WRITE( "getresgid16(egid)", ARG2, sizeof(vki_old_gid_t) =
);
-//zz PRE_MEM_WRITE( "getresgid16(sgid)", ARG3, sizeof(vki_old_gid_t) =
);
-//zz }
-//zz=20
-//zz POST(sys_getresgid16)
-//zz {
-//zz if (RES =3D=3D 0) {
-//zz POST_MEM_WRITE( ARG1, sizeof(vki_old_gid_t) );
-//zz POST_MEM_WRITE( ARG2, sizeof(vki_old_gid_t) );
-//zz POST_MEM_WRITE( ARG3, sizeof(vki_old_gid_t) );
-//zz }
-//zz }
+PRE(sys_setresgid16)
+{
+ PRINT("sys_setresgid16 ( %d, %d, %d )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "setresgid16",
+ vki_old_gid_t, rgid,=20
+ vki_old_gid_t, egid, vki_old_gid_t, sgid);
+}
=20
+PRE(sys_setresgid)
+{
+ PRINT("sys_setresgid ( %d, %d, %d )", ARG1, ARG2, ARG3);
+ PRE_REG_READ3(long, "setresgid",
+ vki_gid_t, rgid, vki_gid_t, egid, vki_gid_t, sgid);
+}
+
+PRE(sys_getresgid16)
+{
+ PRINT("sys_getresgid16 ( %p, %p, %p )", ARG1,ARG2,ARG3);
+ PRE_REG_READ3(long, "getresgid16",
+ vki_old_gid_t *, rgid, vki_old_gid_t *, egid,
+ vki_old_gid_t *, sgid);
+ PRE_MEM_WRITE( "getresgid16(rgid)", ARG1, sizeof(vki_old_gid_t) );
+ PRE_MEM_WRITE( "getresgid16(egid)", ARG2, sizeof(vki_old_gid_t) );
+ PRE_MEM_WRITE( "getresgid16(sgid)", ARG3, sizeof(vki_old_gid_t) );
+}
+POST(sys_getresgid16)
+{
+ vg_assert(SUCCESS);
+ if (RES =3D=3D 0) {
+ POST_MEM_WRITE( ARG1, sizeof(vki_old_gid_t) );
+ POST_MEM_WRITE( ARG2, sizeof(vki_old_gid_t) );
+ POST_MEM_WRITE( ARG3, sizeof(vki_old_gid_t) );
+ }
+}
+
PRE(sys_getresgid)
{
PRINT("sys_getresgid ( %p, %p, %p )", ARG1,ARG2,ARG3);
@@ -355,79 +355,82 @@
=20
PRE(sys_sysctl)
{
- struct __vki_sysctl_args *argz;
+ struct __vki_sysctl_args *args;
PRINT("sys_sysctl ( %p )", ARG1 );
- argz =3D (struct __vki_sysctl_args *)ARG1;
- PRE_REG_READ1(long, "sysctl", struct __sysctl_args *, argz);
+ args =3D (struct __vki_sysctl_args *)ARG1;
+ PRE_REG_READ1(long, "sysctl", struct __sysctl_args *, args);
PRE_MEM_WRITE( "sysctl(args)", ARG1, sizeof(struct __vki_sysctl_args)=
);
if (!VG_(is_addressable)(ARG1, sizeof(struct __vki_sysctl_args), VKI_=
PROT_READ)) {
SET_STATUS_Failure( VKI_EFAULT );
return;
}
=20
- PRE_MEM_READ("sysctl(name)", (Addr)argz->name, argz->nlen * sizeof(*a=
rgz->name));
- if (argz->newval !=3D NULL)
- PRE_MEM_READ("sysctl(newval)", (Addr)argz->newval, argz->newlen);
- if (argz->oldlenp !=3D NULL) {
- PRE_MEM_READ("sysctl(oldlenp)", (Addr)argz->oldlenp, sizeof(*argz-=
>oldlenp));
- PRE_MEM_WRITE("sysctl(oldval)", (Addr)argz->oldval, *argz->oldlenp=
);
+ PRE_MEM_READ("sysctl(name)", (Addr)args->name, args->nlen * sizeof(*a=
rgs->name));
+ if (args->newval !=3D NULL)
+ PRE_MEM_READ("sysctl(newval)", (Addr)args->newval, args->newlen);
+ if (args->oldlenp !=3D NULL) {
+ PRE_MEM_READ("sysctl(oldlenp)", (Addr)args->oldlenp, sizeof(*args-=
>oldlenp));
+ PRE_MEM_WRITE("sysctl(oldval)", (Addr)args->oldval, *args->oldlenp=
);
}
}
=20
POST(sys_sysctl)
{
- struct __vki_sysctl_args *argz;
- argz =3D (struct __vki_sysctl_args *)ARG1;
- if (argz->oldlenp !=3D NULL) {
- POST_MEM_WRITE((Addr)argz->oldlenp, sizeof(*argz->oldlenp));
- POST_MEM_WRITE((Addr)argz->oldval, 1 + *argz->oldlenp);
+ struct __vki_sysctl_args *args;
+ args =3D (struct __vki_sysctl_args *)ARG1;
+ if (args->oldlenp !=3D NULL) {
+ POST_MEM_WRITE((Addr)args->oldlenp, sizeof(*args->oldlenp));
+ POST_MEM_WRITE((Addr)args->oldval, 1 + *args->oldlenp);
}
}
=20
-//zz PRE(sys_prctl, MayBlock)
-//zz {
-//zz PRINT( "prctl ( %d, %d, %d, %d, %d )", ARG1, ARG2, ARG3, ARG4, A=
RG5 );
-//zz // XXX: too simplistic, often not all args are used
-//zz // Nb: can't use "ARG2".."ARG5" here because that's our own macr=
o...
-//zz PRE_REG_READ5(long, "prctl",
-//zz int, option, unsigned long, arg2, unsigned long, a=
rg3,
-//zz unsigned long, arg4, unsigned long, arg5);
-//zz // XXX: totally wrong... we need to look at the 'option' arg, an=
d do
-//zz // PRE_MEM_READs/PRE_MEM_WRITEs as necessary...
-//zz }
-//zz=20
-//zz PRE(sys_sendfile, MayBlock)
-//zz {
-//zz PRINT("sys_sendfile ( %d, %d, %p, %llu )", ARG1,ARG2,ARG3,(ULong=
)ARG4);
-//zz PRE_REG_READ4(ssize_t, "sendfile",
-//zz int, out_fd, int, in_fd, vki_off_t *, offset,
-//zz vki_size_t, count);
-//zz if (ARG3 !=3D 0)
-//zz PRE_MEM_WRITE( "sendfile(offset)", ARG3, sizeof(vki_off_t) );
-//zz }
-//zz=20
-//zz POST(sys_sendfile)
-//zz {
-//zz POST_MEM_WRITE( ARG3, sizeof( vki_off_t ) );
-//zz }
-//zz=20
-//zz PRE(sys_sendfile64, MayBlock)
-//zz {
-//zz PRINT("sendfile64 ( %d, %d, %p, %llu )",ARG1,ARG2,ARG3,(ULong)AR=
G4);
-//zz PRE_REG_READ4(ssize_t, "sendfile64",
-//zz int, out_fd, int, in_fd, vki_loff_t *, offset,
-//zz vki_size_t, count);
-//zz if (ARG3 !=3D 0)
-//zz PRE_MEM_WRITE( "sendfile64(offset)", ARG3, sizeof(vki_loff_t)=
);
-//zz }
-//zz=20
-//zz POST(sys_sendfile64)
-//zz {
-//zz if (ARG3 !=3D 0 ) {
-//zz POST_MEM_WRITE( ARG3, sizeof(vki_loff_t) );
-//zz }
-//zz }
+PRE(sys_prctl)
+{
+ *flags |=3D SfMayBlock;
+ PRINT( "prctl ( %d, %d, %d, %d, %d )", ARG1, ARG2, ARG3, ARG4, ARG5 )=
;
+ // XXX: too simplistic, often not all args are used
+ // Nb: can't use "ARG2".."ARG5" here because that's our own macro...
+ PRE_REG_READ5(long, "prctl",
+ int, option, unsigned long, arg2, unsigned long, arg3,
+ unsigned long, arg4, unsigned long, arg5);
+ // XXX: totally wrong... we need to look at the 'option' arg, and do
+ // PRE_MEM_READs/PRE_MEM_WRITEs as necessary...
+}
=20
+PRE(sys_sendfile)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_sendfile ( %d, %d, %p, %llu )", ARG1,ARG2,ARG3,(ULong)ARG4=
);
+ PRE_REG_READ4(ssize_t, "sendfile",
+ int, out_fd, int, in_fd, vki_off_t *, offset,
+ vki_size_t, count);
+ if (ARG3 !=3D 0)
+ PRE_MEM_WRITE( "sendfile(offset)", ARG3, sizeof(vki_off_t) );
+}
+POST(sys_sendfile)
+{
+ if (ARG3 !=3D 0 ) {
+ POST_MEM_WRITE( ARG3, sizeof( vki_off_t ) );
+ }
+}
+
+PRE(sys_sendfile64)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sendfile64 ( %d, %d, %p, %llu )",ARG1,ARG2,ARG3,(ULong)ARG4);
+ PRE_REG_READ4(ssize_t, "sendfile64",
+ int, out_fd, int, in_fd, vki_loff_t *, offset,
+ vki_size_t, count);
+ if (ARG3 !=3D 0)
+ PRE_MEM_WRITE( "sendfile64(offset)", ARG3, sizeof(vki_loff_t) );
+}
+POST(sys_sendfile64)
+{
+ if (ARG3 !=3D 0 ) {
+ POST_MEM_WRITE( ARG3, sizeof(vki_loff_t) );
+ }
+}
+
PRE(sys_futex)
{
/*=20
@@ -486,52 +489,53 @@
}
}
=20
-//zz PRE(sys_epoll_create, 0)
-//zz {
-//zz PRINT("sys_epoll_create ( %d )", ARG1);
-//zz PRE_REG_READ1(long, "epoll_create", int, size);
-//zz }
-//zz=20
-//zz POST(sys_epoll_create)
-//zz {
-//zz if (!VG_(fd_allowed)(RES, "epoll_create", tid, True)) {
-//zz VG_(close)(RES);
-//zz SET_STATUS_( -VKI_EMFILE );
-//zz } else {
-//zz if (VG_(clo_track_fds))
-//zz VG_(record_fd_open) (tid, RES, NULL);
-//zz }
-//zz }
-//zz=20
-//zz PRE(sys_epoll_ctl, 0)
-//zz {
-//zz static const char* epoll_ctl_s[3] =3D {
-//zz "EPOLL_CTL_ADD",
-//zz "EPOLL_CTL_DEL",
-//zz "EPOLL_CTL_MOD"
-//zz };
-//zz PRINT("sys_epoll_ctl ( %d, %s, %d, %p )",=20
-//zz ARG1, ( ARG2<3 ? epoll_ctl_s[ARG2] : "?" ), ARG3, ARG4);
-//zz PRE_REG_READ4(long, "epoll_ctl",
-//zz int, epfd, int, op, int, fd, struct epoll_event *,=
event);
-//zz PRE_MEM_READ( "epoll_ctl(event)", ARG4, sizeof(struct epoll_even=
t) );
-//zz }
-//zz=20
-//zz PRE(sys_epoll_wait, MayBlock)
-//zz {
-//zz PRINT("sys_epoll_wait ( %d, %p, %d, %d )", ARG1, ARG2, ARG3, ARG=
4);
-//zz PRE_REG_READ4(long, "epoll_wait",
-//zz int, epfd, struct epoll_event *, events,
-//zz int, maxevents, int, timeout);
-//zz PRE_MEM_WRITE( "epoll_wait(events)", ARG2, sizeof(struct epoll_e=
vent)*ARG3);
-//zz }
-//zz=20
-//zz POST(sys_epoll_wait)
-//zz {
-//zz if (RES > 0)
-//zz POST_MEM_WRITE( ARG2, sizeof(struct epoll_event)*RES ) ;
-//zz }
+PRE(sys_epoll_create)
+{
+ PRINT("sys_epoll_create ( %d )", ARG1);
+ PRE_REG_READ1(long, "epoll_create", int, size);
+}
+POST(sys_epoll_create)
+{
+ vg_assert(SUCCESS);
+ if (!VG_(fd_allowed)(RES, "epoll_create", tid, True)) {
+ VG_(close)(RES);
+ SET_STATUS_Failure( VKI_EMFILE );
+ } else {
+ if (VG_(clo_track_fds))
+ VG_(record_fd_open) (tid, RES, NULL);
+ }
+}
=20
+PRE(sys_epoll_ctl)
+{
+ static const HChar* epoll_ctl_s[3] =3D {
+ "EPOLL_CTL_ADD",
+ "EPOLL_CTL_DEL",
+ "EPOLL_CTL_MOD"
+ };
+ PRINT("sys_epoll_ctl ( %d, %s, %d, %p )",=20
+ ARG1, ( ARG2<3 ? epoll_ctl_s[ARG2] : "?" ), ARG3, ARG4);
+ PRE_REG_READ4(long, "epoll_ctl",
+ int, epfd, int, op, int, fd, struct epoll_event *, even=
t);
+ PRE_MEM_READ( "epoll_ctl(event)", ARG4, sizeof(struct epoll_event) );
+}
+
+PRE(sys_epoll_wait)
+{
+ *flags |=3D SfMayBlock;
+ PRINT("sys_epoll_wait ( %d, %p, %d, %d )", ARG1, ARG2, ARG3, ARG4);
+ PRE_REG_READ4(long, "epoll_wait",
+ int, epfd, struct epoll_event *, events,
+ int, maxevents, int, timeout);
+ PRE_MEM_WRITE( "epoll_wait(events)", ARG2, sizeof(struct epoll_event)=
*ARG3);
+}
+POST(sys_epoll_wait)
+{
+ vg_assert(SUCCESS);
+ if (RES > 0)
+ POST_MEM_WRITE( ARG2, sizeof(struct epoll_event)*RES ) ;
+}
+
PRE(sys_gettid)
{
PRINT("sys_gettid ()");
@@ -606,172 +610,174 @@
//zz PRE_REG_READ4(long, "fadvise64_64",
//zz int, fd, vki_loff_t, offset, vki_loff_t, len, int,=
advice)
//zz }
-//zz=20
-//zz // Nb: this wrapper is "Special" because we have to pad/unpad memor=
y around
-//zz // the syscall itself, and this allows us to control exactly the co=
de that
-//zz // gets run while the padding is in place.
-//zz PRE(sys_io_setup, Special)
-//zz {
-//zz SizeT size;
-//zz Addr addr;
-//zz=20
-//zz PRINT("sys_io_setup ( %u, %p )", ARG1,ARG2);
-//zz PRE_REG_READ2(long, "io_setup",
-//zz unsigned, nr_events, vki_aio_context_t *, ctxp);
-//zz PRE_MEM_WRITE( "io_setup(ctxp)", ARG2, sizeof(vki_aio_context_t)=
);
-//zz =20
-//zz size =3D VG_PGROUNDUP(sizeof(struct vki_aio_ring) +
-//z...
[truncated message content] |
|
From: <sv...@va...> - 2005-06-10 10:25:39
|
Author: sewardj Date: 2005-06-10 11:25:02 +0100 (Fri, 10 Jun 2005) New Revision: 3866 Log: Update expected outputs. Modified: trunk/memcheck/tests/x86/scalar.stderr.exp trunk/memcheck/tests/x86/scalar.stderr.exp2 Modified: trunk/memcheck/tests/x86/scalar.stderr.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/x86/scalar.stderr.exp 2005-06-10 04:46:19 UTC (r= ev 3865) +++ trunk/memcheck/tests/x86/scalar.stderr.exp 2005-06-10 10:25:02 UTC (r= ev 3866) @@ -4598,7 +4598,7 @@ 9999: 9999 1e ----------------------------------------------------- WARNING: unhandled syscall: 9999 -Do not panic. You may be able to fix this easily. +You may be able to write your own handler. Read the file README_MISSING_SYSCALL_OR_IOCTL. ----------------------------------------------------- 1: __NR_exit 1s 0m Modified: trunk/memcheck/tests/x86/scalar.stderr.exp2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/x86/scalar.stderr.exp2 2005-06-10 04:46:19 UTC (= rev 3865) +++ trunk/memcheck/tests/x86/scalar.stderr.exp2 2005-06-10 10:25:02 UTC (= rev 3866) @@ -3952,7 +3952,7 @@ 9999: 9999 1e ----------------------------------------------------- WARNING: unhandled syscall: 9999 -Do not panic. You may be able to fix this easily. +You may be able to write your own handler. Read the file README_MISSING_SYSCALL_OR_IOCTL. ----------------------------------------------------- 1: __NR_exit 1s 0m |
|
From: Robert W. <rj...@du...> - 2005-06-10 06:19:03
|
Hi all, I've ported my watchpoints patch to the 3.0 tree. You can find the patch in the usual place: http://www.durables.org/~rjwalsh/software/valgrind/ Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: <sv...@va...> - 2005-06-10 04:46:35
|
Author: njn
Date: 2005-06-10 05:46:19 +0100 (Fri, 10 Jun 2005)
New Revision: 3865
Log:
Put arch-specific Cachegrind code in files in the main cachegrind/
directory, instead of subdirectories. This is simpler and consistent
with how the rest of system is now structured.
Added:
trunk/cachegrind/cg-amd64.c
trunk/cachegrind/cg-arm.c
trunk/cachegrind/cg-x86.c
Removed:
trunk/cachegrind/amd64/
trunk/cachegrind/arm/
trunk/cachegrind/x86/
Modified:
trunk/cachegrind/Makefile.am
trunk/configure.in
Modified: trunk/cachegrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/Makefile.am 2005-06-09 23:58:36 UTC (rev 3864)
+++ trunk/cachegrind/Makefile.am 2005-06-10 04:46:19 UTC (rev 3865)
@@ -1,13 +1,5 @@
-##include $(top_srcdir)/Makefile.tool.am
-include $(top_srcdir)/Makefile.all.am
-include $(top_srcdir)/Makefile.tool-flags.am
-include $(top_srcdir)/Makefile.tool-inplace.am
+include $(top_srcdir)/Makefile.tool.am
=20
-SUBDIRS =3D $(VG_ARCH) . tests docs
-DIST_SUBDIRS =3D $(VG_ARCH_ALL) . tests docs
-
-AM_CPPFLAGS +=3D -I$(top_srcdir)/cachegrind/$(VG_ARCH)
-
bin_SCRIPTS =3D cg_annotate
=20
EXTRA_DIST =3D cg_sim.c=20
@@ -16,7 +8,8 @@
=20
val_PROGRAMS =3D vgtool_cachegrind.so
=20
-vgtool_cachegrind_so_SOURCES =3D cg_main.c
+vgtool_cachegrind_so_SOURCES =3D \
+ cg_main.c \
+ cg-@VG_ARCH@.c
vgtool_cachegrind_so_LDFLAGS =3D -shared
-vgtool_cachegrind_so_LDADD =3D ${VG_ARCH}/libcgarch.a
=20
Copied: trunk/cachegrind/cg-amd64.c (from rev 3844, trunk/cachegrind/amd6=
4/cg_arch.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/amd64/cg_arch.c 2005-06-04 20:03:55 UTC (rev 3844)
+++ trunk/cachegrind/cg-amd64.c 2005-06-10 04:46:19 UTC (rev 3865)
@@ -0,0 +1,315 @@
+
+/*--------------------------------------------------------------------*/
+/*--- AMD64-specific definitions. cg-amd64.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Cachegrind, a Valgrind tool for cache
+ profiling programs.
+
+ Copyright (C) 2002-2005 Nicholas Nethercote
+ nj...@va...
+
+ 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 "tool.h"
+#include "cg_arch.h"
+#include "pub_tool_libcbase.h"
+#include "pub_tool_libcprint.h"
+
+// All CPUID info taken from sandpile.org/a32/cpuid.htm */
+// Probably only works for Intel and AMD chips, and probably only for so=
me of
+// them.=20
+
+static void micro_ops_warn(Int actual_size, Int used_size, Int line_size=
)
+{
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: Pentium with %d K micro-op instruction trace cache",=20
+ actual_size);
+ VG_(message)(Vg_DebugMsg,=20
+ " Simulating a %d KB cache with %d B lines",=20
+ used_size, line_size);
+}
+
+/* Intel method is truly wretched. We have to do an insane indexing int=
o an
+ * array of pre-defined configurations for various parts of the memory
+ * hierarchy.=20
+ */
+static
+Int Intel_cache_info(Int level, cache_t* I1c, cache_t* D1c, cache_t* L2c=
)
+{
+ UChar info[16];
+ Int i, trials;
+ Bool L2_found =3D False;
+
+ if (level < 2) {
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: CPUID level < 2 for Intel processor (%d)",=20
+ level);
+ return -1;
+ }
+
+ VG_(cpuid)(2, (Int*)&info[0], (Int*)&info[4],=20
+ (Int*)&info[8], (Int*)&info[12]);
+ trials =3D info[0] - 1; /* AL register - bits 0..7 of %eax */
+ info[0] =3D 0x0; /* reset AL */
+
+ if (0 !=3D trials) {
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: non-zero CPUID trials for Intel processor (%d)",
+ trials);
+ return -1;
+ }
+
+ for (i =3D 0; i < 16; i++) {
+
+ switch (info[i]) {
+
+ case 0x0: /* ignore zeros */
+ break;
+ =20
+ /* TLB info, ignore */
+ case 0x01: case 0x02: case 0x03: case 0x04:
+ case 0x50: case 0x51: case 0x52: case 0x5b: case 0x5c: case 0x5d:
+ case 0xb0: case 0xb3:
+ break; =20
+
+ case 0x06: *I1c =3D (cache_t) { 8, 4, 32 }; break;
+ case 0x08: *I1c =3D (cache_t) { 16, 4, 32 }; break;
+ case 0x30: *I1c =3D (cache_t) { 32, 8, 64 }; break;
+
+ case 0x0a: *D1c =3D (cache_t) { 8, 2, 32 }; break;
+ case 0x0c: *D1c =3D (cache_t) { 16, 4, 32 }; break;
+ case 0x2c: *D1c =3D (cache_t) { 32, 8, 64 }; break;
+
+ /* IA-64 info -- panic! */
+ case 0x10: case 0x15: case 0x1a:=20
+ case 0x88: case 0x89: case 0x8a: case 0x8d:
+ case 0x90: case 0x96: case 0x9b:
+ VG_(tool_panic)("IA-64 cache detected?!");
+
+ case 0x22: case 0x23: case 0x25: case 0x29:=20
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: L3 cache detected but ignored\n");
+ break;
+
+ /* These are sectored, whatever that means */
+ case 0x39: *L2c =3D (cache_t) { 128, 4, 64 }; L2_found =3D True; =
break;
+ case 0x3c: *L2c =3D (cache_t) { 256, 4, 64 }; L2_found =3D True; =
break;
+
+ /* If a P6 core, this means "no L2 cache". =20
+ If a P4 core, this means "no L3 cache".
+ We don't know what core it is, so don't issue a warning. To de=
tect
+ a missing L2 cache, we use 'L2_found'. */
+ case 0x40:
+ break;
+
+ case 0x41: *L2c =3D (cache_t) { 128, 4, 32 }; L2_found =3D True; =
break;
+ case 0x42: *L2c =3D (cache_t) { 256, 4, 32 }; L2_found =3D True; =
break;
+ case 0x43: *L2c =3D (cache_t) { 512, 4, 32 }; L2_found =3D True; =
break;
+ case 0x44: *L2c =3D (cache_t) { 1024, 4, 32 }; L2_found =3D True; =
break;
+ case 0x45: *L2c =3D (cache_t) { 2048, 4, 32 }; L2_found =3D True; =
break;
+
+ /* These are sectored, whatever that means */
+ case 0x60: *D1c =3D (cache_t) { 16, 8, 64 }; break; /* secto=
red */
+ case 0x66: *D1c =3D (cache_t) { 8, 4, 64 }; break; /* secto=
red */
+ case 0x67: *D1c =3D (cache_t) { 16, 4, 64 }; break; /* secto=
red */
+ case 0x68: *D1c =3D (cache_t) { 32, 4, 64 }; break; /* secto=
red */
+
+ /* HACK ALERT: Instruction trace cache -- capacity is micro-ops ba=
sed.
+ * conversion to byte size is a total guess; treat the 12K and 16=
K
+ * cases the same since the cache byte size must be a power of two=
for
+ * everything to work!. Also guessing 32 bytes for the line size.=
..=20
+ */
+ case 0x70: /* 12K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 16, 8, 32 }; =20
+ micro_ops_warn(12, 16, 32);
+ break; =20
+ case 0x71: /* 16K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 16, 8, 32 }; =20
+ micro_ops_warn(16, 16, 32);=20
+ break; =20
+ case 0x72: /* 32K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 32, 8, 32 }; =20
+ micro_ops_warn(32, 32, 32);=20
+ break; =20
+
+ /* These are sectored, whatever that means */
+ case 0x79: *L2c =3D (cache_t) { 128, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7a: *L2c =3D (cache_t) { 256, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7b: *L2c =3D (cache_t) { 512, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7c: *L2c =3D (cache_t) { 1024, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7e: *L2c =3D (cache_t) { 256, 8, 128 }; L2_found =3D True;=
break;
+
+ case 0x81: *L2c =3D (cache_t) { 128, 8, 32 }; L2_found =3D True;=
break;
+ case 0x82: *L2c =3D (cache_t) { 256, 8, 32 }; L2_found =3D True;=
break;
+ case 0x83: *L2c =3D (cache_t) { 512, 8, 32 }; L2_found =3D True;=
break;
+ case 0x84: *L2c =3D (cache_t) { 1024, 8, 32 }; L2_found =3D True;=
break;
+ case 0x85: *L2c =3D (cache_t) { 2048, 8, 32 }; L2_found =3D True;=
break;
+ case 0x86: *L2c =3D (cache_t) { 512, 4, 64 }; L2_found =3D True;=
break;
+ case 0x87: *L2c =3D (cache_t) { 1024, 8, 64 }; L2_found =3D True;=
break;
+
+ default:
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: Unknown Intel cache config value "
+ "(0x%x), ignoring", info[i]);
+ break;
+ }
+ }
+
+ if (!L2_found)
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: L2 cache not installed, ignore L2 results.");
+
+ return 0;
+}
+
+/* AMD method is straightforward, just extract appropriate bits from the
+ * result registers.
+ *
+ * Bits, for D1 and I1:
+ * 31..24 data L1 cache size in KBs =20
+ * 23..16 data L1 cache associativity (FFh=3Dfull) =20
+ * 15.. 8 data L1 cache lines per tag =20
+ * 7.. 0 data L1 cache line size in bytes
+ *
+ * Bits, for L2:
+ * 31..16 unified L2 cache size in KBs
+ * 15..12 unified L2 cache associativity (0=3Doff, FFh=3Dfull)
+ * 11.. 8 unified L2 cache lines per tag =20
+ * 7.. 0 unified L2 cache line size in bytes
+ *
+ * #3 The AMD K7 processor's L2 cache must be configured prior to relyi=
ng=20
+ * upon this information. (Whatever that means -- njn)
+ *
+ * Also, according to Cyrille Chepelov, Duron stepping A0 processors (mo=
del
+ * 0x630) have a bug and misreport their L2 size as 1KB (it's really 64K=
B),
+ * so we detect that.
+ *=20
+ * Returns 0 on success, non-zero on failure.
+ */
+static
+Int AMD_cache_info(cache_t* I1c, cache_t* D1c, cache_t* L2c)
+{
+ UInt ext_level;
+ UInt dummy, model;
+ UInt I1i, D1i, L2i;
+ =20
+ VG_(cpuid)(0x80000000, &ext_level, &dummy, &dummy, &dummy);
+
+ if (0 =3D=3D (ext_level & 0x80000000) || ext_level < 0x80000006) {
+ VG_(message)(Vg_UserMsg,=20
+ "warning: ext_level < 0x80000006 for AMD processor (0x%x)",=20
+ ext_level);
+ return -1;
+ }
+
+ VG_(cpuid)(0x80000005, &dummy, &dummy, &D1i, &I1i);
+ VG_(cpuid)(0x80000006, &dummy, &dummy, &L2i, &dummy);
+
+ VG_(cpuid)(0x1, &model, &dummy, &dummy, &dummy);
+
+ /* Check for Duron bug */
+ if (model =3D=3D 0x630) {
+ VG_(message)(Vg_UserMsg,
+ "Buggy Duron stepping A0. Assuming L2 size=3D65536 bytes");
+ L2i =3D (64 << 16) | (L2i & 0xffff);
+ }
+
+ D1c->size =3D (D1i >> 24) & 0xff;
+ D1c->assoc =3D (D1i >> 16) & 0xff;
+ D1c->line_size =3D (D1i >> 0) & 0xff;
+
+ I1c->size =3D (I1i >> 24) & 0xff;
+ I1c->assoc =3D (I1i >> 16) & 0xff;
+ I1c->line_size =3D (I1i >> 0) & 0xff;
+
+ L2c->size =3D (L2i >> 16) & 0xffff; /* Nb: different bits used f=
or L2 */
+ L2c->assoc =3D (L2i >> 12) & 0xf;
+ L2c->line_size =3D (L2i >> 0) & 0xff;
+
+ return 0;
+}
+
+static=20
+Int get_caches_from_CPUID(cache_t* I1c, cache_t* D1c, cache_t* L2c)
+{
+ Int level, ret;
+ Char vendor_id[13];
+
+ if (!VG_(has_cpuid)()) {
+ VG_(message)(Vg_DebugMsg, "CPUID instruction not supported");
+ return -1;
+ }
+
+ VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
+ (int*)&vendor_id[8], (int*)&vendor_id[4]); =20
+ vendor_id[12] =3D '\0';
+
+ if (0 =3D=3D level) {
+ VG_(message)(Vg_DebugMsg, "CPUID level is 0, early Pentium?\n");
+ return -1;
+ }
+
+ /* Only handling Intel and AMD chips... no Cyrix, Transmeta, etc */
+ if (0 =3D=3D VG_(strcmp)(vendor_id, "GenuineIntel")) {
+ ret =3D Intel_cache_info(level, I1c, D1c, L2c);
+
+ } else if (0 =3D=3D VG_(strcmp)(vendor_id, "AuthenticAMD")) {
+ ret =3D AMD_cache_info(I1c, D1c, L2c);
+
+ } else {
+ VG_(message)(Vg_DebugMsg, "CPU vendor ID not recognised (%s)",
+ vendor_id);
+ return -1;
+ }
+
+ /* Successful! Convert sizes from KB to bytes */
+ I1c->size *=3D 1024;
+ D1c->size *=3D 1024;
+ L2c->size *=3D 1024;
+ =20
+ return ret;
+}
+
+
+void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
+ Bool all_caches_clo_defined)
+{
+ Int res;
+ =20
+ // Set caches to default.
+ *I1c =3D (cache_t) { 65536, 2, 64 };
+ *D1c =3D (cache_t) { 65536, 2, 64 };
+ *L2c =3D (cache_t) { 262144, 8, 64 };
+
+ // Then replace with any info we can get from CPUID.
+ res =3D get_caches_from_CPUID(I1c, D1c, L2c);
+
+ // Warn if CPUID failed and config not completely specified from cmd =
line.
+ if (res !=3D 0 && !all_caches_clo_defined) {
+ VG_(message)(Vg_DebugMsg,=20
+ "Warning: Couldn't auto-detect cache config, using on=
e "
+ "or more defaults ");
+ }
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Copied: trunk/cachegrind/cg-arm.c (from rev 3844, trunk/cachegrind/arm/cg=
_arch.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/arm/cg_arch.c 2005-06-04 20:03:55 UTC (rev 3844)
+++ trunk/cachegrind/cg-arm.c 2005-06-10 04:46:19 UTC (rev 3865)
@@ -0,0 +1,49 @@
+
+/*--------------------------------------------------------------------*/
+/*--- ARM-specific definitions. cg-arm.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Cachegrind, a Valgrind tool for cache
+ profiling programs.
+
+ Copyright (C) 2002-2005 Nicholas Nethercote
+ nj...@va...
+
+ 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 "tool.h"
+#include "cg_arch.h"
+
+void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
+ Bool all_caches_clo_defined)
+{
+ // XXX: I1 and D1 are vaguely plausible, although they could really b=
e
+ // anything. However, most (all?) ARMs don't have an L2 cache. But
+ // Cachegrind assumes the presence of an L2 cache... so we just copy =
the
+ // x86 defaults. Urk.
+ *I1c =3D (cache_t) { 4096, 2, 32 };
+ *D1c =3D (cache_t) { 4096, 2, 32 };
+ *L2c =3D (cache_t) { 262144, 8, 64 };
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
Copied: trunk/cachegrind/cg-x86.c (from rev 3844, trunk/cachegrind/x86/cg=
_arch.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/x86/cg_arch.c 2005-06-04 20:03:55 UTC (rev 3844)
+++ trunk/cachegrind/cg-x86.c 2005-06-10 04:46:19 UTC (rev 3865)
@@ -0,0 +1,328 @@
+
+/*--------------------------------------------------------------------*/
+/*--- x86-specific definitions. cg-x86.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Cachegrind, a Valgrind tool for cache
+ profiling programs.
+
+ Copyright (C) 2002-2005 Nicholas Nethercote
+ nj...@va...
+
+ 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 "tool.h"
+#include "pub_tool_libcbase.h"
+#include "pub_tool_libcprint.h"
+#include "cg_arch.h"
+
+// All CPUID info taken from sandpile.org/a32/cpuid.htm */
+// Probably only works for Intel and AMD chips, and probably only for so=
me of
+// them.=20
+
+static void micro_ops_warn(Int actual_size, Int used_size, Int line_size=
)
+{
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: Pentium with %d K micro-op instruction trace cache",=20
+ actual_size);
+ VG_(message)(Vg_DebugMsg,=20
+ " Simulating a %d KB cache with %d B lines",=20
+ used_size, line_size);
+}
+
+/* Intel method is truly wretched. We have to do an insane indexing int=
o an
+ * array of pre-defined configurations for various parts of the memory
+ * hierarchy.=20
+ */
+static
+Int Intel_cache_info(Int level, cache_t* I1c, cache_t* D1c, cache_t* L2c=
)
+{
+ UChar info[16];
+ Int i, trials;
+ Bool L2_found =3D False;
+
+ if (level < 2) {
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: CPUID level < 2 for Intel processor (%d)",=20
+ level);
+ return -1;
+ }
+
+ VG_(cpuid)(2, (Int*)&info[0], (Int*)&info[4],=20
+ (Int*)&info[8], (Int*)&info[12]);
+ trials =3D info[0] - 1; /* AL register - bits 0..7 of %eax */
+ info[0] =3D 0x0; /* reset AL */
+
+ if (0 !=3D trials) {
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: non-zero CPUID trials for Intel processor (%d)",
+ trials);
+ return -1;
+ }
+
+ for (i =3D 0; i < 16; i++) {
+
+ switch (info[i]) {
+
+ case 0x0: /* ignore zeros */
+ break;
+ =20
+ /* TLB info, ignore */
+ case 0x01: case 0x02: case 0x03: case 0x04:
+ case 0x50: case 0x51: case 0x52: case 0x5b: case 0x5c: case 0x5d:
+ case 0xb0: case 0xb3:
+ break; =20
+
+ case 0x06: *I1c =3D (cache_t) { 8, 4, 32 }; break;
+ case 0x08: *I1c =3D (cache_t) { 16, 4, 32 }; break;
+ case 0x30: *I1c =3D (cache_t) { 32, 8, 64 }; break;
+
+ case 0x0a: *D1c =3D (cache_t) { 8, 2, 32 }; break;
+ case 0x0c: *D1c =3D (cache_t) { 16, 4, 32 }; break;
+ case 0x2c: *D1c =3D (cache_t) { 32, 8, 64 }; break;
+
+ /* IA-64 info -- panic! */
+ case 0x10: case 0x15: case 0x1a:=20
+ case 0x88: case 0x89: case 0x8a: case 0x8d:
+ case 0x90: case 0x96: case 0x9b:
+ VG_(tool_panic)("IA-64 cache detected?!");
+
+ case 0x22: case 0x23: case 0x25: case 0x29:=20
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: L3 cache detected but ignored\n");
+ break;
+
+ /* These are sectored, whatever that means */
+ case 0x39: *L2c =3D (cache_t) { 128, 4, 64 }; L2_found =3D True; =
break;
+ case 0x3c: *L2c =3D (cache_t) { 256, 4, 64 }; L2_found =3D True; =
break;
+
+ /* If a P6 core, this means "no L2 cache". =20
+ If a P4 core, this means "no L3 cache".
+ We don't know what core it is, so don't issue a warning. To de=
tect
+ a missing L2 cache, we use 'L2_found'. */
+ case 0x40:
+ break;
+
+ case 0x41: *L2c =3D (cache_t) { 128, 4, 32 }; L2_found =3D True; =
break;
+ case 0x42: *L2c =3D (cache_t) { 256, 4, 32 }; L2_found =3D True; =
break;
+ case 0x43: *L2c =3D (cache_t) { 512, 4, 32 }; L2_found =3D True; =
break;
+ case 0x44: *L2c =3D (cache_t) { 1024, 4, 32 }; L2_found =3D True; =
break;
+ case 0x45: *L2c =3D (cache_t) { 2048, 4, 32 }; L2_found =3D True; =
break;
+
+ /* These are sectored, whatever that means */
+ case 0x60: *D1c =3D (cache_t) { 16, 8, 64 }; break; /* secto=
red */
+ case 0x66: *D1c =3D (cache_t) { 8, 4, 64 }; break; /* secto=
red */
+ case 0x67: *D1c =3D (cache_t) { 16, 4, 64 }; break; /* secto=
red */
+ case 0x68: *D1c =3D (cache_t) { 32, 4, 64 }; break; /* secto=
red */
+
+ /* HACK ALERT: Instruction trace cache -- capacity is micro-ops ba=
sed.
+ * conversion to byte size is a total guess; treat the 12K and 16=
K
+ * cases the same since the cache byte size must be a power of two=
for
+ * everything to work!. Also guessing 32 bytes for the line size.=
..=20
+ */
+ case 0x70: /* 12K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 16, 8, 32 }; =20
+ micro_ops_warn(12, 16, 32);
+ break; =20
+ case 0x71: /* 16K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 16, 8, 32 }; =20
+ micro_ops_warn(16, 16, 32);=20
+ break; =20
+ case 0x72: /* 32K micro-ops, 8-way */
+ *I1c =3D (cache_t) { 32, 8, 32 }; =20
+ micro_ops_warn(32, 32, 32);=20
+ break; =20
+
+ /* These are sectored, whatever that means */
+ case 0x79: *L2c =3D (cache_t) { 128, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7a: *L2c =3D (cache_t) { 256, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7b: *L2c =3D (cache_t) { 512, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7c: *L2c =3D (cache_t) { 1024, 8, 64 }; L2_found =3D True;=
break;
+ case 0x7e: *L2c =3D (cache_t) { 256, 8, 128 }; L2_found =3D True;=
break;
+
+ case 0x81: *L2c =3D (cache_t) { 128, 8, 32 }; L2_found =3D True;=
break;
+ case 0x82: *L2c =3D (cache_t) { 256, 8, 32 }; L2_found =3D True;=
break;
+ case 0x83: *L2c =3D (cache_t) { 512, 8, 32 }; L2_found =3D True;=
break;
+ case 0x84: *L2c =3D (cache_t) { 1024, 8, 32 }; L2_found =3D True;=
break;
+ case 0x85: *L2c =3D (cache_t) { 2048, 8, 32 }; L2_found =3D True;=
break;
+ case 0x86: *L2c =3D (cache_t) { 512, 4, 64 }; L2_found =3D True;=
break;
+ case 0x87: *L2c =3D (cache_t) { 1024, 8, 64 }; L2_found =3D True;=
break;
+
+ default:
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: Unknown Intel cache config value "
+ "(0x%x), ignoring", info[i]);
+ break;
+ }
+ }
+
+ if (!L2_found)
+ VG_(message)(Vg_DebugMsg,=20
+ "warning: L2 cache not installed, ignore L2 results.");
+
+ return 0;
+}
+
+/* AMD method is straightforward, just extract appropriate bits from the
+ * result registers.
+ *
+ * Bits, for D1 and I1:
+ * 31..24 data L1 cache size in KBs =20
+ * 23..16 data L1 cache associativity (FFh=3Dfull) =20
+ * 15.. 8 data L1 cache lines per tag =20
+ * 7.. 0 data L1 cache line size in bytes
+ *
+ * Bits, for L2:
+ * 31..16 unified L2 cache size in KBs
+ * 15..12 unified L2 cache associativity (0=3Doff, FFh=3Dfull)
+ * 11.. 8 unified L2 cache lines per tag =20
+ * 7.. 0 unified L2 cache line size in bytes
+ *
+ * #3 The AMD K7 processor's L2 cache must be configured prior to relyi=
ng=20
+ * upon this information. (Whatever that means -- njn)
+ *
+ * Also, according to Cyrille Chepelov, Duron stepping A0 processors (mo=
del
+ * 0x630) have a bug and misreport their L2 size as 1KB (it's really 64K=
B),
+ * so we detect that.
+ *=20
+ * Returns 0 on success, non-zero on failure.
+ */
+static
+Int AMD_cache_info(cache_t* I1c, cache_t* D1c, cache_t* L2c)
+{
+ UInt ext_level;
+ UInt dummy, model;
+ UInt I1i, D1i, L2i;
+ =20
+ VG_(cpuid)(0x80000000, &ext_level, &dummy, &dummy, &dummy);
+
+ if (0 =3D=3D (ext_level & 0x80000000) || ext_level < 0x80000006) {
+ VG_(message)(Vg_UserMsg,=20
+ "warning: ext_level < 0x80000006 for AMD processor (0x%x)",=20
+ ext_level);
+ return -1;
+ }
+
+ VG_(cpuid)(0x80000005, &dummy, &dummy, &D1i, &I1i);
+ VG_(cpuid)(0x80000006, &dummy, &dummy, &L2i, &dummy);
+
+ VG_(cpuid)(0x1, &model, &dummy, &dummy, &dummy);
+
+ /* Check for Duron bug */
+ if (model =3D=3D 0x630) {
+ VG_(message)(Vg_UserMsg,
+ "Buggy Duron stepping A0. Assuming L2 size=3D65536 bytes");
+ L2i =3D (64 << 16) | (L2i & 0xffff);
+ }
+
+ D1c->size =3D (D1i >> 24) & 0xff;
+ D1c->assoc =3D (D1i >> 16) & 0xff;
+ D1c->line_size =3D (D1i >> 0) & 0xff;
+
+ I1c->size =3D (I1i >> 24) & 0xff;
+ I1c->assoc =3D (I1i >> 16) & 0xff;
+ I1c->line_size =3D (I1i >> 0) & 0xff;
+
+ L2c->size =3D (L2i >> 16) & 0xffff; /* Nb: different bits used f=
or L2 */
+ L2c->assoc =3D (L2i >> 12) & 0xf;
+ L2c->line_size =3D (L2i >> 0) & 0xff;
+
+ return 0;
+}
+
+static=20
+Int get_caches_from_CPUID(cache_t* I1c, cache_t* D1c, cache_t* L2c)
+{
+ Int level, ret;
+ Char vendor_id[13];
+
+ if (!VG_(has_cpuid)()) {
+ VG_(message)(Vg_DebugMsg, "CPUID instruction not supported");
+ return -1;
+ }
+
+ VG_(cpuid)(0, &level, (int*)&vendor_id[0],=20
+ (int*)&vendor_id[8], (int*)&vendor_id[4]); =20
+ vendor_id[12] =3D '\0';
+
+ if (0 =3D=3D level) {
+ VG_(message)(Vg_DebugMsg, "CPUID level is 0, early Pentium?\n");
+ return -1;
+ }
+
+ /* Only handling Intel and AMD chips... no Cyrix, Transmeta, etc */
+ if (0 =3D=3D VG_(strcmp)(vendor_id, "GenuineIntel")) {
+ ret =3D Intel_cache_info(level, I1c, D1c, L2c);
+
+ } else if (0 =3D=3D VG_(strcmp)(vendor_id, "AuthenticAMD")) {
+ ret =3D AMD_cache_info(I1c, D1c, L2c);
+
+ } else if (0 =3D=3D VG_(strcmp)(vendor_id, "CentaurHauls")) {
+ /* Total kludge. Pretend to be a VIA Nehemiah. */
+ D1c->size =3D 64;
+ D1c->assoc =3D 16;
+ D1c->line_size =3D 16;
+ I1c->size =3D 64;
+ I1c->assoc =3D 4;
+ I1c->line_size =3D 16;
+ L2c->size =3D 64;
+ L2c->assoc =3D 16;
+ L2c->line_size =3D 16;
+ ret =3D 0;
+
+ } else {
+ VG_(message)(Vg_DebugMsg, "CPU vendor ID not recognised (%s)",
+ vendor_id);
+ return -1;
+ }
+
+ /* Successful! Convert sizes from KB to bytes */
+ I1c->size *=3D 1024;
+ D1c->size *=3D 1024;
+ L2c->size *=3D 1024;
+ =20
+ return ret;
+}
+
+
+void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
+ Bool all_caches_clo_defined)
+{
+ Int res;
+ =20
+ // Set caches to default.
+ *I1c =3D (cache_t) { 65536, 2, 64 };
+ *D1c =3D (cache_t) { 65536, 2, 64 };
+ *L2c =3D (cache_t) { 262144, 8, 64 };
+
+ // Then replace with any info we can get from CPUID.
+ res =3D get_caches_from_CPUID(I1c, D1c, L2c);
+
+ // Warn if CPUID failed and config not completely specified from cmd =
line.
+ if (res !=3D 0 && !all_caches_clo_defined) {
+ VG_(message)(Vg_DebugMsg,=20
+ "Warning: Couldn't auto-detect cache config, using on=
e "
+ "or more defaults ");
+ }
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/configure.in 2005-06-09 23:58:36 UTC (rev 3864)
+++ trunk/configure.in 2005-06-10 04:46:19 UTC (rev 3865)
@@ -444,9 +444,6 @@
memcheck/tests/x86/Makefile
memcheck/docs/Makefile
cachegrind/Makefile
- cachegrind/amd64/Makefile
- cachegrind/arm/Makefile
- cachegrind/x86/Makefile
cachegrind/tests/Makefile
cachegrind/tests/amd64/Makefile
cachegrind/tests/arm/Makefile
|
|
From: Tom H. <th...@cy...> - 2005-06-10 03:00:47
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-06-10 03:25:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 176 tests, 10 stderr failures, 2 stdout failures ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/pth_cancel1 (stdout) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: <js...@ac...> - 2005-06-10 02:50:03
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-06-10 03:50:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow Nightly build on phoenix ( SuSE 9.1 ) started at 2005-06-10 03:50:01 BST |
|
From: Tom H. <th...@cy...> - 2005-06-10 02:25:48
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-06-10 03:20:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/vgtest_ume (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-10 02:20:31
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-06-10 03:15:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 14 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-10 02:16:51
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-06-10 03:10:04 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 156 tests, 148 stderr failures, 57 stdout failures ================= memcheck/tests/addressable (stdout) memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stdout) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stdout) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stdout) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stdout) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stdout) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stdout) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stdout) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stdout) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stdout) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stdout) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stdout) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stdout) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/xml1 (stdout) memcheck/tests/xml1 (stderr) memcheck/tests/zeropage (stdout) memcheck/tests/zeropage (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/dlclose (stdout) cachegrind/tests/dlclose (stderr) corecheck/tests/as_mmap (stderr) corecheck/tests/as_shm (stdout) corecheck/tests/as_shm (stderr) corecheck/tests/erringfds (stdout) corecheck/tests/erringfds (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stdout) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) corecheck/tests/pth_atfork1 (stdout) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel1 (stdout) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stdout) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_empty (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/pth_exit2 (stderr) corecheck/tests/pth_mutexspeed (stdout) corecheck/tests/pth_mutexspeed (stderr) corecheck/tests/pth_once (stdout) corecheck/tests/pth_once (stderr) corecheck/tests/pth_rwlock (stderr) corecheck/tests/res_search (stdout) corecheck/tests/res_search (stderr) corecheck/tests/sigkill (stderr) corecheck/tests/stack_changes (stdout) corecheck/tests/stack_changes (stderr) corecheck/tests/threadederrno (stdout) corecheck/tests/threadederrno (stderr) corecheck/tests/vgprintf (stdout) corecheck/tests/vgprintf (stderr) massif/tests/toobig-allocs (stderr) massif/tests/true_html (stderr) massif/tests/true_text (stderr) lackey/tests/true (stderr) none/tests/amd64/insn_fpu (stdout) none/tests/amd64/insn_fpu (stderr) none/tests/amd64/insn_mmx (stdout) none/tests/amd64/insn_mmx (stderr) none/tests/amd64/insn_sse (stdout) none/tests/amd64/insn_sse (stderr) none/tests/amd64/insn_sse2 (stdout) none/tests/amd64/insn_sse2 (stderr) none/tests/args (stdout) none/tests/args (stderr) none/tests/async-sigs (stdout) none/tests/async-sigs (stderr) none/tests/bitfield1 (stderr) none/tests/blockfault (stderr) none/tests/closeall (stderr) none/tests/coolo_sigaction (stdout) none/tests/coolo_sigaction (stderr) none/tests/coolo_strlen (stderr) none/tests/discard (stdout) none/tests/discard (stderr) none/tests/exec-sigmask (stderr) none/tests/execve (stderr) none/tests/faultstatus (stderr) none/tests/fcntl_setown (stderr) none/tests/floored (stdout) none/tests/floored (stderr) none/tests/fork (stdout) none/tests/fork (stderr) none/tests/fucomip (stderr) none/tests/gxx304 (stderr) none/tests/manythreads (stdout) none/tests/manythreads (stderr) none/tests/map_unaligned (stderr) none/tests/map_unmap (stdout) none/tests/map_unmap (stderr) none/tests/mq (stderr) none/tests/mremap (stderr) none/tests/munmap_exe (stderr) none/tests/pending (stdout) none/tests/pending (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/pth_stackalign (stdout) none/tests/pth_stackalign (stderr) none/tests/rcrl (stdout) none/tests/rcrl (stderr) none/tests/readline1 (stdout) none/tests/readline1 (stderr) none/tests/resolv (stdout) none/tests/resolv (stderr) none/tests/rlimit_nofile (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/sem (stderr) none/tests/semlimit (stderr) none/tests/sha1_test (stderr) none/tests/shortpush (stderr) none/tests/shorts (stderr) none/tests/sigstackgrowth (stdout) none/tests/sigstackgrowth (stderr) none/tests/smc1 (stdout) none/tests/smc1 (stderr) none/tests/stackgrowth (stdout) none/tests/stackgrowth (stderr) none/tests/syscall-restart1 (stderr) none/tests/syscall-restart2 (stderr) none/tests/system (stderr) none/tests/thread-exits (stdout) none/tests/thread-exits (stderr) none/tests/threaded-fork (stdout) none/tests/threaded-fork (stderr) none/tests/tls (stdout) none/tests/tls (stderr) none/tests/yield (stdout) none/tests/yield (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-10 02:05:35
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-06-10 03:00:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 156 tests, 148 stderr failures, 57 stdout failures ================= memcheck/tests/addressable (stdout) memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stdout) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stdout) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stdout) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stdout) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stdout) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stdout) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stdout) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stdout) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stdout) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stdout) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stdout) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stdout) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/xml1 (stdout) memcheck/tests/xml1 (stderr) memcheck/tests/zeropage (stdout) memcheck/tests/zeropage (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/dlclose (stdout) cachegrind/tests/dlclose (stderr) corecheck/tests/as_mmap (stderr) corecheck/tests/as_shm (stdout) corecheck/tests/as_shm (stderr) corecheck/tests/erringfds (stdout) corecheck/tests/erringfds (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stdout) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) corecheck/tests/pth_atfork1 (stdout) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel1 (stdout) corecheck/tests/pth_cancel1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stdout) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_empty (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/pth_exit2 (stderr) corecheck/tests/pth_mutexspeed (stdout) corecheck/tests/pth_mutexspeed (stderr) corecheck/tests/pth_once (stdout) corecheck/tests/pth_once (stderr) corecheck/tests/pth_rwlock (stderr) corecheck/tests/res_search (stdout) corecheck/tests/res_search (stderr) corecheck/tests/sigkill (stderr) corecheck/tests/stack_changes (stdout) corecheck/tests/stack_changes (stderr) corecheck/tests/threadederrno (stdout) corecheck/tests/threadederrno (stderr) corecheck/tests/vgprintf (stdout) corecheck/tests/vgprintf (stderr) massif/tests/toobig-allocs (stderr) massif/tests/true_html (stderr) massif/tests/true_text (stderr) lackey/tests/true (stderr) none/tests/amd64/insn_fpu (stdout) none/tests/amd64/insn_fpu (stderr) none/tests/amd64/insn_mmx (stdout) none/tests/amd64/insn_mmx (stderr) none/tests/amd64/insn_sse (stdout) none/tests/amd64/insn_sse (stderr) none/tests/amd64/insn_sse2 (stdout) none/tests/amd64/insn_sse2 (stderr) none/tests/args (stdout) none/tests/args (stderr) none/tests/async-sigs (stdout) none/tests/async-sigs (stderr) none/tests/bitfield1 (stderr) none/tests/blockfault (stderr) none/tests/closeall (stderr) none/tests/coolo_sigaction (stdout) none/tests/coolo_sigaction (stderr) none/tests/coolo_strlen (stderr) none/tests/discard (stdout) none/tests/discard (stderr) none/tests/exec-sigmask (stderr) none/tests/execve (stderr) none/tests/faultstatus (stderr) none/tests/fcntl_setown (stderr) none/tests/floored (stdout) none/tests/floored (stderr) none/tests/fork (stdout) none/tests/fork (stderr) none/tests/fucomip (stderr) none/tests/gxx304 (stderr) none/tests/manythreads (stdout) none/tests/manythreads (stderr) none/tests/map_unaligned (stderr) none/tests/map_unmap (stdout) none/tests/map_unmap (stderr) none/tests/mq (stderr) none/tests/mremap (stderr) none/tests/munmap_exe (stderr) none/tests/pending (stdout) none/tests/pending (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/pth_stackalign (stdout) none/tests/pth_stackalign (stderr) none/tests/rcrl (stdout) none/tests/rcrl (stderr) none/tests/readline1 (stdout) none/tests/readline1 (stderr) none/tests/resolv (stdout) none/tests/resolv (stderr) none/tests/rlimit_nofile (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/sem (stderr) none/tests/semlimit (stderr) none/tests/sha1_test (stderr) none/tests/shortpush (stderr) none/tests/shorts (stderr) none/tests/sigstackgrowth (stdout) none/tests/sigstackgrowth (stderr) none/tests/smc1 (stdout) none/tests/smc1 (stderr) none/tests/stackgrowth (stdout) none/tests/stackgrowth (stderr) none/tests/syscall-restart1 (stderr) none/tests/syscall-restart2 (stderr) none/tests/system (stderr) none/tests/thread-exits (stdout) none/tests/thread-exits (stderr) none/tests/threaded-fork (stdout) none/tests/threaded-fork (stderr) none/tests/tls (stdout) none/tests/tls (stderr) none/tests/yield (stdout) none/tests/yield (stderr) |