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
(6) |
|
2
(4) |
3
(9) |
4
(11) |
5
(16) |
6
(6) |
7
(1) |
8
(11) |
|
9
(11) |
10
(6) |
11
(10) |
12
(23) |
13
(23) |
14
(6) |
15
(10) |
|
16
(5) |
17
(13) |
18
(9) |
19
(4) |
20
(6) |
21
(16) |
22
(3) |
|
23
(5) |
24
(7) |
25
(6) |
26
(4) |
27
(8) |
28
|
29
(3) |
|
30
(2) |
31
(17) |
|
|
|
|
|
|
From: Rhys K. <rhy...@gm...> - 2015-08-08 22:23:01
|
Hello Florian, Thank you for all these signedness fixes. I know how unfun it is to find and resolve them, so thank you. Darwin does also experience the new compile error at present: clang: error: no such file or directory: '@FLAG_W_FORMAT_SIGNEDNESS@' Uncommenting the below line in configure.ac did not lead to a snowstorm of compiler warnings, so for Darwin I'd be happy to see it enabled (per what is the the proper fix here). # AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS]) Regards, Rhys On 9 August 2015 at 08:10, Ivo Raisr <ivo...@gm...> wrote: > > > 2015-08-08 23:47 GMT+02:00 Florian Krohm <fl...@ei...>: > >> Hopefully, I did not introduce syntax errors. Apologies in advance. >> configure.ac was changed to detect whether the compiler supports >> -Wformat-signedness but the test is disabled, because it is not clear >> that we get the code cleaned up for all platforms in time for the release. >> So... if you want to play with this you need to enable this line >> >> # AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS]) >> > > > Thank you for all the formatting fixes! > These were numerous to find and fix. Good work here. > > However with the latest greatest changes, the compilation fails with: > gcc: error: @FLAG_W_FORMAT_SIGNEDNESS@: No such file or directory > > I believe this is because expansion of @FLAG_W_FORMAT_SIGNEDNESS@ > is commented out in configure.ac but @FLAG_W_FORMAT_SIGNEDNESS@ > is still present in Makefile.all.am. Either it needs to unconditionally > expand > to something empty or it needs to be deleted from Makefile.all.am. > > I. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > > |
|
From: Ivo R. <ivo...@gm...> - 2015-08-08 22:10:24
|
2015-08-08 23:47 GMT+02:00 Florian Krohm <fl...@ei...>: > Hopefully, I did not introduce syntax errors. Apologies in advance. > configure.ac was changed to detect whether the compiler supports > -Wformat-signedness but the test is disabled, because it is not clear > that we get the code cleaned up for all platforms in time for the release. > So... if you want to play with this you need to enable this line > > # AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS]) > Thank you for all the formatting fixes! These were numerous to find and fix. Good work here. However with the latest greatest changes, the compilation fails with: gcc: error: @FLAG_W_FORMAT_SIGNEDNESS@: No such file or directory I believe this is because expansion of @FLAG_W_FORMAT_SIGNEDNESS@ is commented out in configure.ac but @FLAG_W_FORMAT_SIGNEDNESS@ is still present in Makefile.all.am. Either it needs to unconditionally expand to something empty or it needs to be deleted from Makefile.all.am. I. |
|
From: Florian K. <fl...@ei...> - 2015-08-08 21:47:15
|
I've fixed what gcc -Wformat-signedness pointed out on amd64, x86, and s390. On the ppc machine I have access to there was no suitable gcc and attempting to build 5.1 failed with some strange error message I don't recall. Carl, perhaps you have a suitable machine + compiler handy? I made obvious fixes in platform-specific code which I could not compile, but no guarantees that everything is fixed. This holds in particular for Darwin and Solaris. Hopefully, I did not introduce syntax errors. Apologies in advance. configure.ac was changed to detect whether the compiler supports -Wformat-signedness but the test is disabled, because it is not clear that we get the code cleaned up for all platforms in time for the release. So... if you want to play with this you need to enable this line # AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS]) Cheers, Florian |
|
From: <sv...@va...> - 2015-08-08 21:45:48
|
Author: florian
Date: Sat Aug 8 22:45:33 2015
New Revision: 15510
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/Makefile.all.am
trunk/configure.ac
trunk/coregrind/m_syswrap/priv_types_n_macros.h
trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c
trunk/coregrind/m_syswrap/syswrap-arm-linux.c
trunk/coregrind/m_syswrap/syswrap-arm64-linux.c
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
trunk/coregrind/m_syswrap/syswrap-mips64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-s390x-linux.c
trunk/coregrind/m_syswrap/syswrap-solaris.c
trunk/coregrind/m_syswrap/syswrap-tilegx-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-darwin.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-solaris.c
trunk/coregrind/m_syswrap/syswrap-xen.c
Modified: trunk/Makefile.all.am
==============================================================================
--- trunk/Makefile.all.am (original)
+++ trunk/Makefile.all.am Sat Aug 8 22:45:33 2015
@@ -110,6 +110,7 @@
@FLAG_W_WRITE_STRINGS@ \
@FLAG_W_EMPTY_BODY@ \
@FLAG_W_FORMAT@ \
+ @FLAG_W_FORMAT_SIGNEDNESS@ \
@FLAG_W_FORMAT_SECURITY@ \
@FLAG_W_IGNORED_QUALIFIERS@ \
@FLAG_W_MISSING_PARAMETER_TYPE@ \
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Aug 8 22:45:33 2015
@@ -1890,6 +1890,8 @@
AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS])
AC_GCC_WARNING_SUBST([empty-body], [FLAG_W_EMPTY_BODY])
AC_GCC_WARNING_SUBST([format], [FLAG_W_FORMAT])
+# Disabled for now until all platforms are clean
+# AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS])
AC_GCC_WARNING_SUBST([cast-qual], [FLAG_W_CAST_QUAL])
AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION])
AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS])
Modified: trunk/coregrind/m_syswrap/priv_types_n_macros.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_types_n_macros.h (original)
+++ trunk/coregrind/m_syswrap/priv_types_n_macros.h Sat Aug 8 22:45:33 2015
@@ -320,6 +320,16 @@
#define ARG7 (arrghs->arg7)
#define ARG8 (arrghs->arg8)
+/* Provide signed versions of the argument values */
+#define SARG1 ((Word)ARG1)
+#define SARG2 ((Word)ARG2)
+#define SARG3 ((Word)ARG3)
+#define SARG4 ((Word)ARG4)
+#define SARG5 ((Word)ARG5)
+#define SARG6 ((Word)ARG6)
+#define SARG7 ((Word)ARG7)
+#define SARG8 ((Word)ARG8)
+
/* Reference to the syscall's current result status/value. General
paranoia all round. */
#define SUCCESS (status->what == SsComplete && !sr_isError(status->sres))
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c Sat Aug 8 22:45:33 2015
@@ -451,7 +451,7 @@
if (0) VG_(printf)(
"wqthread_hijack: self %#lx, kport %#lx, "
"stackaddr %#lx, workitem %#lx, reuse/flags %x, sp %#lx\n",
- self, kport, stackaddr, workitem, reuse, sp);
+ self, kport, stackaddr, workitem, (UInt)reuse, sp);
/* Start the thread with all signals blocked. VG_(scheduler) will
set the mask correctly when we finally get there. */
@@ -498,10 +498,10 @@
tst = VG_(get_ThreadState)(tid);
- if (0) VG_(printf)("wqthread_hijack reuse %s: tid %d, tst %p, "
+ if (0) VG_(printf)("wqthread_hijack reuse %s: tid %u, tst %p, "
"tst->os_state.pthread %#lx, self %#lx\n",
tst->os_state.pthread == self ? "SAME" : "DIFF",
- tid, tst, tst->os_state.pthread, self);
+ tid, (void *)tst, tst->os_state.pthread, self);
vex = &tst->arch.vex;
vg_assert(tst->os_state.pthread - magic_delta == self);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c Sat Aug 8 22:45:33 2015
@@ -489,7 +489,7 @@
PRE(sys_arch_prctl)
{
ThreadState* tst;
- PRINT( "arch_prctl ( %ld, %lx )", ARG1, ARG2 );
+ PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 );
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(tid >= 1 && tid < VG_N_THREADS);
@@ -540,7 +540,7 @@
// space, and we should therefore not check anything it points to.
PRE(sys_ptrace)
{
- PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", SARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(int, "ptrace",
long, request, long, pid, long, addr, long, data);
switch (ARG1) {
@@ -619,7 +619,7 @@
PRE(sys_fadvise64)
{
- PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "fadvise64",
int, fd, vki_loff_t, offset, vki_size_t, len, int, advice);
}
@@ -628,12 +628,11 @@
{
SysRes r;
- PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %d, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, (Int)ARG5, ARG6 );
+ PRINT("sys_mmap ( %#lx, %lu, %ld, %ld, %ld, %ld )",
+ ARG1, ARG2, SARG3, SARG4, SARG5, SARG6 );
PRE_REG_READ6(long, "mmap",
unsigned long, start, unsigned long, length,
- unsigned long, prot, unsigned long, flags,
- unsigned long, fd, unsigned long, offset);
+ int, prot, int, flags, int, fd, vki_off_t, offset);
r = ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
SET_STATUS_from_SysRes(r);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c Sat Aug 8 22:45:33 2015
@@ -428,7 +428,7 @@
if (rflags != ~VKI_UC_GUEST_RFLAGS_NEG(uc)) {
VG_(debugLog)(1, "syswrap-solaris",
"The rflags value was restored from an "
- "explicitly set value in thread %d.\n", tid);
+ "explicitly set value in thread %u.\n", tid);
ok_restore = True;
}
else {
@@ -446,7 +446,7 @@
/* Check ok, the full restoration is possible. */
VG_(debugLog)(1, "syswrap-solaris",
"The CC_* guest state values were fully "
- "restored in thread %d.\n", tid);
+ "restored in thread %u.\n", tid);
ok_restore = True;
tst->arch.vex.guest_CC_OP = VKI_UC_GUEST_CC_OP(uc);
@@ -468,7 +468,7 @@
VG_(debugLog)(1, "syswrap-solaris",
"Cannot fully restore the CC_* guest state "
"values, using approximate rflags in thread "
- "%d.\n", tid);
+ "%u.\n", tid);
}
}
@@ -539,7 +539,7 @@
note = LibVEX_GuestAMD64_fxrstor((HWord)fs, &tst->arch.vex);
if (note != EmNote_NONE)
VG_(message)(Vg_UserMsg,
- "Error restoring FP state in thread %d: %s.\n",
+ "Error restoring FP state in thread %u: %s.\n",
tid, LibVEX_EmNote_string(note));
}
}
Modified: trunk/coregrind/m_syswrap/syswrap-arm-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-arm-linux.c Sat Aug 8 22:45:33 2015
@@ -352,8 +352,8 @@
// pagesize or 4K-size units in offset? For ppc32/64-linux, this is
// 4K-sized. Assert that the page size is 4K here for safety.
vg_assert(VKI_PAGE_SIZE == 4096);
- PRINT("sys_mmap2 ( %#lx, %llu, %ld, %ld, %ld, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ PRINT("sys_mmap2 ( %#lx, %lu, %lu, %lu, %lu, %lu )",
+ ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap2",
unsigned long, start, unsigned long, length,
unsigned long, prot, unsigned long, flags,
@@ -370,7 +370,7 @@
// things, eventually, I think. --njn
PRE(sys_lstat64)
{
- PRINT("sys_lstat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sys_lstat64 ( %#lx(%s), %#lx )", ARG1, (HChar*)ARG1, ARG2);
PRE_REG_READ2(long, "lstat64", char *, file_name, struct stat64 *, buf);
PRE_MEM_RASCIIZ( "lstat64(file_name)", ARG1 );
PRE_MEM_WRITE( "lstat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -386,7 +386,7 @@
PRE(sys_stat64)
{
- PRINT("sys_stat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sys_stat64 ( %#lx(%s), %#lx )", ARG1, (HChar*)ARG1, ARG2);
PRE_REG_READ2(long, "stat64", char *, file_name, struct stat64 *, buf);
PRE_MEM_RASCIIZ( "stat64(file_name)", ARG1 );
PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -399,7 +399,8 @@
PRE(sys_fstatat64)
{
- PRINT("sys_fstatat64 ( %ld, %#lx(%s), %#lx )",ARG1,ARG2,(char*)ARG2,ARG3);
+ PRINT("sys_fstatat64 ( %ld, %#lx(%s), %#lx )",
+ SARG1, ARG2, (HChar*)ARG2, ARG3);
PRE_REG_READ3(long, "fstatat64",
int, dfd, char *, file_name, struct stat64 *, buf);
PRE_MEM_RASCIIZ( "fstatat64(file_name)", ARG2 );
@@ -413,7 +414,7 @@
PRE(sys_fstat64)
{
- PRINT("sys_fstat64 ( %ld, %#lx )",ARG1,ARG2);
+ PRINT("sys_fstat64 ( %lu, %#lx )", ARG1, ARG2);
PRE_REG_READ2(long, "fstat64", unsigned long, fd, struct stat64 *, buf);
PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) );
}
@@ -577,7 +578,7 @@
that takes a pointer to the signal mask so supports more signals.
*/
*flags |= SfMayBlock;
- PRINT("sys_sigsuspend ( %ld, %ld, %ld )", ARG1,ARG2,ARG3 );
+ PRINT("sys_sigsuspend ( %ld, %ld, %#lx )", SARG1, SARG2, ARG3 );
PRE_REG_READ3(int, "sigsuspend",
int, history0, int, history1,
vki_old_sigset_t, mask);
@@ -609,7 +610,7 @@
// space, and we should therefore not check anything it points to.
PRE(sys_ptrace)
{
- PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", SARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(int, "ptrace",
long, request, long, pid, long, addr, long, data);
switch (ARG1) {
Modified: trunk/coregrind/m_syswrap/syswrap-arm64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-arm64-linux.c Sat Aug 8 22:45:33 2015
@@ -431,7 +431,7 @@
// ARM64 FIXME is this correct?
PRE(sys_fadvise64)
{
- PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "fadvise64",
int, fd, vki_loff_t, offset, vki_size_t, len, int, advice);
}
@@ -441,8 +441,8 @@
{
SysRes r;
- PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %d, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, (Int)ARG5, ARG6 );
+ PRINT("sys_mmap ( %#lx, %lu, %lu, %#lx, %lu, %lu )",
+ ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap",
unsigned long, start, unsigned long, length,
unsigned long, prot, unsigned long, flags,
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sat Aug 8 22:45:33 2015
@@ -91,8 +91,8 @@
ThreadState* tst = VG_(get_ThreadState)(tid);
VG_(debugLog)(1, "syswrap-darwin",
- "thread_wrapper(tid=%lld): entry\n",
- (ULong)tidW);
+ "thread_wrapper(tid=%u): entry\n",
+ tid);
vg_assert(tst->status == VgTs_Init);
@@ -100,8 +100,8 @@
VG_(acquire_BigLock)(tid, "thread_wrapper");
if (0)
- VG_(printf)("thread tid %d started: stack = %p\n",
- tid, &tid);
+ VG_(printf)("thread tid %u started: stack = %p\n",
+ tid, (void *)&tid);
/* Make sure error reporting is enabled in the new thread. */
tst->err_disablement_level = 0;
@@ -122,8 +122,8 @@
vg_assert(VG_(is_running_thread)(tid));
VG_(debugLog)(1, "syswrap-darwin",
- "thread_wrapper(tid=%lld): done\n",
- (ULong)tidW);
+ "thread_wrapper(tid=%u): done\n",
+ tid);
/* Return to caller, still holding the lock. */
return ret;
@@ -161,7 +161,7 @@
}
}
- VG_(debugLog)( 2, "syswrap-darwin", "stack for tid %d at %p; init_SP=%p\n",
+ VG_(debugLog)( 2, "syswrap-darwin", "stack for tid %u at %p; init_SP=%p\n",
tid,
(void*)tst->os_state.valgrind_stack_base,
(void*)tst->os_state.valgrind_stack_init_SP );
@@ -189,8 +189,8 @@
ThreadState* tst;
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): pre-thread_wrapper\n",
- (ULong)tidW);
+ "run_a_thread_NORETURN(tid=%u): pre-thread_wrapper\n",
+ tid);
tst = VG_(get_ThreadState)(tid);
vg_assert(tst);
@@ -199,8 +199,8 @@
src = thread_wrapper(tid);
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): post-thread_wrapper\n",
- (ULong)tidW);
+ "run_a_thread_NORETURN(tid=%u): post-thread_wrapper\n",
+ tid);
c = VG_(count_living_threads)();
vg_assert(c >= 1); /* stay sane */
@@ -222,9 +222,9 @@
);
VG_(debugLog)(
1, "syswrap-linux",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"WARNING: exiting thread has err_disablement_level = %u\n",
- (ULong)tidW, tst->err_disablement_level
+ tid, tst->err_disablement_level
);
}
tst->err_disablement_level = 0;
@@ -232,9 +232,9 @@
if (c == 1) {
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"last one standing\n",
- (ULong)tidW);
+ tid);
/* We are the last one standing. Keep hold of the lock and
carry on to show final tool results, then exit the entire system.
@@ -246,9 +246,9 @@
mach_msg_header_t msg;
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"not last one standing\n",
- (ULong)tidW);
+ tid);
/* OK, thread is dead, but others still exist. Just exit. */
@@ -997,8 +997,8 @@
if (0 || VG_(clo_trace_syscalls)) {
VG_(debugLog)(0, "syswrap-darwin",
- "sync_mappings (%s) (\"%s\", \"%s\", 0x%llx)\n",
- show_CheckHowOften(check), when, where, (ULong)num);
+ "sync_mappings (%s) (\"%s\", \"%s\", 0x%lx)\n",
+ show_CheckHowOften(check), when, where, num);
}
// 16 is enough for most cases, but small enough that overflow happens
@@ -1108,12 +1108,12 @@
case VKI_DTRACEHIOC_REMOVE:
case VKI_BIOCFLUSH:
case VKI_BIOCPROMISC:
- PRINT("ioctl ( %ld, 0x%lx )",ARG1,ARG2);
+ PRINT("ioctl ( %lu, 0x%lx )", ARG1, ARG2);
PRE_REG_READ2(long, "ioctl",
unsigned int, fd, unsigned int, request);
return;
default:
- PRINT("ioctl ( %ld, 0x%lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("ioctl ( %lu, 0x%lx, %#lx )", ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "ioctl",
unsigned int, fd, unsigned int, request, unsigned long, arg);
}
@@ -1542,7 +1542,7 @@
case VKI_F_GETFD:
case VKI_F_GETFL:
case VKI_F_GETOWN:
- PRINT("fcntl ( %ld, %ld )", ARG1,ARG2);
+ PRINT("fcntl ( %lu, %lu )", ARG1,ARG2);
PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd);
break;
@@ -1551,7 +1551,7 @@
case VKI_F_SETFD:
case VKI_F_SETFL:
case VKI_F_SETOWN:
- PRINT("fcntl[ARG3=='arg'] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='arg'] ( %lu, %lu, %lu )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd, unsigned long, arg);
break;
@@ -1560,7 +1560,7 @@
case VKI_F_GETLK:
case VKI_F_SETLK:
case VKI_F_SETLKW:
- PRINT("fcntl[ARG3=='lock'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='lock'] ( %lu, %lu, %#lx )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct flock64 *, lock);
@@ -1570,7 +1570,7 @@
break;
# if DARWIN_VERS >= DARWIN_10_10
case VKI_F_SETLKWTIMEOUT:
- PRINT("fcntl[ARG3=='locktimeout'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='locktimeout'] ( %lu, %lu, %#lx )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct flocktimeout *, lock);
@@ -1586,13 +1586,13 @@
case VKI_F_FREEZE_FS:
case VKI_F_THAW_FS:
case VKI_F_GLOBAL_NOCACHE:
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG1));
+ PRINT("fcntl ( %lu, %s, %lu )", ARG1, name_for_fcntl(ARG1), ARG2);
PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd);
break;
// struct fstore
case VKI_F_PREALLOCATE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fstore *, fstore);
@@ -1613,7 +1613,7 @@
// off_t
case VKI_F_SETSIZE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_off_t *, offset);
@@ -1621,7 +1621,7 @@
// struct radvisory
case VKI_F_RDADVISE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct vki_radvisory *, radvisory);
@@ -1638,7 +1638,7 @@
// struct fbootstraptransfer
case VKI_F_READBOOTSTRAP:
case VKI_F_WRITEBOOTSTRAP:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fbootstraptransfer *, bootstrap);
@@ -1649,7 +1649,7 @@
// struct log2phys (out)
case VKI_F_LOG2PHYS:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct log2phys *, l2p);
@@ -1659,7 +1659,7 @@
// char[maxpathlen] (out)
case VKI_F_GETPATH:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1669,8 +1669,8 @@
// char[maxpathlen] (in)
case VKI_F_PATHPKG_CHECK:
- PRINT("fcntl ( %ld, %s, %#lx '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
- (char *)ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
+ (HChar *)ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1678,7 +1678,7 @@
break;
case VKI_F_ADDSIGS: /* Add detached signatures (for code signing) */
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG2));
+ PRINT("fcntl ( %lu, %s )", ARG1, name_for_fcntl(ARG2));
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_fsignatures_t *, sigs);
@@ -1697,7 +1697,7 @@
break;
case VKI_F_ADDFILESIGS: /* Add signature from same file (used by dyld for shared libs) */
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG2));
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_fsignatures_t *, sigs);
@@ -1712,8 +1712,8 @@
break;
default:
- PRINT("fcntl ( %ld, %ld [??] )", ARG1, ARG2);
- log_decaying("UNKNOWN fcntl %ld!", ARG2);
+ PRINT("fcntl ( %lu, %lu [??] )", ARG1, ARG2);
+ log_decaying("UNKNOWN fcntl %lu!", ARG2);
break;
}
}
@@ -1774,7 +1774,7 @@
PRE(futimes)
{
- PRINT("futimes ( %ld, %#lx )", ARG1,ARG2);
+ PRINT("futimes ( %ld, %#lx )", SARG1, ARG2);
PRE_REG_READ2(long, "futimes", int, fd, struct timeval *, tvp);
if (!ML_(fd_allowed)(ARG1, "futimes", tid, False)) {
SET_STATUS_Failure( VKI_EBADF );
@@ -1786,14 +1786,14 @@
PRE(semget)
{
- PRINT("semget ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("semget ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "semget", vki_key_t, key, int, nsems, int, semflg);
}
PRE(semop)
{
*flags |= SfMayBlock;
- PRINT("semop ( %ld, %#lx, %lu )",ARG1,ARG2,ARG3);
+ PRINT("semop ( %ld, %#lx, %lu )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "semop",
int, semid, struct sembuf *, sops, vki_size_t, nsoops);
ML_(generic_PRE_sys_semop)(tid, ARG1,ARG2,ARG3);
@@ -1804,23 +1804,23 @@
switch (ARG3) {
case VKI_IPC_STAT:
case VKI_IPC_SET:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, struct semid_ds *, arg);
break;
case VKI_GETALL:
case VKI_SETALL:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, unsigned short *, arg);
break;
case VKI_SETVAL:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, int, arg);
break;
default:
- PRINT("semctl ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("semctl ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "semctl",
int, semid, int, semnum, int, cmd);
break;
@@ -1836,14 +1836,14 @@
{
if (ARG2 & VKI_O_CREAT) {
// 4-arg version
- PRINT("sem_open ( %#lx(%s), %ld, %ld, %ld )",
- ARG1,(char*)ARG1,ARG2,ARG3,ARG4);
+ PRINT("sem_open ( %#lx(%s), %ld, %lu, %lu )",
+ ARG1, (HChar*)ARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(vki_sem_t *, "sem_open",
const char *, name, int, oflag, vki_mode_t, mode,
unsigned int, value);
} else {
// 2-arg version
- PRINT("sem_open ( %#lx(%s), %ld )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sem_open ( %#lx(%s), %ld )", ARG1, (HChar*)ARG1, SARG2);
PRE_REG_READ2(vki_sem_t *, "sem_open",
const char *, name, int, oflag);
}
@@ -1861,7 +1861,7 @@
PRE(sem_unlink)
{
- PRINT("sem_unlink( %#lx(%s) )", ARG1,(char*)ARG1);
+ PRINT("sem_unlink( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(int, "sem_unlink", const char *, name);
PRE_MEM_RASCIIZ( "sem_unlink(name)", ARG1 );
}
@@ -1882,7 +1882,7 @@
PRE(sem_init)
{
- PRINT("sem_init( %#lx, %ld, %ld )", ARG1, ARG2, ARG3);
+ PRINT("sem_init( %#lx, %ld, %lu )", ARG1, SARG2, ARG3);
PRE_REG_READ3(int, "sem_init", vki_sem_t *, sem,
int, pshared, unsigned int, value);
PRE_MEM_WRITE("sem_init(sem)", ARG1, sizeof(vki_sem_t));
@@ -1982,7 +1982,7 @@
PRE(kevent)
{
PRINT("kevent( %ld, %#lx, %ld, %#lx, %ld, %#lx )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(int,"kevent", int,kq,
const struct vki_kevent *,changelist, int,nchanges,
struct vki_kevent *,eventlist, int,nevents,
@@ -2008,7 +2008,7 @@
PRE(kevent64)
{
PRINT("kevent64( %ld, %#lx, %ld, %#lx, %ld, %#lx )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, SARG3, ARG4, SARG5, ARG6);
PRE_REG_READ6(int,"kevent64", int,kq,
const struct vki_kevent64 *,changelist, int,nchanges,
struct vki_kevent64 *,eventlist, int,nevents,
@@ -2076,8 +2076,8 @@
PRE(workq_ops)
{
- PRINT("workq_ops( %ld(%s), %#lx, %ld )", ARG1, workqop_name(ARG1), ARG2,
- ARG3);
+ PRINT("workq_ops( %ld(%s), %#lx, %ld )", SARG1, workqop_name(ARG1), ARG2,
+ SARG3);
PRE_REG_READ3(int,"workq_ops", int,"options", void *,"item",
int,"priority");
@@ -2137,7 +2137,7 @@
PRE(__mac_syscall)
{
PRINT("__mac_syscall( %#lx(%s), %ld, %#lx )",
- ARG1, (HChar*)ARG1, ARG2, ARG3);
+ ARG1, (HChar*)ARG1, SARG2, ARG3);
PRE_REG_READ3(int,"__mac_syscall", char *,"policy",
int,"call", void *,"arg");
@@ -2153,7 +2153,7 @@
ThreadId t;
ThreadState* tst;
- PRINT("darwin exit( %ld )", ARG1);
+ PRINT("darwin exit( %ld )", SARG1);
PRE_REG_READ1(void, "exit", int, status);
tst = VG_(get_ThreadState)(tid);
@@ -2181,7 +2181,7 @@
PRE(sigaction)
{
- PRINT("sigaction ( %ld, %#lx, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("sigaction ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "sigaction",
int, signum, vki_sigaction_toK_t *, act,
vki_sigaction_fromK_t *, oldact);
@@ -2214,7 +2214,7 @@
PRE(__pthread_kill)
{
- PRINT("__pthread_kill ( %ld, %ld )", ARG1, ARG2);
+ PRINT("__pthread_kill ( %#lx, %ld )", ARG1, SARG2);
PRE_REG_READ2(long, "__pthread_kill", vki_pthread_t*, thread, int, sig);
}
@@ -2223,7 +2223,7 @@
{
// arguments are identical to sigprocmask (how, sigset_t*, sigset_t*).
UWord arg1;
- PRINT("__pthread_sigmask ( %ld, %#lx, %#lx )", ARG1, ARG2, ARG3);
+ PRINT("__pthread_sigmask ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "__pthread_sigmask",
int, how, vki_sigset_t *, set, vki_sigset_t *, oldset);
if (ARG2 != 0)
@@ -2268,7 +2268,7 @@
*flags |= SfMayBlock; /* might kill this thread??? */
/* I don't think so -- I think it just changes the cancellation
state. But taking no chances. */
- PRINT("__pthread_canceled ( %ld )", ARG1);
+ PRINT("__pthread_canceled ( %#lx )", ARG1);
PRE_REG_READ1(long, "__pthread_canceled", void*, arg1);
}
@@ -2285,7 +2285,7 @@
PRE(__disable_threadsignal)
{
vki_sigset_t set;
- PRINT("__disable_threadsignal(%ld, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("__disable_threadsignal(%ld, %ld, %ld)", SARG1, SARG2, SARG3);
/* I don't think this really looks at its arguments. So don't
bother to check them. */
@@ -2304,7 +2304,7 @@
PRE(__pthread_chdir)
{
- PRINT("__pthread_chdir ( %#lx(%s) )", ARG1, (char*)ARG1);
+ PRINT("__pthread_chdir ( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(long, "__pthread_chdir", const char *, path);
PRE_MEM_RASCIIZ( "__pthread_chdir(path)", ARG1 );
}
@@ -2313,7 +2313,7 @@
PRE(__pthread_fchdir)
{
- PRINT("__pthread_fchdir ( %ld )", ARG1);
+ PRINT("__pthread_fchdir ( %lu )", ARG1);
PRE_REG_READ1(long, "__pthread_fchdir", unsigned int, fd);
}
@@ -2321,7 +2321,7 @@
PRE(kdebug_trace)
{
PRINT("kdebug_trace(%ld, %ld, %ld, %ld, %ld, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, SARG2, SARG3, SARG4, SARG5, SARG6);
/*
Don't check anything - some clients pass fewer arguments.
PRE_REG_READ6(long, "kdebug_trace",
@@ -2333,20 +2333,20 @@
PRE(seteuid)
{
- PRINT("seteuid(%ld)", ARG1);
+ PRINT("seteuid(%lu)", ARG1);
PRE_REG_READ1(long, "seteuid", vki_uid_t, "uid");
}
PRE(setegid)
{
- PRINT("setegid(%ld)", ARG1);
+ PRINT("setegid(%lu)", ARG1);
PRE_REG_READ1(long, "setegid", vki_uid_t, "uid");
}
PRE(settid)
{
- PRINT("settid(%ld, %ld)", ARG1, ARG2);
+ PRINT("settid(%lu, %lu)", ARG1, ARG2);
PRE_REG_READ2(long, "settid", vki_uid_t, "uid", vki_gid_t, "gid");
}
@@ -2404,7 +2404,7 @@
PRE(getxattr)
{
PRINT("getxattr(%#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld)",
- ARG1, (char *)ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
+ ARG1, (HChar *)ARG1, ARG2, (HChar *)ARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(vki_ssize_t, "getxattr",
const char *, path, char *, name, void *, value,
@@ -2425,7 +2425,7 @@
PRE(fgetxattr)
{
PRINT("fgetxattr(%ld, %#lx(%s), %#lx, %lu, %lu, %ld)",
- ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, (HChar *)ARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(vki_ssize_t, "fgetxattr",
int, fd, char *, name, void *, value,
@@ -2443,7 +2443,7 @@
PRE(setxattr)
{
PRINT("setxattr ( %#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld )",
- ARG1, (char *)ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ ARG1, (HChar *)ARG1, ARG2, (HChar*)ARG2, ARG3, ARG4, ARG5, SARG6 );
PRE_REG_READ6(int, "setxattr",
const char *,"path", char *,"name", void *,"value",
vki_size_t,"size", uint32_t,"position", int,"options" );
@@ -2457,7 +2457,7 @@
PRE(fsetxattr)
{
PRINT( "fsetxattr ( %ld, %#lx(%s), %#lx, %lu, %lu, %ld )",
- ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ SARG1, ARG2, (HChar*)ARG2, ARG3, ARG4, ARG5, SARG6 );
PRE_REG_READ6(int, "fsetxattr",
int,"fd", char *,"name", void *,"value",
vki_size_t,"size", uint32_t,"position", int,"options" );
@@ -2470,7 +2470,7 @@
PRE(removexattr)
{
PRINT( "removexattr ( %#lx(%s), %#lx(%s), %ld )",
- ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3 );
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, SARG3 );
PRE_REG_READ3(int, "removexattr",
const char*, "path", char*, "attrname", int, "options");
PRE_MEM_RASCIIZ( "removexattr(path)", ARG1 );
@@ -2481,7 +2481,7 @@
PRE(fremovexattr)
{
PRINT( "fremovexattr ( %ld, %#lx(%s), %ld )",
- ARG1, ARG2, (HChar*)ARG2, ARG3 );
+ SARG1, ARG2, (HChar*)ARG2, SARG3 );
PRE_REG_READ3(int, "fremovexattr",
int, "fd", char*, "attrname", int, "options");
PRE_MEM_RASCIIZ( "removexattr(attrname)", ARG2 );
@@ -2491,7 +2491,7 @@
PRE(listxattr)
{
PRINT( "listxattr ( %#lx(%s), %#lx, %lu, %ld )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4 );
+ ARG1, (HChar *)ARG1, ARG2, ARG3, SARG4 );
PRE_REG_READ4 (long, "listxattr",
const char *,"path", char *,"namebuf",
vki_size_t,"size", int,"options" );
@@ -2511,7 +2511,7 @@
PRE(flistxattr)
{
PRINT( "flistxattr ( %ld, %#lx, %lu, %ld )",
- ARG1, ARG2, ARG3, ARG4 );
+ SARG1, ARG2, ARG3, SARG4 );
PRE_REG_READ4 (long, "flistxattr",
int, "fd", char *,"namebuf",
vki_size_t,"size", int,"options" );
@@ -2529,7 +2529,7 @@
PRE(shmat)
{
UWord arg2tmp;
- PRINT("shmat ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("shmat ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "shmat",
int, shmid, const void *, shmaddr, int, shmflg);
arg2tmp = ML_(generic_PRE_sys_shmat)(tid, ARG1,ARG2,ARG3);
@@ -2545,7 +2545,7 @@
PRE(shmctl)
{
- PRINT("shmctl ( %ld, %ld, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("shmctl ( %ld, %ld, %#lx )", SARG1, SARG2, ARG3);
PRE_REG_READ3(long, "shmctl",
int, shmid, int, cmd, struct vki_shmid_ds *, buf);
ML_(generic_PRE_sys_shmctl)(tid, ARG1,ARG2,ARG3);
@@ -2569,13 +2569,13 @@
PRE(shmget)
{
- PRINT("shmget ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("shmget ( %ld, %lu, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "shmget", vki_key_t, key, vki_size_t, size, int, shmflg);
}
PRE(shm_open)
{
- PRINT("shm_open(%#lx(%s), %ld, %ld)", ARG1, (char *)ARG1, ARG2, ARG3);
+ PRINT("shm_open(%#lx(%s), %ld, %lu)", ARG1, (HChar *)ARG1, SARG2, ARG3);
PRE_REG_READ3(long, "shm_open",
const char *,"name", int,"flags", vki_mode_t,"mode");
@@ -2591,14 +2591,14 @@
SET_STATUS_Failure( VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
- ML_(record_fd_open_with_given_name)(tid, RES, (char*)ARG1);
+ ML_(record_fd_open_with_given_name)(tid, RES, (HChar*)ARG1);
}
}
PRE(shm_unlink)
{
*flags |= SfMayBlock;
- PRINT("shm_unlink ( %#lx(%s) )", ARG1,(char*)ARG1);
+ PRINT("shm_unlink ( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(long, "shm_unlink", const char *, pathname);
PRE_MEM_RASCIIZ( "shm_unlink(pathname)", ARG1 );
}
@@ -2614,7 +2614,7 @@
PRE(stat_extended)
{
PRINT("stat_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "stat_extended", char *, file_name, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "stat_extended(file_name)", ARG1 );
@@ -2635,7 +2635,7 @@
PRE(lstat_extended)
{
PRINT("lstat_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "lstat_extended", char *, file_name, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "lstat_extended(file_name)", ARG1 );
@@ -2656,7 +2656,7 @@
PRE(fstat_extended)
{
PRINT("fstat_extended( %ld, %#lx, %#lx, %#lx )",
- ARG1, ARG2, ARG3, ARG4);
+ SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "fstat_extended", int, fd, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_WRITE( "fstat_extended(buf)", ARG2, sizeof(struct vki_stat) );
@@ -2676,7 +2676,7 @@
PRE(stat64_extended)
{
PRINT("stat64_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "stat64_extended", char *, file_name, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "stat64_extended(file_name)", ARG1 );
@@ -2697,7 +2697,7 @@
PRE(lstat64_extended)
{
PRINT("lstat64_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "lstat64_extended", char *, file_name, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "lstat64_extended(file_name)", ARG1 );
@@ -2718,7 +2718,7 @@
PRE(fstat64_extended)
{
PRINT("fstat64_extended( %ld, %#lx, %#lx, %#lx )",
- ARG1, ARG2, ARG3, ARG4);
+ SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "fstat64_extended", int, fd, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_WRITE( "fstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2739,7 +2739,7 @@
{
/* DDD: Note: this is not really correct. Handling of
chmod_extended is broken in the same way. */
- PRINT("fchmod_extended ( %ld, %ld, %ld, %ld, %#lx )",
+ PRINT("fchmod_extended ( %lu, %lu, %lu, %lu, %#lx )",
ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(long, "fchmod_extended",
unsigned int, fildes,
@@ -2782,9 +2782,9 @@
{
/* DDD: Note: this is not really correct. Handling of
{,f}chmod_extended is broken in the same way. */
- PRINT("open_extended ( %#lx(%s), 0x%lx, %ld, %ld, %ld, %#lx )",
+ PRINT("open_extended ( %#lx(%s), %ld, %lu, %lu, %lu, %#lx )",
ARG1, ARG1 ? (HChar*)ARG1 : "(null)",
- ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "open_extended",
char*, path,
int, flags,
@@ -2827,7 +2827,7 @@
PRE(access_extended)
{
PRINT("access_extended( %#lx(%s), %lu, %#lx, %lu )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
// XXX: the accessx_descriptor struct contains padding, so this can cause
// unnecessary undefined value errors. But you arguably shouldn't be
// passing undefined values to the kernel anyway...
@@ -2887,7 +2887,7 @@
PRE(chflags)
{
- PRINT("chflags ( %#lx(%s), %lu )", ARG1, (char *)ARG1, ARG2);
+ PRINT("chflags ( %#lx(%s), %lu )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(int, "chflags", const char *,path, unsigned int,flags);
PRE_MEM_RASCIIZ("chflags(path)", ARG1);
@@ -2896,7 +2896,7 @@
PRE(fchflags)
{
- PRINT("fchflags ( %ld, %lu )", ARG1, ARG2);
+ PRINT("fchflags ( %ld, %lu )", SARG1, ARG2);
PRE_REG_READ2(int, "fchflags", int,fd, unsigned int,flags);
// GrP fixme sanity-check flags value?
@@ -2904,7 +2904,7 @@
PRE(stat64)
{
- PRINT("stat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
+ PRINT("stat64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("stat64(path)", ARG1);
PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2916,7 +2916,7 @@
PRE(lstat64)
{
- PRINT("lstat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
+ PRINT("lstat64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("lstat64(path)", ARG1);
PRE_MEM_WRITE( "lstat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2928,7 +2928,7 @@
PRE(fstat64)
{
- PRINT("fstat64 ( %ld, %#lx )", ARG1,ARG2);
+ PRINT("fstat64 ( %lu, %#lx )", ARG1,ARG2);
PRE_REG_READ2(long, "fstat", unsigned int, fd, struct stat64 *, buf);
PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) );
}
@@ -2939,7 +2939,7 @@
PRE(getfsstat)
{
- PRINT("getfsstat(%#lx, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("getfsstat(%#lx, %ld, %ld)", ARG1, SARG2, SARG3);
PRE_REG_READ3(int, "getfsstat",
struct vki_statfs *, buf, int, bufsize, int, flags);
if (ARG1) {
@@ -2957,7 +2957,7 @@
PRE(getfsstat64)
{
- PRINT("getfsstat64(%#lx, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("getfsstat64(%#lx, %ld, %ld)", ARG1, SARG2, SARG3);
PRE_REG_READ3(int, "getfsstat64",
struct vki_statfs64 *, buf, int, bufsize, int, flags);
if (ARG1) {
@@ -2980,7 +2980,7 @@
// by 'data'.
*flags |= SfMayBlock;
PRINT("sys_mount( %#lx(%s), %#lx(%s), %#lx, %#lx )",
- ARG1,(char*)ARG1, ARG2,(char*)ARG2, ARG3, ARG4);
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3, ARG4);
PRE_REG_READ4(long, "mount",
const char *, type, const char *, dir,
int, flags, void *, data);
@@ -3170,7 +3170,7 @@
PRE(getattrlist)
{
PRINT("getattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "getattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -3198,7 +3198,7 @@
PRE(setattrlist)
{
PRINT("setattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "setattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -3210,8 +3210,8 @@
PRE(getdirentriesattr)
{
- PRINT("getdirentriesattr(%ld, %#lx, %#lx, %ld, %#lx, %#lx, %#lx, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
+ PRINT("getdirentriesattr(%ld, %#lx, %#lx, %lu, %#lx, %#lx, %#lx, %lu)",
+ SARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
PRE_REG_READ8(int, "getdirentriesattr",
int,fd, struct vki_attrlist *,attrList,
void *,attrBuf, size_t,attrBufSize,
@@ -3253,7 +3253,7 @@
PRE(exchangedata)
{
PRINT("exchangedata(%#lx(%s), %#lx(%s), %lu)",
- ARG1, (char*)ARG1, ARG2, (char*)ARG2, ARG3);
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3);
PRE_REG_READ3(int, "exchangedata",
char *, path1, char *, path2, unsigned long, options);
PRE_MEM_RASCIIZ( "exchangedata(path1)", ARG1 );
@@ -3262,8 +3262,8 @@
PRE(fsctl)
{
- PRINT("fsctl ( %#lx(%s), %ld, %#lx, %ld )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ PRINT("fsctl ( %#lx(%s), %lu, %#lx, %lu )",
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4( long, "fsctl",
char *,"path", unsigned int,"request",
void *,"data", unsigned int,"options");
@@ -3321,7 +3321,7 @@
PRE(initgroups)
{
- PRINT("initgroups(%s, %#lx, %lu)", (char *)ARG1, ARG2, ARG3);
+ PRINT("initgroups(%s, %#lx, %lu)", (HChar *)ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "initgroups",
int, setlen, vki_gid_t *, gidset, vki_uid_t, gmuid);
PRE_MEM_READ("gidset", ARG2, ARG1 * sizeof(vki_gid_t));
@@ -3579,7 +3579,7 @@
PRE(socket)
{
- PRINT("socket ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("socket ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "socket", int, domain, int, type, int, protocol);
}
@@ -3595,7 +3595,7 @@
PRE(setsockopt)
{
PRINT("setsockopt ( %ld, %ld, %ld, %#lx, %ld )",
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ SARG1, SARG2, SARG3, ARG4, SARG5);
PRE_REG_READ5(long, "setsockopt",
int, s, int, level, int, optname,
const void *, optval, vki_socklen_t, optlen);
@@ -3608,7 +3608,7 @@
Addr optval_p = ARG4;
Addr optlen_p = ARG5;
PRINT("getsockopt ( %ld, %ld, %ld, %#lx, %#lx )",
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ SARG1, SARG2, SARG3, ARG4, ARG5);
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, vki_socklen_t *, optlen);
@@ -3641,7 +3641,7 @@
PRE(connect)
{
*flags |= SfMayBlock;
- PRINT("connect ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("connect ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "connect",
int, sockfd, struct sockaddr *, serv_addr, int, addrlen);
ML_(generic_PRE_sys_connect)(tid, ARG1,ARG2,ARG3);
@@ -3651,9 +3651,9 @@
PRE(accept)
{
*flags |= SfMayBlock;
- PRINT("accept ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("accept ( %ld, %#lx, %#lx )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "accept",
- int, s, struct sockaddr *, addr, int, *addrlen);
+ int, s, struct sockaddr *, addr, int *, addrlen);
ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
}
@@ -3669,7 +3669,7 @@
PRE(mkfifo)
{
*flags |= SfMayBlock;
- PRINT("mkfifo ( %#lx(%s), %lld )",ARG1,(char *)ARG1,(ULong)ARG2);
+ PRINT("mkfifo ( %#lx(%s), %lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "mkfifo", const char *, path, vki_mode_t, mode);
PRE_MEM_RASCIIZ( "mkfifo(path)", ARG1 );
}
@@ -3690,7 +3690,7 @@
{
*flags |= SfMayBlock;
PRINT("sendto ( %ld, %s, %ld, %lu, %#lx, %ld )",
- ARG1,(char *)ARG2,ARG3,ARG4,ARG5,ARG6);
+ SARG1, (HChar *)ARG2, SARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(long, "sendto",
int, s, const void *, msg, int, len,
unsigned int, flags,
@@ -3702,7 +3702,7 @@
{
#if VG_WORDSIZE == 4
PRINT("sendfile(%ld, %ld, %llu, %#lx, %#lx, %ld)",
- ARG1, ARG2, LOHI64(ARG3, ARG4), ARG5, ARG6, ARG7);
+ SARG1, SARG2, LOHI64(ARG3, ARG4), ARG5, ARG6, SARG7);
PRE_REG_READ7(long, "sendfile",
int, fromfd, int, tofd,
@@ -3711,8 +3711,8 @@
PRE_MEM_WRITE("sendfile(nwritten)", ARG5, sizeof(vki_uint64_t));
if (ARG6) PRE_MEM_WRITE("sendfile(sf_header)", ARG6, sizeof(struct sf_hdtr));
#else
- PRINT("sendfile(%ld, %ld, %ld, %#lx, %#lx, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ PRINT("sendfile(%ld, %ld, %lu, %#lx, %#lx, %ld)",
+ SARG1, SARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(long, "sendfile",
int, fromfd, int, tofd,
@@ -3739,7 +3739,7 @@
{
*flags |= SfMayBlock;
PRINT("recvfrom ( %ld, %#lx, %ld, %lu, %#lx, %#lx )",
- ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
+ SARG1, ARG2, SARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "recvfrom",
int, s, void *, buf, int, len, unsigned int, flags,
struct sockaddr *, from, int *, fromlen);
@@ -3757,7 +3757,7 @@
PRE(sendmsg)
{
*flags |= SfMayBlock;
- PRINT("sendmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("sendmsg ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "sendmsg",
int, s, const struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_sendmsg)(tid, "msg", (struct vki_msghdr *)ARG2);
@@ -3767,7 +3767,7 @@
PRE(recvmsg)
{
*flags |= SfMayBlock;
- PRINT("recvmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("recvmsg ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "recvmsg", int, s, struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_recvmsg)(tid, "msg", (struct vki_msghdr *)ARG2);
}
@@ -3781,14 +3781,14 @@
PRE(shutdown)
{
*flags |= SfMayBlock;
- PRINT("shutdown ( %ld, %ld )",ARG1,ARG2);
+ PRINT("shutdown ( %ld, %ld )", SARG1, SARG2);
PRE_REG_READ2(int, "shutdown", int, s, int, how);
}
PRE(bind)
{
- PRINT("bind ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("bind ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "bind",
int, sockfd, struct sockaddr *, my_addr, int, addrlen);
ML_(generic_PRE_sys_bind)(tid, ARG1,ARG2,ARG3);
@@ -3797,14 +3797,14 @@
PRE(listen)
{
- PRINT("listen ( %ld, %ld )",ARG1,ARG2);
+ PRINT("listen ( %ld, %ld )", SARG1, SARG2);
PRE_REG_READ2(long, "listen", int, s, int, backlog);
}
PRE(getsockname)
{
- PRINT("getsockname ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("getsockname ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "getsockname",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getsockname)(tid, ARG1,ARG2,ARG3);
@@ -3820,7 +3820,7 @@
PRE(getpeername)
{
- PRINT("getpeername ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("getpeername ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "getpeername",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getpeername)(tid, ARG1,ARG2,ARG3);
@@ -3836,7 +3836,7 @@
PRE(socketpair)
{
- PRINT("socketpair ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("socketpair ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "socketpair",
int, d, int, type, int, protocol, int *, sv);
ML_(generic_PRE_sys_socketpair)(tid, ARG1,ARG2,ARG3,ARG4);
@@ -3899,7 +3899,7 @@
PRE(getlogin)
{
- PRINT("getlogin ( %#lx, %ld )", ARG1, ARG2);
+ PRINT("getlogin ( %#lx, %lu )", ARG1, ARG2);
PRE_REG_READ2(long, "getlogin",
char *,"namebuf", unsigned int,"namelen");
@@ -3914,7 +3914,7 @@
PRE(ptrace)
{
- PRINT("ptrace ( %ld, %ld, %#lx, %ld )", ARG1, ARG2, ARG3, ARG4);
+ PRINT("ptrace ( %ld, %ld, %#lx, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "ptrace",
int,"request", vki_pid_t,"pid",
vki_caddr_t,"addr", int,"data");
@@ -3946,7 +3946,7 @@
PRE(lseek)
{
- PRINT("lseek ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
+ PRINT("lseek ( %lu, %ld, %ld )", ARG1, SARG2, SARG3);
PRE_REG_READ4(vki_off_t, "lseek",
unsigned int,fd, int,offset_hi, int,offset_lo,
unsigned int,whence);
@@ -3955,7 +3955,7 @@
PRE(pathconf)
{
- PRINT("pathconf(%#lx(%s), %ld)", ARG1,(char *)ARG1,ARG2);
+ PRINT("pathconf(%#lx(%s), %ld)", ARG1, (HChar *)ARG1, SARG2);
PRE_REG_READ2(long,"pathconf", const char *,"path", int,"name");
PRE_MEM_RASCIIZ("pathconf(path)", ARG1);
}
@@ -3963,7 +3963,7 @@
PRE(fpathconf)
{
- PRINT("fpathconf(%ld, %ld)", ARG1,ARG2);
+ PRINT("fpathconf(%ld, %ld)", SARG1, SARG2);
PRE_REG_READ2(long,"fpathconf", int,"fd", int,"name");
if (!ML_(fd_allowed)(ARG1, "fpathconf", tid, False))
@@ -3973,7 +3973,7 @@
PRE(getdirentries)
{
- PRINT("getdirentries(%ld, %#lx, %ld, %#lx)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries(%ld, %#lx, %ld, %#lx)", SARG1, ARG2, SARG3, ARG4);
PRE_REG_READ4(int, "getdirentries",
int, fd, char *, buf, int, nbytes, long *, basep);
PRE_MEM_WRITE("getdirentries(basep)", ARG4, sizeof(long));
@@ -3990,7 +3990,7 @@
PRE(getdirentries64)
{
- PRINT("getdirentries64(%ld, %#lx, %lu, %#lx)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries64(%ld, %#lx, %lu, %#lx)", SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(vki_ssize_t, "getdirentries",
int,fd, char *,buf, vki_size_t,nbytes, vki_off_t *,basep);
/* JRS 18-Nov-2014: it appears that sometimes |basep| doesn't point
@@ -4015,7 +4015,7 @@
PRE(statfs64)
{
- PRINT("statfs64 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
+ PRINT("statfs64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "statfs64", const char *, path, struct statfs64 *, buf);
PRE_MEM_RASCIIZ( "statfs64(path)", ARG1 );
PRE_MEM_WRITE( "statfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -4028,7 +4028,7 @@
PRE(fstatfs64)
{
- PRINT("fstatfs64 ( %ld, %#lx )",ARG1,ARG2);
+ PRINT("fstatfs64 ( %lu, %#lx )", ARG1, ARG2);
PRE_REG_READ2(long, "fstatfs64",
unsigned int, fd, struct statfs *, buf);
PRE_MEM_WRITE( "fstatfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -4040,7 +4040,7 @@
PRE(csops)
{
- PRINT("csops ( %ld, %#lx, %#lx, %lu )", ARG1, ARG2, ARG3, ARG4);
+ PRINT("csops ( %ld, %#lx, %#lx, %lu )", SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "csops",
vki_pid_t, pid, uint32_t, ops,
void *, useraddr, vki_size_t, usersize);
@@ -4065,7 +4065,7 @@
PRE(auditon)
{
- PRINT("auditon ( %ld, %#lx, %ld )", ARG1, ARG2, ARG3);
+ PRINT("auditon ( %ld, %#lx, %lu )", SARG1, ARG2, ARG3);
PRE_REG_READ3(int,"auditon",
int,"cmd", void*,"data", unsigned int,"length");
@@ -4181,7 +4181,7 @@
PRE(getaudit_addr)
{
- PRINT("getaudit_addr(%#lx, %lu)", ARG1, ARG2);
+ PRINT("getaudit_addr(%#lx, %ld)", ARG1, SARG2);
PRE_REG_READ1(void*, "auditinfo_addr", int, "length");
PRE_MEM_WRITE("getaudit_addr(auditinfo_addr)", ARG1, ARG2);
}
@@ -4197,8 +4197,8 @@
if (0) VG_(am_do_sync_check)("(PRE_MMAP)",__FILE__,__LINE__);
#if VG_WORDSIZE == 4
- PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %lld )",
- ARG1, ARG2, ARG3, ARG4, ARG5, LOHI64(ARG6, ARG7) );
+ PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %llu )",
+ ARG1, ARG2, SARG3, SARG4, SARG5, LOHI64(ARG6, ARG7) );
PRE_REG_READ7(Addr, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
unsigned long,offset_hi, unsigned long,offset_lo);
@@ -4208,7 +4208,7 @@
// (Off64T)LOHI64(ARG6, ARG7) );
#else
PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %ld )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
+ ARG1, ARG2, SARG3, SARG4, SARG5, SARG6 );
PRE_REG_READ6(long, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
Off64T,offset);
@@ -4305,7 +4305,7 @@
UWord newp = ARG5;
UWord newlen = ARG6;
- PRINT( "__sysctl ( %#lx, %ld, %#lx, %#lx, %#lx, %ld )",
+ PRINT( "__sysctl ( %#lx, %lu, %#lx, %#lx, %#lx, %#lx )",
name, namelen, oldp, oldlenp, newp, newlen );
PRE_REG_READ6(int, "__sysctl", int*, name, unsigned int, namelen,
@@ -4367,7 +4367,7 @@
PRE(sigprocmask)
{
UWord arg1;
- PRINT("sigprocmask ( %ld, %#lx, %#lx )", ARG1, ARG2, ARG3);
+ PRINT("sigprocmask ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "sigprocmask",
int, how, vki_sigset_t *, set, vki_sigset_t *, oldset);
if (ARG2 != 0)
@@ -4922,7 +4922,7 @@
Reply *reply = (Reply *)ARG1;
if (!reply->RetCode) {
- PRINT("page size %llu", (ULong)reply->out_page_size);
+ PRINT("page size %llu", (ULong)reply->out_page_size);
} else {
PRINT("mig return %d", reply->RetCode);
}
@@ -6329,7 +6329,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_allocate (%s, at %#llx, size %lld, flags %#x)",
+ PRINT("vm_allocate (%s, at %#llx, size %llu, flags %#x)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size, req->flags);
@@ -6386,7 +6386,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_deallocate(%s, at %#llx, size %lld)",
+ PRINT("vm_deallocate(%s, at %#llx, size %llu)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size);
@@ -6444,7 +6444,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_protect(%s, at %#llx, size %lld, set_max %d, prot %d)",
+ PRINT("vm_protect(%s, at %#llx, size %llu, set_max %d, prot %d)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
req->set_maximum, req->new_protection);
@@ -6505,7 +6505,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_inherit(%s, at %#llx, size %lld, value %d)",
+ PRINT("vm_inherit(%s, at %#llx, size %llu, value %d)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
req->new_inheritance);
@@ -6759,7 +6759,7 @@
Request *req = (Request *)ARG1;
// GrP fixme check these
- PRINT("vm_map(in %s, at %#llx, size %lld, from %s ...)",
+ PRINT("vm_map(in %s, at %#llx, size %llu, from %s ...)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
name_for_port(req->object.name));
@@ -6827,12 +6827,12 @@
mach_port_name_t source_task = req->src_task.name;
if (source_task == mach_task_self()) {
PRINT("vm_remap(mach_task_self(), "
- "to %#llx size %lld, from mach_task_self() at %#llx, ...)",
+ "to %#llx size %llu, from mach_task_self() at %#llx, ...)",
(ULong)req->target_address,
(ULong)req->size, (ULong)req->src_address);
} else {
PRINT("vm_remap(mach_task_self(), "
- "to %#llx size %lld, from task %u at %#llx, ...)",
+ "to %#llx size %llu, from task %u at %#llx, ...)",
(ULong)req->target_address, (ULong)req->size,
source_task, (ULong)req->src_address);
}
@@ -6983,7 +6983,7 @@
PRINT("mach_vm_purgable_control(%s, 0x%llx, %d, %d)",
name_for_port(MACH_REMOTE),
- (unsigned long long)req->address, req->control, req->state);
+ (ULong)req->address, req->control, req->state);
// GrP fixme verify address?
@@ -7024,7 +7024,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_allocate (%s, at 0x%llx, size %lld, flags 0x%x)",
+ PRINT("mach_vm_allocate (%s, at 0x%llx, size %llu, flags 0x%x)",
name_for_port(MACH_REMOTE),
req->address, req->size, req->flags);
@@ -7080,7 +7080,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_deallocate(%s, at 0x%llx, size %lld)",
+ PRINT("mach_vm_deallocate(%s, at 0x%llx, size %llu)",
name_for_port(MACH_REMOTE),
req->address, req->size);
@@ -7138,7 +7138,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_protect(%s, at 0x%llx, size %lld, set_max %d, prot %d)",
+ PRINT("mach_vm_protect(%s, at 0x%llx, size %llu, set_max %d, prot %d)",
name_for_port(MACH_REMOTE), req->address, req->size,
req->set_maximum, req->new_protection);
@@ -8650,7 +8650,7 @@
PRE(syscall_thread_switch)
{
PRINT("syscall_thread_switch(%s, %ld, %ld)",
- name_for_port(ARG1), ARG2, ARG3);
+ name_for_port(ARG1), SARG2, SARG3);
PRE_REG_READ3(long, "syscall_thread_switch",
mach_port_t,"thread", int,"option", natural_t,"timeout");
@@ -8735,7 +8735,7 @@
int timeout, int relative,
time_t tv_sec, time_t tv_nsec */
PRINT("__semwait_signal(wait %s, signal %s, %ld, %ld, %lds:%ldns)",
- name_for_port(ARG1), name_for_port(ARG2), ARG3, ARG4, ARG5, ARG6);
+ name_for_port(ARG1), name_for_port(ARG2), SARG3, SARG4, SARG5, SARG6);
PRE_REG_READ6(long, "__semwait_signal",
int,"cond_sem", int,"mutex_sem",
int,"timeout", int,"relative",
@@ -8767,7 +8767,7 @@
PRE(task_for_pid)
{
- PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), ARG2, ARG3);
+ PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), SARG2, ARG3);
PRE_REG_READ3(long, "task_for_pid",
mach_port_t,"target",
vki_pid_t, "pid", mach_port_t *,"task");
@@ -8923,7 +8923,7 @@
PRE(swtch_pri)
{
- PRINT("swtch_pri ( %ld )", ARG1);
+ PRINT("swtch_pri ( %ld )", SARG1);
PRE_REG_READ1(long, "swtch_pri", int,"pri");
*flags |= SfMayBlock;
@@ -9586,7 +9586,7 @@
{
// int necp_match_policy(uint8_t *parameters, size_t parameters_size,
// struct necp_aggregate_result *returned_result)
- PRINT("necp_match_policy(FIXME)(%lx,%ld, %lx)", ARG1, ARG2, ARG3);
+ PRINT("necp_match_policy(FIXME)(%lx,%lu, %lx)", ARG1, ARG2, ARG3);
PRE_REG_READ3(int, "necp_match_policy", uint8_t*, parameters,
size_t, parameters_size, struct necp_aggregate_result*,
returned_result);
@@ -9604,14 +9604,14 @@
UWord oldp = ARG3;
UWord oldlenp = ARG4;
UWord newp = ARG5;
- UWord newlen = ARG6;
+ UWord newlen = ARG6; // FIXME: or newlenp ??
- PRINT( "sysctlbyname ( %#lx,%ld, %#lx,%#lx, %#lx,%ld )",
+ PRINT( "sysctlbyname ( %#lx,%lu, %#lx,%#lx, %#lx,%lu )",
...
[truncated message content] |
|
From: Florian K. <fl...@ei...> - 2015-08-08 21:25:09
|
On 08.08.2015 16:45, Дмитрий Дьяченко wrote: > Why do not build in-tree MPC/MPFR/GMP? > I.e., download and unpack tarballs into gcc-topdir. > > gcc themself will check prerequisites, build-script will be simpler... > May be you can use ./gcc/contrib/download_prerequisite script also. > I didn't know about it. Thanks for the pointer. I changed the script Florian |
|
From: <sv...@va...> - 2015-08-08 21:23:02
|
Author: florian
Date: Sat Aug 8 22:22:55 2015
New Revision: 15509
Log:
Simplify the build script a lot by using the download_prerequisites
script and build prerequisites in tree. Suggested by Dimitry <di...@gm...>
Also add --disable-bootstrap and some verbiage as to how to speed
up the GCC build even further.
Modified:
trunk/auxprogs/build-gcc
Modified: trunk/auxprogs/build-gcc
==============================================================================
--- trunk/auxprogs/build-gcc (original)
+++ trunk/auxprogs/build-gcc Sat Aug 8 22:22:55 2015
@@ -1,19 +1,26 @@
#!/bin/sh -e
-# Simple script to build GCC including its prerequisites.
-# "Simple" means: no error recovery, no signature verification,
-# no checking whether the prerequisites are new enough for the
-# chosen GCC version. You need to figure this out by yourself.
+# Simple script to build GCC natively including its prerequisites.
#
-# Define the following 6 variables:
+# Depending on your needs you maybe able to speed up the GCC build:
+#
+# (a) Do not build a c++ compiler
+# c++ is only needed for "make check" and running regression tests
+# --> choose LANGUEGES=c below
+# (b) Do not build a compiler that can produce 32-bit executables
+# on a 64-bit platform
+# --> choose MULTILIB=--disable-multilib below
+#
+# Define the following 5 variables:
BUILD_DIR=/tmp/build-gcc
INSTALL_DIR=/tmp/install
GCC_VERSION=5.1.0
-GMP_VERSION=5.1.3
-MPC_VERSION=1.0.3
-MPFR_VERSION=3.1.3
+LANGUAGES=c,c++
+MULTILIB=
+#LANGUAGES=c
+#MULTILIB=--disable-multilib
#-----------------------------------------------------------
# No changes should be needed below this line
@@ -25,58 +32,21 @@
cd $BUILD_DIR
# Download tarballs
-echo "...downloading tarballs"
+echo "...downloading tarball"
wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz
-
-# Build GMP
-echo "...building GMP"
-cd $BUILD_DIR
-rm -rf gmp-$GMP_VERSION
-tar xf gmp-$GMP_VERSION.tar.bz2
-cd gmp-$GMP_VERSION
-./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log
-make -s 2>&1 > gmp-make.log
-make -s install 2>&1 > gmp-install.log
-mv gmp-config.log gmp-make.log gmp-install.log ..
-
-# Build MPFR
-echo "...building MPFR"
-cd $BUILD_DIR
-rm -rf mpfr-$MPFR_VERSION
-tar xf mpfr-$MPFR_VERSION.tar.bz2
-cd mpfr-$MPFR_VERSION
-./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpfr-config.log
-make -s 2>&1 > mpfr-make.log
-make -s install 2>&1 > mpfr-install.log
-mv mpfr-config.log mpfr-make.log mpfr-install.log ..
-
-# Build MPC
-echo "...building MPC"
-cd $BUILD_DIR
-rm -rf mpc-$MPC_VERSION
-tar xf mpc-$MPC_VERSION.tar.gz
-cd mpc-$MPC_VERSION
-./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpc-config.log
-make -s 2>&1 > mpc-make.log
-make -s install 2>&1 > mpc-install.log
-mv mpc-config.log mpc-make.log mpc-install.log ..
# Build GCC
echo "...building GCC"
-cd $BUILD_DIR
rm -rf gcc-$GCC_VERSION
tar xf gcc-$GCC_VERSION.tar.bz2
+cd gcc-$GCC_VERSION
+./contrib/download_prerequisites
+cd ..
rm -rf objdir
mkdir objdir
cd objdir
-../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \
- --enable-languages=c,c++ \
- --with-mpfr=$INSTALL_DIR \
- --with-mpc=$INSTALL_DIR \
- --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log
+../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR --disable-bootstrap \
+ $MULTILIB --enable-languages=$LANGUAGES 2>&1 > gcc-config.log
make -s 2>&1 > gcc-make.log
make -s install 2>&1 > gcc-install.log
mv gcc-config.log gcc-make.log gcc-install.log ..
|
|
From: <sv...@va...> - 2015-08-08 21:08:39
|
Author: florian
Date: Sat Aug 8 22:08:31 2015
New Revision: 15508
Log:
Fix two more format inconsistencies found on s390. The one
in m_stacktrace.c also existed for other architectures. Fixed
as well.
Modified:
trunk/coregrind/m_machine.c
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_machine.c
==============================================================================
--- trunk/coregrind/m_machine.c (original)
+++ trunk/coregrind/m_machine.c Sat Aug 8 22:08:31 2015
@@ -1411,7 +1411,7 @@
HChar *p = fac_str;
p += VG_(sprintf)(p, "machine %4d ", model);
for (i=0; i < sizeof fac_hwcaps / sizeof fac_hwcaps[0]; ++i) {
- p += VG_(sprintf)(p, " %s %1d", fac_hwcaps[i].name,
+ p += VG_(sprintf)(p, " %s %1u", fac_hwcaps[i].name,
fac_hwcaps[i].installed);
}
*p++ = '\0';
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Sat Aug 8 22:08:31 2015
@@ -730,7 +730,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx ip=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
@@ -995,7 +995,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("\nmax_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("\nmax_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx r15=0x%lx r13=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.r15, uregs.r13);
@@ -1139,7 +1139,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("\nmax_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("\nmax_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx PC=0x%lx SP=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp);
@@ -1228,7 +1228,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx IA=0x%lx SP=0x%lx FP=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.ia, uregs.sp,uregs.fp);
@@ -1321,7 +1321,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx pc=0x%lx sp=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp, uregs.fp);
@@ -1467,7 +1467,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx pc=0x%lx sp=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp, uregs.fp);
|
|
From: Дмитрий Д. <di...@gm...> - 2015-08-08 14:45:09
|
Why do not build in-tree MPC/MPFR/GMP? I.e., download and unpack tarballs into gcc-topdir. gcc themself will check prerequisites, build-script will be simpler... May be you can use ./gcc/contrib/download_prerequisite script also. Dmitry 08.08.2015 17:07 пользователь <sv...@va...> написал: > Author: florian > Date: Sat Aug 8 15:07:07 2015 > New Revision: 15507 > > Log: > Initial checkin > > Added: > trunk/auxprogs/build-gcc (with props) > > Added: trunk/auxprogs/build-gcc > > ============================================================================== > --- trunk/auxprogs/build-gcc (added) > +++ trunk/auxprogs/build-gcc Sat Aug 8 15:07:07 2015 > @@ -0,0 +1,85 @@ > +#!/bin/sh -e > + > +# Simple script to build GCC including its prerequisites. > +# "Simple" means: no error recovery, no signature verification, > +# no checking whether the prerequisites are new enough for the > +# chosen GCC version. You need to figure this out by yourself. > +# > +# Define the following 6 variables: > + > +BUILD_DIR=/tmp/build-gcc > +INSTALL_DIR=/tmp/install > + > +GCC_VERSION=5.1.0 > +GMP_VERSION=5.1.3 > +MPC_VERSION=1.0.3 > +MPFR_VERSION=3.1.3 > + > +#----------------------------------------------------------- > +# No changes should be needed below this line > +#----------------------------------------------------------- > + > +# Create build directory > +echo "...creating build directory $BUILD_DIR" > +mkdir -p $BUILD_DIR > +cd $BUILD_DIR > + > +# Download tarballs > +echo "...downloading tarballs" > +wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz > + > +# Build GMP > +echo "...building GMP" > +cd $BUILD_DIR > +rm -rf gmp-$GMP_VERSION > +tar xf gmp-$GMP_VERSION.tar.bz2 > +cd gmp-$GMP_VERSION > +./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log > +make -s 2>&1 > gmp-make.log > +make -s install 2>&1 > gmp-install.log > +mv gmp-config.log gmp-make.log gmp-install.log .. > + > +# Build MPFR > +echo "...building MPFR" > +cd $BUILD_DIR > +rm -rf mpfr-$MPFR_VERSION > +tar xf mpfr-$MPFR_VERSION.tar.bz2 > +cd mpfr-$MPFR_VERSION > +./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > > mpfr-config.log > +make -s 2>&1 > mpfr-make.log > +make -s install 2>&1 > mpfr-install.log > +mv mpfr-config.log mpfr-make.log mpfr-install.log .. > + > +# Build MPC > +echo "...building MPC" > +cd $BUILD_DIR > +rm -rf mpc-$MPC_VERSION > +tar xf mpc-$MPC_VERSION.tar.gz > +cd mpc-$MPC_VERSION > +./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > > mpc-config.log > +make -s 2>&1 > mpc-make.log > +make -s install 2>&1 > mpc-install.log > +mv mpc-config.log mpc-make.log mpc-install.log .. > + > +# Build GCC > +echo "...building GCC" > +cd $BUILD_DIR > +rm -rf gcc-$GCC_VERSION > +tar xf gcc-$GCC_VERSION.tar.bz2 > +rm -rf objdir > +mkdir objdir > +cd objdir > +../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \ > + --enable-languages=c,c++ \ > + --with-mpfr=$INSTALL_DIR \ > + --with-mpc=$INSTALL_DIR \ > + --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log > +make -s 2>&1 > gcc-make.log > +make -s install 2>&1 > gcc-install.log > +mv gcc-config.log gcc-make.log gcc-install.log .. > + > +# done > +echo "...done" > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: <sv...@va...> - 2015-08-08 14:07:15
|
Author: florian
Date: Sat Aug 8 15:07:07 2015
New Revision: 15507
Log:
Initial checkin
Added:
trunk/auxprogs/build-gcc (with props)
Added: trunk/auxprogs/build-gcc
==============================================================================
--- trunk/auxprogs/build-gcc (added)
+++ trunk/auxprogs/build-gcc Sat Aug 8 15:07:07 2015
@@ -0,0 +1,85 @@
+#!/bin/sh -e
+
+# Simple script to build GCC including its prerequisites.
+# "Simple" means: no error recovery, no signature verification,
+# no checking whether the prerequisites are new enough for the
+# chosen GCC version. You need to figure this out by yourself.
+#
+# Define the following 6 variables:
+
+BUILD_DIR=/tmp/build-gcc
+INSTALL_DIR=/tmp/install
+
+GCC_VERSION=5.1.0
+GMP_VERSION=5.1.3
+MPC_VERSION=1.0.3
+MPFR_VERSION=3.1.3
+
+#-----------------------------------------------------------
+# No changes should be needed below this line
+#-----------------------------------------------------------
+
+# Create build directory
+echo "...creating build directory $BUILD_DIR"
+mkdir -p $BUILD_DIR
+cd $BUILD_DIR
+
+# Download tarballs
+echo "...downloading tarballs"
+wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz
+
+# Build GMP
+echo "...building GMP"
+cd $BUILD_DIR
+rm -rf gmp-$GMP_VERSION
+tar xf gmp-$GMP_VERSION.tar.bz2
+cd gmp-$GMP_VERSION
+./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log
+make -s 2>&1 > gmp-make.log
+make -s install 2>&1 > gmp-install.log
+mv gmp-config.log gmp-make.log gmp-install.log ..
+
+# Build MPFR
+echo "...building MPFR"
+cd $BUILD_DIR
+rm -rf mpfr-$MPFR_VERSION
+tar xf mpfr-$MPFR_VERSION.tar.bz2
+cd mpfr-$MPFR_VERSION
+./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpfr-config.log
+make -s 2>&1 > mpfr-make.log
+make -s install 2>&1 > mpfr-install.log
+mv mpfr-config.log mpfr-make.log mpfr-install.log ..
+
+# Build MPC
+echo "...building MPC"
+cd $BUILD_DIR
+rm -rf mpc-$MPC_VERSION
+tar xf mpc-$MPC_VERSION.tar.gz
+cd mpc-$MPC_VERSION
+./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpc-config.log
+make -s 2>&1 > mpc-make.log
+make -s install 2>&1 > mpc-install.log
+mv mpc-config.log mpc-make.log mpc-install.log ..
+
+# Build GCC
+echo "...building GCC"
+cd $BUILD_DIR
+rm -rf gcc-$GCC_VERSION
+tar xf gcc-$GCC_VERSION.tar.bz2
+rm -rf objdir
+mkdir objdir
+cd objdir
+../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \
+ --enable-languages=c,c++ \
+ --with-mpfr=$INSTALL_DIR \
+ --with-mpc=$INSTALL_DIR \
+ --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log
+make -s 2>&1 > gcc-make.log
+make -s install 2>&1 > gcc-install.log
+mv gcc-config.log gcc-make.log gcc-install.log ..
+
+# done
+echo "...done"
|
|
From: <sv...@va...> - 2015-08-08 07:18:16
|
Author: sewardj
Date: Sat Aug 8 08:18:08 2015
New Revision: 3168
Log:
Removed unused code that has been lying around since the major refactoring
of this file a couple of years back.
Modified:
trunk/priv/guest_amd64_toIR.c
Modified: trunk/priv/guest_amd64_toIR.c
==============================================================================
--- trunk/priv/guest_amd64_toIR.c (original)
+++ trunk/priv/guest_amd64_toIR.c Sat Aug 8 08:18:08 2015
@@ -31685,193 +31685,7 @@
else
goto decode_success; /* \o/ */
-#if 0 /* XYZZY */
- /* ---------------------------------------------------- */
- /* --- The SSE/SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* What did I do to deserve SSE ? Perhaps I was really bad in a
- previous life? */
-
- /* Note, this doesn't handle SSE3 right now. All amd64s support
- SSE2 as a minimum so there is no point distinguishing SSE1 vs
- SSE2. */
-
- insn = &guest_code[delta];
-
- /* FXSAVE is spuriously at the start here only because it is
- thusly placed in guest-x86/toIR.c. */
-
- /* ------ SSE decoder main ------ */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE/SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE4 decoder --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE4 decoder --- */
- /* ---------------------------------------------------- */
-
- /*after_sse_decoders:*/
-
- /* Get the primary opcode. */
- opc = getUChar(delta); delta++;
-
- /* We get here if the current insn isn't SSE, or this CPU doesn't
- support SSE. */
-
- switch (opc) {
-
- /* ------------------------ Control flow --------------- */
-
- /* ------------------------ CWD/CDQ -------------------- */
-
- /* ------------------------ FPU ops -------------------- */
-
- /* ------------------------ INT ------------------------ */
-
- case 0xCD: { /* INT imm8 */
- IRJumpKind jk = Ijk_Boring;
- if (have66orF2orF3(pfx)) goto decode_failure;
- d64 = getUChar(delta); delta++;
- switch (d64) {
- case 32: jk = Ijk_Sys_int32; break;
- default: goto decode_failure;
- }
- guest_RIP_next_mustcheck = True;
- guest_RIP_next_assumed = guest_RIP_bbstart + delta;
- jmp_lit(jk, guest_RIP_next_assumed);
- /* It's important that all ArchRegs carry their up-to-date value
- at this point. So we declare an end-of-block here, which
- forces any TempRegs caching ArchRegs to be flushed. */
- vassert(dres.whatNext == Dis_StopHere);
- DIP("int $0x%02x\n", (UInt)d64);
- break;
- }
-
- /* ------------------------ Jcond, byte offset --------- */
-
- /* ------------------------ IMUL ----------------------- */
-
- /* ------------------------ MOV ------------------------ */
-
- /* ------------------------ MOVx ------------------------ */
-
- /* ------------------------ opl imm, A ----------------- */
-
- /* ------------------------ opl Ev, Gv ----------------- */
-
- /* ------------------------ opl Gv, Ev ----------------- */
-
- /* ------------------------ POP ------------------------ */
-
- /* ------------------------ PUSH ----------------------- */
-
- /* ------ AE: SCAS variants ------ */
-
- /* ------ A6, A7: CMPS variants ------ */
-
- /* ------ AA, AB: STOS variants ------ */
-
- /* ------ A4, A5: MOVS variants ------ */
-
- /* ------------------------ XCHG ----------------------- */
-
- /* ------------------------ IN / OUT ----------------------- */
-
- /* ------------------------ (Grp1 extensions) ---------- */
-
- /* ------------------------ (Grp2 extensions) ---------- */
-
- /* ------------------------ (Grp3 extensions) ---------- */
-
- /* ------------------------ (Grp4 extensions) ---------- */
-
- /* ------------------------ (Grp5 extensions) ---------- */
-
- /* ------------------------ Escapes to 2-byte opcodes -- */
-
- case 0x0F: {
- opc = getUChar(delta); delta++;
- switch (opc) {
-
- /* =-=-=-=-=-=-=-=-=- Grp8 =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BSF/BSR -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BSWAP -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BT/BTS/BTR/BTC =-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CMOV =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CPUID -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- MOVZX, MOVSX =-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- MUL/IMUL =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- NOPs =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- Jcond d32 -=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- PREFETCH =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- RDTSC -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SETcc Eb =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SHLD/SHRD -=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SYSCALL -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- XADD -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SGDT and SIDT =-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- unimp2 =-=-=-=-=-=-=-=-=-=-= */
-
- default:
- goto decode_failure;
- } /* switch (opc) for the 2-byte opcodes */
- goto decode_success;
- } /* case 0x0F: of primary opcode */
-
- /* ------------------------ ??? ------------------------ */
-#endif /* XYZZY */
-
- //default:
decode_failure:
/* All decode failures end up here. */
if (sigill_diag) {
@@ -31917,7 +31731,6 @@
*expect_CAS = False;
return dres;
- // } /* switch (opc) for the main (primary) opcode switch. */
decode_success:
/* All decode successes end up here. */
|
|
From: <sv...@va...> - 2015-08-08 00:21:34
|
Author: iraisr
Date: Sat Aug 8 01:21:26 2015
New Revision: 15506
Log:
Document another limitation of the Solaris port
regarding to AT_SUN_SYSSTAT_ADDR and AT_SUN_SYSSTAT_ZONE_ADDR.
n-i-bz
Modified:
trunk/README.solaris
Modified: trunk/README.solaris
==============================================================================
--- trunk/README.solaris (original)
+++ trunk/README.solaris Sat Aug 8 01:21:26 2015
@@ -79,6 +79,15 @@
possible for Valgrind to arrange mapping of a kernel shared page at the
address specified in the mapfile for the guest application. There is currently
no such mechanism in Solaris. Hacky workarounds are possible, though.
+- Guest programs do not contain entries for AT_SUN_SYSSTAT_ADDR and
+ AT_SUN_SYSSTAT_ZONE_ADDR in their auxilliary vectors. There is no direct way
+ how to obtain addresses of these pages shared with the kernel as they are
+ passed in auxv and kernel does not create auxv for statically linked binaries
+ (such as Valgrind analysis tools).
+ Indirect methods, such as scanning 1-page mappings found at Valgrind
+ startup surrounded by reservations, could be possible. But it is hard to tell
+ which page is which because their contents are filled only when a system
+ cyclic is started. See get_hrusec() for reference.
- When a thread has no stack then all system calls will result in Valgrind
crash, even though such system calls use just parameters passed in registers.
This should happen only in pathological situations when a thread is created
|