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-17 22:27:23
|
Author: njn
Date: 2005-06-17 23:27:21 +0100 (Fri, 17 Jun 2005)
New Revision: 3924
Log:
Rename m_syscalls/ as m_syswrap/ to complete the module renaming.
Added:
trunk/coregrind/m_syswrap/
Removed:
trunk/coregrind/m_syscalls/
Modified:
trunk/configure.in
trunk/coregrind/Makefile.am
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-17 22:19:06 UTC (rev 3923)
+++ trunk/configure.in 2005-06-17 22:27:21 UTC (rev 3924)
@@ -429,7 +429,7 @@
coregrind/m_replacemalloc/Makefile=20
coregrind/m_scheduler/Makefile=20
coregrind/m_sigframe/Makefile=20
- coregrind/m_syscalls/Makefile=20
+ coregrind/m_syswrap/Makefile=20
coregrind/amd64/Makefile
coregrind/arm/Makefile
coregrind/x86/Makefile
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-17 22:19:06 UTC (rev 3923)
+++ trunk/coregrind/Makefile.am 2005-06-17 22:27:21 UTC (rev 3924)
@@ -9,7 +9,7 @@
m_replacemalloc \
m_scheduler \
m_sigframe \
- m_syscalls
+ m_syswrap
=20
## When building, we are only interested in the current arch/OS/platform=
.
## But when doing 'make dist', we are interested in every arch/OS/platfo=
rm.
@@ -130,7 +130,7 @@
m_dispatch/libdispatch.a \
m_aspacemgr/libaspacemgr.a \
m_sigframe/libsigframe.a \
- m_syscalls/libsyswrap.a \
+ m_syswrap/libsyswrap.a \
${VG_ARCH}/libarch.a \
@VEX_DIR@/libvex.a
=20
Copied: trunk/coregrind/m_syswrap (from rev 3923, trunk/coregrind/m_sysca=
lls)
|
|
From: <sv...@va...> - 2005-06-17 22:19:08
|
Author: njn Date: 2005-06-17 23:19:06 +0100 (Fri, 17 Jun 2005) New Revision: 3923 Log: Renamed the m_syscalls module m_syswrap, which better describes what it does and better distinguishes it from m_syscall. Did everything for this except renaming the m_syscalls/ directory -- I'll do that shortly, I don'= t think Subversion can handle renaming a directory and files within that directory at the same time. Added: trunk/coregrind/m_syscalls/README_SYSWRAP.txt trunk/coregrind/m_syscalls/priv_syswrap-generic.h trunk/coregrind/m_syscalls/priv_syswrap-linux.h trunk/coregrind/m_syscalls/priv_syswrap-main.h trunk/coregrind/m_syscalls/syswrap-amd64-linux.c trunk/coregrind/m_syscalls/syswrap-arm-linux.c trunk/coregrind/m_syscalls/syswrap-generic.c trunk/coregrind/m_syscalls/syswrap-linux.c trunk/coregrind/m_syscalls/syswrap-main.c trunk/coregrind/m_syscalls/syswrap-x86-linux.c trunk/coregrind/pub_core_syswrap.h Removed: trunk/coregrind/m_syscalls/README_SYSCALLS.txt trunk/coregrind/m_syscalls/priv_syscalls-generic.h trunk/coregrind/m_syscalls/priv_syscalls-linux.h trunk/coregrind/m_syscalls/priv_syscalls-main.h trunk/coregrind/m_syscalls/syscalls-amd64-linux.c trunk/coregrind/m_syscalls/syscalls-arm-linux.c trunk/coregrind/m_syscalls/syscalls-generic.c trunk/coregrind/m_syscalls/syscalls-linux.c trunk/coregrind/m_syscalls/syscalls-main.c trunk/coregrind/m_syscalls/syscalls-x86-linux.c trunk/coregrind/pub_core_syscalls.h Modified: trunk/coregrind/Makefile.am trunk/coregrind/m_aspacemgr/aspacemgr.c trunk/coregrind/m_main.c trunk/coregrind/m_scheduler/scheduler.c trunk/coregrind/m_signals.c trunk/coregrind/m_syscalls/Makefile.am trunk/coregrind/m_syscalls/priv_types_n_macros.h [... diff too large to include ...] |
|
From: <sv...@va...> - 2005-06-17 21:56:54
|
Author: njn
Date: 2005-06-17 22:31:45 +0100 (Fri, 17 Jun 2005)
New Revision: 3922
Log:
Moved the basic syscall stuff out of m_libcbase.c into a new module
m_syscall.c. Plus some associated cleanups.
Moved VG_(sigreturn) into m_signals.c and made it local.
Added:
trunk/coregrind/m_syscall.c
trunk/coregrind/pub_core_syscall.h
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/core.h
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_libcassert.c
trunk/coregrind/m_libcbase.c
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_libcmman.c
trunk/coregrind/m_libcproc.c
trunk/coregrind/m_libcsignal.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_syscalls/syscall-amd64-linux.S
trunk/coregrind/m_syscalls/syscall-arm-linux.S
trunk/coregrind/m_syscalls/syscall-x86-linux.S
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-generic.c
trunk/coregrind/m_syscalls/syscalls-linux.c
trunk/coregrind/m_syscalls/syscalls-main.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/pub_core_libcbase.h
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-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/Makefile.am 2005-06-17 21:31:45 UTC (rev 3922)
@@ -114,6 +114,7 @@
m_signals.c \
m_skiplist.c \
m_stacktrace.c \
+ m_syscall.c \
m_threadmodel.c \
m_tooliface.c \
m_translate.c \
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-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/core.h 2005-06-17 21:31:45 UTC (rev 3922)
@@ -64,12 +64,6 @@
#define VG_USERREQ__LIBC_FREERES_DONE 0x3029
=20
/* ---------------------------------------------------------------------
- Exports of vg_syscall.S
- ------------------------------------------------------------------ */
-
-extern void VG_(sigreturn)(void);
-
-/* ---------------------------------------------------------------------
Exports of vg_helpers.S
------------------------------------------------------------------ */
=20
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.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_aspacemgr/aspacemgr.c 2005-06-17 19:28:29 UTC (rev =
3921)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-06-17 21:31:45 UTC (rev =
3922)
@@ -40,6 +40,7 @@
#include "pub_core_libcproc.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
#include "pub_core_transtab.h"
Modified: trunk/coregrind/m_libcassert.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_libcassert.c 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcassert.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -35,6 +35,7 @@
#include "pub_core_libcproc.h"
#include "pub_core_main.h"
#include "pub_core_stacktrace.h"
+#include "pub_core_syscall.h"
#include "pub_core_tooliface.h"
#include "vki_unistd.h"
=20
Modified: trunk/coregrind/m_libcbase.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_libcbase.c 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcbase.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -471,95 +471,6 @@
#undef SORT
}
=20
-/* ---------------------------------------------------------------------
- A function for doing syscalls.
- ------------------------------------------------------------------ */
-
-#if defined(VGP_x86_linux)
-extern UInt do_syscall_x86_linux_WRK (
- UInt syscall_no,=20
- UInt a1, UInt a2, UInt a3,
- UInt a4, UInt a5, UInt a6
- );
-asm(
-"do_syscall_x86_linux_WRK:\n"
-" push %esi\n"
-" push %edi\n"
-" push %ebx\n"
-" push %ebp\n"
-" movl 16+ 4(%esp),%eax\n"
-" movl 16+ 8(%esp),%ebx\n"
-" movl 16+12(%esp),%ecx\n"
-" movl 16+16(%esp),%edx\n"
-" movl 16+20(%esp),%esi\n"
-" movl 16+24(%esp),%edi\n"
-" movl 16+28(%esp),%ebp\n"
-" int $0x80\n"
-" popl %ebp\n"
-" popl %ebx\n"
-" popl %edi\n"
-" popl %esi\n"
-" ret\n"
-);
-#endif
-
-
-#if defined(VGP_amd64_linux)
-/* Perform a Linux syscall with the "syscall" instruction.
-=09
- Incoming args (syscall number + up to 6 args) come in %rdi, %rsi,
- %rdx, %rcx, %r8, %r9, and the last one on the stack (ie. the C
- calling convention).
-
- They are passed to the syscall in the regs %rdi, %rsi, %rdx, %r10,
- %r8, %r9 (yes, really %r10, not %rcx), ie. the kernel's syscall
- calling convention.
-
- %rax holds the syscall number and gets the return value. %rcx and
- %r11 are clobbered by the syscall; no matter, they are caller-save
- (the syscall clobbers no callee-save regs, so we don't have to do
- any register saving/restoring).
-*/
-extern ULong do_syscall_amd64_linux_WRK (
- ULong syscall_no,=20
- ULong a1, ULong a2, ULong a3,
- ULong a4, ULong a5, ULong a6
- );
-asm(
-"do_syscall_amd64_linux_WRK:\n"
- /* Convert function calling convention --> syscall calling
- convention */
-" movq %rdi, %rax\n"
-" movq %rsi, %rdi\n"
-" movq %rdx, %rsi\n"
-" movq %rcx, %rdx\n"
-" movq %r8, %r10\n"
-" movq %r9, %r8\n"
-" movq 8(%rsp), %r9\n" /* last arg from stack */
-" syscall\n"
-" ret\n"
-);
-#endif
-
-
-SysRes VG_(do_syscall) ( UWord sysno, UWord a1, UWord a2, UWord a3,=20
- UWord a4, UWord a5, UWord a6 )
-{
- SysRes res;
-
-#if defined(VGP_x86_linux)
- UInt eax =3D do_syscall_x86_linux_WRK(sysno,a1,a2,a3,a4,a5,a6);
- res =3D VG_(mk_SysRes_x86_linux)( eax );
-#elif defined(VGP_amd64_linux)
- ULong rax =3D do_syscall_amd64_linux_WRK(sysno,a1,a2,a3,a4,a5,a6);
- res =3D VG_(mk_SysRes_amd64_linux)( rax );
-#else
-# error VG_(do_syscall): unimplemented on this platform
-#endif
-
- return res;
-}
-
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
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-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcfile.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -34,6 +34,7 @@
#include "pub_core_libcfile.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
+#include "pub_core_syscall.h"
#include "vki_unistd.h"
=20
/* ---------------------------------------------------------------------
Modified: trunk/coregrind/m_libcmman.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_libcmman.c 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcmman.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -35,6 +35,7 @@
#include "pub_core_libcmman.h"
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
+#include "pub_core_syscall.h"
#include "vki_unistd.h"
=20
SysRes VG_(mmap_native)(void *start, SizeT length, UInt prot, UInt flags=
,
Modified: trunk/coregrind/m_libcproc.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_libcproc.c 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcproc.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -34,6 +34,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_mallocfree.h"
+#include "pub_core_syscall.h"
#include "vki_unistd.h"
=20
/* ---------------------------------------------------------------------
Modified: 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-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_libcsignal.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -32,6 +32,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcsignal.h"
+#include "pub_core_syscall.h"
#include "vki_unistd.h"
=20
/* sigemptyset, sigfullset, sigaddset and sigdelset return 0 on
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-17 19:28:29 UTC (rev =
3921)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-17 21:31:45 UTC (rev =
3922)
@@ -77,6 +77,7 @@
#include "pub_core_scheduler.h"
#include "pub_core_signals.h"
#include "pub_core_stacktrace.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
#include "pub_core_translate.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-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_signals.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -96,8 +96,10 @@
#include "pub_core_signals.h"
#include "pub_core_sigframe.h"
#include "pub_core_stacktrace.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
+#include "vki_unistd.h"
=20
=20
/* Define to give more sanity checking for signals. */
@@ -131,7 +133,7 @@
# define VGP_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.eax)
# define VGP_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.eax into a SysRes. */ \
- VG_(mk_SysRes_x86_linux)( (uc)->uc_mcontext.eax )
+ VG_(mk_SysRes)( (uc)->uc_mcontext.eax )
=20
#elif defined(VGP_amd64_linux)
# define VGP_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.rip)
@@ -140,7 +142,7 @@
# define VGP_UCONTEXT_SYSCALL_NUM(uc) ((uc)->uc_mcontext.rax)
# define VGP_UCONTEXT_SYSCALL_SYSRES(uc) \
/* Convert the value in uc_mcontext.rax into a SysRes. */ \
- VG_(mk_SysRes_amd64_linux)( (uc)->uc_mcontext.rax )
+ VG_(mk_SysRes)( (uc)->uc_mcontext.rax )
=20
#elif defined(VGP_arm_linux)
# define VGP_UCONTEXT_INSTR_PTR(uc) ((uc)->uc_mcontext.arm_pc)
@@ -379,6 +381,30 @@
After a possible SCSS change, update SKSS and the kernel itself.
------------------------------------------------------------------ */
=20
+// We need two levels of macro-expansion here to convert __NR_rt_sigretu=
rn
+// to a number before converting it to a string... sigh.
+extern void my_sigreturn(void);
+
+#if defined(VGP_x86_linux)
+# define _MYSIG(name) \
+ "my_sigreturn:\n" \
+ " movl $" #name ", %eax\n" \
+ " int $0x80\n"
+#elif defined(VGP_amd64_linux)
+# define _MYSIG(name) \
+ "my_sigreturn:\n" \
+ " movq $" #name ", %rax\n" \
+ " syscall\n"
+#else
+# error Unknown platform
+#endif
+
+#define MYSIG(name) _MYSIG(name)
+asm(
+ MYSIG(__NR_rt_sigreturn)
+);
+
+
static void handle_SCSS_change ( Bool force_update )
{
Int res, sig;
@@ -409,7 +435,7 @@
=20
ksa.ksa_handler =3D skss.skss_per_sig[sig].skss_handler;
ksa.sa_flags =3D skss.skss_per_sig[sig].skss_flags;
- ksa.sa_restorer =3D VG_(sigreturn);
+ ksa.sa_restorer =3D my_sigreturn;
=20
/* block all signals in handler */
VG_(sigfillset)( &ksa.sa_mask );
@@ -437,7 +463,7 @@
vg_assert(ksa_old.sa_flags=20
=3D=3D skss_old.skss_per_sig[sig].skss_flags);
vg_assert(ksa_old.sa_restorer=20
- =3D=3D VG_(sigreturn));
+ =3D=3D my_sigreturn);
VG_(sigaddset)( &ksa_old.sa_mask, VKI_SIGKILL );
VG_(sigaddset)( &ksa_old.sa_mask, VKI_SIGSTOP );
vg_assert(VG_(isfullsigset)( &ksa_old.sa_mask ));
Added: trunk/coregrind/m_syscall.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_syscall.c 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/m_syscall.c 2005-06-17 21:31:45 UTC (rev 3922)
@@ -0,0 +1,163 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Doing syscalls. m_syscall.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ 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_syscall.h"
+
+/* ---------------------------------------------------------------------
+ Building syscall return values.
+ ------------------------------------------------------------------ */
+
+/* Make a SysRes value from an syscall return value. This is
+ Linux-specific.
+
+ From:
+ http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/
+ linux/i386/sysdep.h?
+ rev=3D1.28&content-type=3Dtext/x-cvsweb-markup&cvsroot=3Dglibc
+
+ Linux uses a negative return value to indicate syscall errors,
+ unlike most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be
+ negative even if the call succeeded. E.g., the 'lseek' system call
+ might return a large offset. Therefore we must not anymore test
+ for < 0, but test for a real error by making sure the value in %eax
+ is a real error number. Linus said he will make sure the no
+ syscall returns a value in -1 .. -4095 as a valid result so we can
+ safely test with -4095.
+*/
+SysRes VG_(mk_SysRes) ( UWord val ) {
+ SysRes res;
+#if defined(VGP_x86_linux)
+ res.isError =3D val >=3D -4095 && val <=3D -1;
+ res.val =3D res.isError ? -val : val;
+#elif defined(VGP_amd64_linux)
+ res.isError =3D val >=3D -4095 && val <=3D -1;
+ res.val =3D res.isError ? -val : val;
+#else
+# error Unknown platform
+#endif
+ return res;
+}
+
+SysRes VG_(mk_SysRes_Error) ( UWord val ) {
+ SysRes r =3D { val, True };
+ return r;
+}
+
+SysRes VG_(mk_SysRes_Success) ( UWord val ) {
+ SysRes r =3D { val, False };
+ return r;
+}
+
+
+/* ---------------------------------------------------------------------
+ A function for doing syscalls.
+ ------------------------------------------------------------------ */
+
+extern UInt do_syscall_WRK (
+ UInt syscall_no,=20
+ UInt a1, UInt a2, UInt a3,
+ UInt a4, UInt a5, UInt a6
+ );
+#if defined(VGP_x86_linux)
+/* Incoming args (syscall number + up to 6 args) come on the stack.
+ (ie. the C calling convention).
+
+ The syscall number goes in %eax. The args are passed to the syscall =
in
+ the regs %ebx, %ecx, %edx, %esi, %edi, %ebp, ie. the kernel's syscall
+ calling convention.
+
+ %eax gets the return value. Not sure which registers the kernel
+ clobbers, so we preserve all the callee-save regs (%esi, %edi, %ebx,
+ %ebp).
+*/
+asm(
+"do_syscall_WRK:\n"
+" push %esi\n"
+" push %edi\n"
+" push %ebx\n"
+" push %ebp\n"
+" movl 16+ 4(%esp),%eax\n"
+" movl 16+ 8(%esp),%ebx\n"
+" movl 16+12(%esp),%ecx\n"
+" movl 16+16(%esp),%edx\n"
+" movl 16+20(%esp),%esi\n"
+" movl 16+24(%esp),%edi\n"
+" movl 16+28(%esp),%ebp\n"
+" int $0x80\n"
+" popl %ebp\n"
+" popl %ebx\n"
+" popl %edi\n"
+" popl %esi\n"
+" ret\n"
+);
+#elif defined(VGP_amd64_linux)
+/* Incoming args (syscall number + up to 6 args) come in %rdi, %rsi,
+ %rdx, %rcx, %r8, %r9, and the last one on the stack (ie. the C
+ calling convention).
+
+ The syscall number goes in %rax. The args are passed to the syscall =
in
+ the regs %rdi, %rsi, %rdx, %r10, %r8, %r9 (yes, really %r10, not %rcx=
),
+ ie. the kernel's syscall calling convention.
+
+ %rax gets the return value. %rcx and %r11 are clobbered by the sysca=
ll;
+ no matter, they are caller-save (the syscall clobbers no callee-save
+ regs, so we don't have to do any register saving/restoring).
+*/
+asm(
+"do_syscall_WRK:\n"
+ /* Convert function calling convention --> syscall calling
+ convention */
+" movq %rdi, %rax\n"
+" movq %rsi, %rdi\n"
+" movq %rdx, %rsi\n"
+" movq %rcx, %rdx\n"
+" movq %r8, %r10\n"
+" movq %r9, %r8\n"
+" movq 8(%rsp), %r9\n" /* last arg from stack */
+" syscall\n"
+" ret\n"
+);
+#else
+# error Unknown platform
+#endif
+
+SysRes VG_(do_syscall) ( UWord sysno, UWord a1, UWord a2, UWord a3,
+ UWord a4, UWord a5, UWord a6 )
+{
+ UWord val =3D do_syscall_WRK(sysno,a1,a2,a3,a4,a5,a6);
+ return VG_(mk_SysRes)( val );
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_syscalls/syscall-amd64-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/syscall-amd64-linux.S 2005-06-17 19:28:29 =
UTC (rev 3921)
+++ trunk/coregrind/m_syscalls/syscall-amd64-linux.S 2005-06-17 21:31:45 =
UTC (rev 3922)
@@ -34,12 +34,6 @@
=20
=20
/*----------------------------------------------------------------*/
-.globl VG_(sigreturn)
-VG_(sigreturn):
- movq $__NR_rt_sigreturn, %rax
- syscall
-
-/*----------------------------------------------------------------*/
/*
Perform a syscall for the client. This will run a syscall
with the client's specific per-thread signal mask.
Modified: trunk/coregrind/m_syscalls/syscall-arm-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/syscall-arm-linux.S 2005-06-17 19:28:29 UT=
C (rev 3921)
+++ trunk/coregrind/m_syscalls/syscall-arm-linux.S 2005-06-17 21:31:45 UT=
C (rev 3922)
@@ -33,6 +33,8 @@
=20
# XXX: must reinstate comments also -- see x86-linux/syscall.S
=20
+# XXX: this is now all way out of date...
+
.globl VG_(do_syscall)
VG_(do_syscall):
swi
@@ -41,10 +43,6 @@
VG_(clone):
swi
=20
-.globl VG_(sigreturn)
-VG_(sigreturn):
- swi
-
# ToDo XXX: Assembler did not like this...
#/* Let the linker know we don't need an executable stack */
#.section .note.GNU-stack,"",@progbits
Modified: trunk/coregrind/m_syscalls/syscall-x86-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/syscall-x86-linux.S 2005-06-17 19:28:29 UT=
C (rev 3921)
+++ trunk/coregrind/m_syscalls/syscall-x86-linux.S 2005-06-17 21:31:45 UT=
C (rev 3922)
@@ -34,12 +34,6 @@
=09
=09
/*----------------------------------------------------------------*/
-.globl VG_(sigreturn)
-VG_(sigreturn):
- movl $__NR_rt_sigreturn, %eax
- int $0x80
-
-/*----------------------------------------------------------------*/
/*
Perform a syscall for the client. This will run a syscall
with the client's specific per-thread signal mask.
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-17 19:28:29=
UTC (rev 3921)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-17 21:31:45=
UTC (rev 3922)
@@ -41,6 +41,7 @@
#include "pub_core_libcsignal.h"
#include "pub_core_sigframe.h"
#include "pub_core_signals.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
=20
@@ -420,7 +421,7 @@
start_thread_NORETURN, stack, flags, &VG_(threads)[ctid],
child_tidptr, parent_tidptr, NULL
);
- res =3D VG_(mk_SysRes_amd64_linux)( rax );
+ res =3D VG_(mk_SysRes)( rax );
=20
VG_(sigprocmask)(VKI_SIG_SETMASK, &savedmask, NULL);
=20
@@ -655,9 +656,7 @@
denote either success or failure, we must set up so that the
driver logic copies it back unchanged. Also, note %RAX is of
the guest registers written by VG_(sigframe_destroy). */
- SET_STATUS_from_SysRes(
- VG_(mk_SysRes_amd64_linux)( tst->arch.vex.guest_RAX )=20
- );
+ SET_STATUS_from_SysRes( VG_(mk_SysRes)( tst->arch.vex.guest_RAX ) );
=20
/* Check to see if some any signals arose as a result of this. */
*flags |=3D SfPollAfter;
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-17 19:28:29 UTC=
(rev 3921)
+++ trunk/coregrind/m_syscalls/syscalls-generic.c 2005-06-17 21:31:45 UTC=
(rev 3922)
@@ -44,6 +44,7 @@
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
#include "pub_core_signals.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
=20
#include "priv_types_n_macros.h"
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-17 19:28:29 UTC (=
rev 3921)
+++ trunk/coregrind/m_syscalls/syscalls-linux.c 2005-06-17 21:31:45 UTC (=
rev 3922)
@@ -40,6 +40,7 @@
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
#include "pub_core_signals.h"
+#include "pub_core_syscall.h"
=20
#include "priv_types_n_macros.h"
#include "priv_syscalls-generic.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-17 19:28:29 UTC (r=
ev 3921)
+++ trunk/coregrind/m_syscalls/syscalls-main.c 2005-06-17 21:31:45 UTC (r=
ev 3922)
@@ -39,6 +39,7 @@
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
#include "pub_core_signals.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
=20
#include "priv_types_n_macros.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-17 19:28:29 U=
TC (rev 3921)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-06-17 21:31:45 U=
TC (rev 3922)
@@ -47,6 +47,7 @@
#include "pub_core_mallocfree.h"
#include "pub_core_sigframe.h"
#include "pub_core_signals.h"
+#include "pub_core_syscall.h"
#include "pub_core_syscalls.h"
#include "pub_core_tooliface.h"
=20
@@ -443,7 +444,7 @@
start_thread_NORETURN, stack, flags, &VG_(threads)[ctid],
child_tidptr, parent_tidptr, NULL
);
- res =3D VG_(mk_SysRes_x86_linux)( eax );
+ res =3D VG_(mk_SysRes)( eax );
=20
VG_(sigprocmask)(VKI_SIG_SETMASK, &savedmask, NULL);
=20
@@ -1142,9 +1143,7 @@
denote either success or failure, we must set up so that the
driver logic copies it back unchanged. Also, note %EAX is of
the guest registers written by VG_(sigframe_destroy). */
- SET_STATUS_from_SysRes(
- VG_(mk_SysRes_x86_linux)( tst->arch.vex.guest_EAX )=20
- );
+ SET_STATUS_from_SysRes( VG_(mk_SysRes)( tst->arch.vex.guest_EAX ) );
=20
/* Check to see if some any signals arose as a result of this. */
*flags |=3D SfPollAfter;
@@ -1175,9 +1174,7 @@
denote either success or failure, we must set up so that the
driver logic copies it back unchanged. Also, note %EAX is of
the guest registers written by VG_(sigframe_destroy). */
- SET_STATUS_from_SysRes(
- VG_(mk_SysRes_x86_linux)( tst->arch.vex.guest_EAX )=20
- );
+ SET_STATUS_from_SysRes( VG_(mk_SysRes)( tst->arch.vex.guest_EAX ) );
=20
/* Check to see if some any signals arose as a result of this. */
*flags |=3D SfPollAfter;
Modified: trunk/coregrind/pub_core_libcbase.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_libcbase.h 2005-06-17 19:28:29 UTC (rev 3921=
)
+++ trunk/coregrind/pub_core_libcbase.h 2005-06-17 21:31:45 UTC (rev 3922=
)
@@ -39,89 +39,6 @@
=20
#include "pub_tool_libcbase.h"
=20
-/* ---------------------------------------------------------------------
- Fundamental functions for doing syscalls on this platform.
- ------------------------------------------------------------------ */
-
-/* Do a syscall on this platform, with 6 args, and return the result
- in canonical format in a SysRes value. */
-
-// We use a full prototype for VG_(do_syscall) rather than "..." to ensu=
re
-// that all arguments get converted to a UWord appropriately. Not doing=
so
-// can cause problems when passing 32-bit integers on 64-bit platforms,
-// because the top 32-bits might not be zeroed appropriately, eg. as wou=
ld
-// happen with the 6th arg on AMD64 which is passed on the stack.
-
-extern SysRes VG_(do_syscall) ( UWord sysno,=20
- UWord, UWord, UWord,=20
- UWord, UWord, UWord );
-
-/* Macros make life easier. */
-
-#define vgPlain_do_syscall0(s) VG_(do_syscall)((s),0,0,0,0,0=
,0)
-#define vgPlain_do_syscall1(s,a) VG_(do_syscall)((s),(a),0,0,0=
,0,0)
-#define vgPlain_do_syscall2(s,a,b) VG_(do_syscall)((s),(a),(b),0=
,0,0,0)
-#define vgPlain_do_syscall3(s,a,b,c) VG_(do_syscall)((s),(a),(b),(=
c),0,0,0)
-#define vgPlain_do_syscall4(s,a,b,c,d) VG_(do_syscall)((s),(a),(b),\
- (c),(d),0,0)
-#define vgPlain_do_syscall5(s,a,b,c,d,e) VG_(do_syscall)((s),(a),(b),\
- (c),(d),(e),0=
)
-#define vgPlain_do_syscall6(s,a,b,c,d,e,f) VG_(do_syscall)((s),(a),(b),\
- (c),(d),(e),(=
f))
-
-
-/* Build SysRes values -- occasionally useful. */
-
-static inline SysRes VG_(mk_SysRes_Error) ( UWord err ) {
- SysRes r =3D { err, True };
- return r;
-}
-
-static inline SysRes VG_(mk_SysRes_Success) ( UWord err ) {
- SysRes r =3D { err, False };
- return r;
-}
-
-
-/* This is absolutely the wrong place for these, but I can't figure
- out anywhere else for them to go. */
-
-/* Make a SysRes value from an %eax syscall return value on
- x86-linux.
-
- From:
- http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/
- linux/i386/sysdep.h?
- rev=3D1.28&content-type=3Dtext/x-cvsweb-markup&cvsroot=3Dglibc
-
- Linux uses a negative return value to indicate syscall errors,
- unlike most Unices, which use the condition codes' carry flag.
-
- Since version 2.1 the return value of a system call might be
- negative even if the call succeeded. E.g., the 'lseek' system call
- might return a large offset. Therefore we must not anymore test
- for < 0, but test for a real error by making sure the value in %eax
- is a real error number. Linus said he will make sure the no
- syscall returns a value in -1 .. -4095 as a valid result so we can
- safely test with -4095.
-*/
-static inline SysRes VG_(mk_SysRes_x86_linux) ( Int eax ) {
- SysRes res;
- res.isError =3D eax >=3D -4095 && eax <=3D -1;
- res.val =3D res.isError ? -eax : eax;
- return res;
-}
-
-/* Similarly .. */
-static inline SysRes VG_(mk_SysRes_amd64_linux) ( Long rax ) {
- SysRes res;
- res.isError =3D rax >=3D -4095 && rax <=3D -1;
- res.val =3D res.isError ? -rax : rax;
- return res;
-}
-
-
-
#endif // __PUB_CORE_LIBCBASE_H
=20
/*--------------------------------------------------------------------*/
Added: trunk/coregrind/pub_core_syscall.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_syscall.h 2005-06-17 19:28:29 UTC (rev 3921)
+++ trunk/coregrind/pub_core_syscall.h 2005-06-17 21:31:45 UTC (rev 3922)
@@ -0,0 +1,83 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Doing system calls. pub_core_syscall.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_SYSCALL_H
+#define __PUB_CORE_SYSCALL_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module contains the code for actually executing syscall=
s.
+//--------------------------------------------------------------------
+
+/* Do a syscall on this platform, with 6 args, and return the result
+ in canonical format in a SysRes value. */
+
+// We use a full prototype for VG_(do_syscall) rather than "..." to ensu=
re
+// that all arguments get converted to a UWord appropriately. Not doing=
so
+// can cause problems when passing 32-bit integers on 64-bit platforms,
+// because the top 32-bits might not be zeroed appropriately, eg. as wou=
ld
+// happen with the 6th arg on AMD64 which is passed on the stack.
+
+extern SysRes VG_(do_syscall) ( UWord sysno,=20
+ UWord, UWord, UWord,=20
+ UWord, UWord, UWord );
+
+/* Macros make life easier. */
+
+#define vgPlain_do_syscall0(s) VG_(do_syscall)((s),0,0,0,0,0=
,0)
+#define vgPlain_do_syscall1(s,a) VG_(do_syscall)((s),(a),0,0,0=
,0,0)
+#define vgPlain_do_syscall2(s,a,b) VG_(do_syscall)((s),(a),(b),0=
,0,0,0)
+#define vgPlain_do_syscall3(s,a,b,c) VG_(do_syscall)((s),(a),(b),(=
c),0,0,0)
+#define vgPlain_do_syscall4(s,a,b,c,d) VG_(do_syscall)((s),(a),(b),\
+ (c),(d),0,0)
+#define vgPlain_do_syscall5(s,a,b,c,d,e) VG_(do_syscall)((s),(a),(b),\
+ (c),(d),(e),0=
)
+#define vgPlain_do_syscall6(s,a,b,c,d,e,f) VG_(do_syscall)((s),(a),(b),\
+ (c),(d),(e),(=
f))
+
+extern SysRes VG_(mk_SysRes) ( UWord val );
+extern SysRes VG_(mk_SysRes_Error) ( UWord val );
+extern SysRes VG_(mk_SysRes_Success) ( UWord val );
+
+// The _WRK function is handwritten assembly. It has some very magic
+// properties. See comments at the top of
+// VG_(fixup_guest_state_after_syscall_interrupted) below for details.
+extern
+void VG_(do_syscall_for_client_WRK)( Int syscallno,=20
+ void* guest_state,
+ const vki_sigset_t *syscall_mask,
+ const vki_sigset_t *restore_mask,
+ Int nsigwords );
+
+#endif // __PUB_CORE_SYSCALL_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
|
|
From: <sv...@va...> - 2005-06-17 19:28:51
|
Author: njn
Date: 2005-06-17 20:28:29 +0100 (Fri, 17 Jun 2005)
New Revision: 3921
Log:
Fix strchr. It was rather bogus.
Modified:
trunk/memcheck/tests/strchr.c
trunk/memcheck/tests/strchr.stderr.exp
Modified: trunk/memcheck/tests/strchr.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/tests/strchr.c 2005-06-17 13:06:53 UTC (rev 3920)
+++ trunk/memcheck/tests/strchr.c 2005-06-17 19:28:29 UTC (rev 3921)
@@ -7,8 +7,12 @@
=20
int main(int argc, char* argv[])
{
- char* s =3D malloc(10);
- char* a =3D strchr(s, '\0');
- char* b =3D strrchr(s, '\0');
- return ((int)a + (int)b);
+ char *s, *a, *b;
+ s =3D malloc(sizeof(char));
+
+ // Nb: s[0] is uninitialised, but almost certainly a zero
+ =20
+ a =3D strchr (s, '1');
+ b =3D strrchr(s, '1');
+ return 0;//((int)a + (int)b);
}
Modified: trunk/memcheck/tests/strchr.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/strchr.stderr.exp 2005-06-17 13:06:53 UTC (rev 3=
920)
+++ trunk/memcheck/tests/strchr.stderr.exp 2005-06-17 19:28:29 UTC (rev 3=
921)
@@ -1,7 +1,15 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: index (mac_replace_strmem.c:...)
- by 0x........: main (strchr.c:11)
+ by 0x........: main (strchr.c:15)
=20
Conditional jump or move depends on uninitialised value(s)
at 0x........: index (mac_replace_strmem.c:...)
- by 0x........: main (strchr.c:12)
+ by 0x........: main (strchr.c:15)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: rindex (mac_replace_strmem.c:...)
+ by 0x........: main (strchr.c:16)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: rindex (mac_replace_strmem.c:...)
+ by 0x........: main (strchr.c:16)
|
|
From: Nicholas N. <nj...@cs...> - 2005-06-17 13:26:24
|
On Fri, 17 Jun 2005, Julian Seward wrote: > (and 4.0.1 is released? gcc.gnu.org doesn't mention this). I believe it's currently "frozen", ie. close to being released, but isn't out yet. Maybe a week or so. N |
|
From: <sv...@va...> - 2005-06-17 13:07:50
|
Author: sewardj
Date: 2005-06-17 14:06:53 +0100 (Fri, 17 Jun 2005)
New Revision: 3920
Log:
Don't do strlen on ui->compdir if it is NULL. Duh.
Modified:
trunk/coregrind/m_debuginfo/dwarf.c
Modified: trunk/coregrind/m_debuginfo/dwarf.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/dwarf.c 2005-06-17 03:06:27 UTC (rev 3919=
)
+++ trunk/coregrind/m_debuginfo/dwarf.c 2005-06-17 13:06:53 UTC (rev 3920=
)
@@ -508,6 +508,8 @@
=20
if (*data !=3D '/'=20
/* not an absolute path */
+ && ui->compdir !=3D NULL
+ /* actually got something sensible for compdir */
&& VG_(strlen)(ui->compdir) + VG_(strlen)(data) + 5/*paranoia*=
/ < NBUF
/* it's short enough to concatenate */)=20
{
|
|
From: Julian S. <js...@ac...> - 2005-06-17 09:33:26
|
Dirk > On Thursday 16 June 2005 15:20, Nicholas Nethercote wrote: > > I've been using a 4.0 pre-release (haven't bothered upgrading to 4.0.0 > > yet) for a while without problems. Any ideas why I haven't had a > > problem? > > I don't know. Its been in gcc 4.0 CVS branch (which has been released as > 4.0.1 for example) for a while, and its also in the SUSE incarnation of gcc > 4.0 CVS which I use, and so far I didn't bother to figure out. Do you > really want to know? Sorry to be tedious, but I'd like to understand a bit more. It strikes me as strange that they would change the behaviour of the compiler in the 4.0.0 - 4.0.1 transition. (and 4.0.1 is released? gcc.gnu.org doesn't mention this). Could you send the error message(s) that you get, so I can see what it is gcc is complaining about? J |
|
From: Jeremy F. <je...@go...> - 2005-06-17 05:43:13
|
Julian Seward wrote:
>Jeremy, Ashley,
>
>I appreciate you both looking into this. I'm unclear as to whether
>you grokked that I changed the exit semantics in the 3 line a couple
>of weeks back to use the "last-one-out-turn-out-the-lights" semantics.
>As a result (following some further GDT-copying entertainment) the
>Elan3 driver now runs fine on Valgrind, and nothing else appears to
>be broken as a result.
>
I still think that's a bad idea in general. It probably won't make much
practical difference in normal NPTL programs, since all threads exit
simultaneously on exit_group, and if the initial thread is the one doing
the exit(), it will generally be the last one out. But if you have a
program which exit()s from another thread, and you use leak checking or
some other time-consuming post-exit processing, there'll be a window in
which the program has appeared to exit but output hasn't been produced.
J
|
|
From: Jeremy F. <je...@go...> - 2005-06-17 05:43:12
|
Ashley Pittman wrote:
>Probably the result on an implicit close(). Very few programs call
>detach or close so it will come from the fd being closed on program
>teardown.
>
>
There won't be an implicit close until the process actually exits
though, so this isn't relevent to the "won't exit under Valgrind" problem.
>>In the 2.4/LinuxThreads case, the threads library coordinates the
>>process termination by getting each thread to explicitly call exit().
>>There are some tricky edge cases depending on whether the manager thread
>>or the initial thread is the last to exit. Again, Valgrind only exits
>>once all threads have terminated.
>>
>>
>
>This isn't going to happen until what I guess you are referring to as
>the initial thread has exited, couldn't deadlock also happen this way?
>How exactly does it do in this coordination?
>
>
Well, the client's initial thread may exit, but Valgrind itself will
keep using that thread to wait for other threads to exit; if the elan
thread is waiting for the initial thread to exit, there's the deadlock.
> if ((res = __clone (elan3_lwp, stack + ELANLWP_STACK_SIZE,
> CLONE_VM | CLONE_FS | CLONE_FILES |
>CLONE_SIGHAND,
> (void *) ctx)) == -1)
>
>
Counter-intuitively, you need to request to be part of the thread group,
with CLONE_THREAD, so this call will create a new thread group.
J
|
|
From: <sv...@va...> - 2005-06-17 03:06:33
|
Author: njn
Date: 2005-06-17 04:06:27 +0100 (Fri, 17 Jun 2005)
New Revision: 3919
Log:
Renamed VG_(mark_from_registers) to the more general
VG_(apply_to_GP_regs). Moved it into m_machine.
Modified:
trunk/coregrind/amd64/state.c
trunk/coregrind/core.h
trunk/coregrind/m_machine.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/x86/state.c
trunk/include/pub_tool_aspacemgr.h
trunk/include/pub_tool_machine.h
trunk/include/tool.h
trunk/memcheck/mac_leakcheck.c
Modified: trunk/coregrind/amd64/state.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/amd64/state.c 2005-06-16 13:14:51 UTC (rev 3918)
+++ trunk/coregrind/amd64/state.c 2005-06-17 03:06:27 UTC (rev 3919)
@@ -86,35 +86,6 @@
=20
=20
/*------------------------------------------------------------*/
-/*--- Thread stuff ---*/
-/*------------------------------------------------------------*/
-
-void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr))
-{
- ThreadState *tst =3D VG_(get_ThreadState)(tid);
- ThreadArchState *arch =3D &tst->arch;
-
- /* XXX ask tool about validity? */
- (*marker)(arch->vex.guest_RAX);
- (*marker)(arch->vex.guest_RCX);
- (*marker)(arch->vex.guest_RDX);
- (*marker)(arch->vex.guest_RBX);
- (*marker)(arch->vex.guest_RSI);
- (*marker)(arch->vex.guest_RDI);
- (*marker)(arch->vex.guest_RSP);
- (*marker)(arch->vex.guest_RBP);
- (*marker)(arch->vex.guest_R8);
- (*marker)(arch->vex.guest_R9);
- (*marker)(arch->vex.guest_R10);
- (*marker)(arch->vex.guest_R11);
- (*marker)(arch->vex.guest_R12);
- (*marker)(arch->vex.guest_R13);
- (*marker)(arch->vex.guest_R14);
- (*marker)(arch->vex.guest_R15);
-}
-
-
-/*------------------------------------------------------------*/
/*--- Debugger-related operations ---*/
/*------------------------------------------------------------*/
=20
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-16 13:14:51 UTC (rev 3918)
+++ trunk/coregrind/core.h 2005-06-17 03:06:27 UTC (rev 3919)
@@ -101,9 +101,6 @@
// For attaching the debugger
extern Int VGA_(ptrace_setregs_from_tst) ( Int pid, ThreadArchState* ar=
ch );
=20
-// Used by leakcheck
-extern void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr)=
);
-
/* ---------------------------------------------------------------------
Finally - autoconf-generated settings
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_machine.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_machine.c 2005-06-16 13:14:51 UTC (rev 3918)
+++ trunk/coregrind/m_machine.c 2005-06-17 03:06:27 UTC (rev 3919)
@@ -32,6 +32,7 @@
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
#include "pub_core_machine.h"
+#include "pub_core_scheduler.h"
=20
#define INSTR_PTR(regs) ((regs).vex.VGA_INSTR_PTR)
#define STACK_PTR(regs) ((regs).vex.VGA_STACK_PTR)
@@ -94,6 +95,54 @@
}
=20
=20
+static void apply_to_GPs_of_tid(VexGuestArchState* vex, void (*f)(Addr))
+{
+#if defined(VGA_x86)
+ (*f)(vex->guest_EAX);
+ (*f)(vex->guest_ECX);
+ (*f)(vex->guest_EDX);
+ (*f)(vex->guest_EBX);
+ (*f)(vex->guest_ESI);
+ (*f)(vex->guest_EDI);
+ (*f)(vex->guest_ESP);
+ (*f)(vex->guest_EBP);
+#elif defined(VGA_amd64)
+ (*f)(vex->guest_RAX);
+ (*f)(vex->guest_RCX);
+ (*f)(vex->guest_RDX);
+ (*f)(vex->guest_RBX);
+ (*f)(vex->guest_RSI);
+ (*f)(vex->guest_RDI);
+ (*f)(vex->guest_RSP);
+ (*f)(vex->guest_RBP);
+ (*f)(vex->guest_R8);
+ (*f)(vex->guest_R9);
+ (*f)(vex->guest_R10);
+ (*f)(vex->guest_R11);
+ (*f)(vex->guest_R12);
+ (*f)(vex->guest_R13);
+ (*f)(vex->guest_R14);
+ (*f)(vex->guest_R15);
+#else
+# error Unknown arch
+#endif
+}
+
+
+void VG_(apply_to_GP_regs)(void (*f)(UWord))
+{
+ ThreadId tid;
+
+ for (tid =3D 1; tid < VG_N_THREADS; tid++) {
+ if (VG_(is_valid_tid)(tid)) {
+ ThreadState* tst =3D VG_(get_ThreadState)(tid);
+ apply_to_GPs_of_tid(&(tst->arch.vex), f);
+ }
+ }
+}
+
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
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-16 13:14:51 UTC (rev =
3918)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-17 03:06:27 UTC (rev =
3919)
@@ -164,17 +164,6 @@
return VG_INVALID_THREADID;
}
=20
-void VG_(mark_from_registers)(void (*mark_addr)(Addr))
-{
- ThreadId tid;
-
- for(tid =3D 1; tid < VG_N_THREADS; tid++) {
- if (!VG_(is_valid_tid)(tid))
- continue;
- VGA_(mark_from_registers)(tid, mark_addr);
- }
-}
-
/* Print the scheduler status. */
void VG_(pp_sched_status) ( void )
{
Modified: trunk/coregrind/x86/state.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/x86/state.c 2005-06-16 13:14:51 UTC (rev 3918)
+++ trunk/coregrind/x86/state.c 2005-06-17 03:06:27 UTC (rev 3919)
@@ -132,27 +132,6 @@
}
=20
/*------------------------------------------------------------*/
-/*--- Thread stuff ---*/
-/*------------------------------------------------------------*/
-
-void VGA_(mark_from_registers)(ThreadId tid, void (*marker)(Addr))
-{
- ThreadState *tst =3D VG_(get_ThreadState)(tid);
- ThreadArchState *arch =3D &tst->arch;
-
- /* XXX ask tool about validity? */
- (*marker)(arch->vex.guest_EAX);
- (*marker)(arch->vex.guest_ECX);
- (*marker)(arch->vex.guest_EDX);
- (*marker)(arch->vex.guest_EBX);
- (*marker)(arch->vex.guest_ESI);
- (*marker)(arch->vex.guest_EDI);
- (*marker)(arch->vex.guest_ESP);
- (*marker)(arch->vex.guest_EBP);
-}
-
-
-/*------------------------------------------------------------*/
/*--- Debugger-related operations ---*/
/*------------------------------------------------------------*/
=20
Modified: trunk/include/pub_tool_aspacemgr.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_aspacemgr.h 2005-06-16 13:14:51 UTC (rev 3918)
+++ trunk/include/pub_tool_aspacemgr.h 2005-06-17 03:06:27 UTC (rev 3919)
@@ -49,7 +49,9 @@
/* Calls into the core used by leak-checking */
=20
/* Calls "add_rootrange" with each range of memory which looks like a
- plausible source of root pointers. */
+ plausible source of root pointers. This is very Memcheck-specific --
+ it's used in leak detection.
+*/
extern void VG_(find_root_memory)(void (*add_rootrange)(Addr addr, SizeT=
sz));
=20
#endif // __PUB_TOOL_ASPACEMGR
Modified: trunk/include/pub_tool_machine.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_machine.h 2005-06-16 13:14:51 UTC (rev 3918)
+++ trunk/include/pub_tool_machine.h 2005-06-17 03:06:27 UTC (rev 3919)
@@ -64,6 +64,12 @@
extern void VG_(set_shadow_regs_area) ( ThreadId tid, OffT guest_state_o=
ffset,
SizeT size, const UChar* area );
=20
+// Apply a function 'f' to all the general purpose registers in all the
+// current threads.
+// This is very Memcheck-specific -- it's used to find the roots when
+// doing leak checking.
+extern void VG_(apply_to_GP_regs)(void (*f)(UWord val));
+
#endif // __PUB_TOOL_MACHINE
=20
/*--------------------------------------------------------------------*/
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-16 13:14:51 UTC (rev 3918)
+++ trunk/include/tool.h 2005-06-17 03:06:27 UTC (rev 3919)
@@ -78,9 +78,6 @@
not expected to return. */
extern void VG_(set_fault_catcher)(void (*catcher)(Int sig, Addr addr));
=20
-/* 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));
-
/* ------------------------------------------------------------------ */
/* other, randomly useful functions */
extern Bool VG_(has_cpuid) ( void );
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-16 13:14:51 UTC (rev 3918)
+++ trunk/memcheck/mac_leakcheck.c 2005-06-17 03:06:27 UTC (rev 3919)
@@ -37,6 +37,7 @@
#include "pub_tool_libcassert.h"
#include "pub_tool_libcprint.h"
#include "pub_tool_libcsignal.h"
+#include "pub_tool_machine.h"
=20
/* Define to debug the memory-leak-detector. */
#define VG_DEBUG_LEAKCHECK 0
@@ -684,7 +685,7 @@
VG_(find_root_memory)(lc_scan_memory);
=20
/* Push registers onto mark stack */
- VG_(mark_from_registers)(lc_markstack_push);
+ VG_(apply_to_GP_regs)(lc_markstack_push);
=20
/* Keep walking the heap until everything is found */
lc_do_leakcheck(-1);
|
|
From: Tom H. <th...@cy...> - 2005-06-17 03:04:24
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-06-17 03:25: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 == 177 tests, 9 stderr failures, 1 stdout failure ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/strchr (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) |
|
From: <js...@ac...> - 2005-06-17 02:39:47
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-06-17 03:30:00 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, 3 stderr failures, 0 stdout failures ================= memcheck/tests/strchr (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2005-06-17 02:35:56
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-06-17 03:30: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 == 178 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/strchr (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-06-17 02:20:57
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-06-17 03:15: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 == 176 tests, 14 stderr failures, 1 stdout failure ================= 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/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_cmsg (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-17 02:20:21
|
Nightly build on dellow ( x86_64, Fedora Core 3 ) started at 2005-06-17 03:10: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 == 157 tests, 10 stderr failures, 2 stdout failures ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-06-17 02:05:18
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-06-17 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 == 157 tests, 11 stderr failures, 1 stdout failure ================= memcheck/tests/brk (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) corecheck/tests/fdleak_fcntl (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |