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
(44) |
2
(9) |
3
(30) |
4
(28) |
5
(42) |
6
(14) |
7
(10) |
|
8
(7) |
9
(8) |
10
(6) |
11
(15) |
12
(13) |
13
(14) |
14
(23) |
|
15
(17) |
16
(10) |
17
(82) |
18
(14) |
19
(21) |
20
(14) |
21
(21) |
|
22
(7) |
23
(13) |
24
(16) |
25
(11) |
26
(11) |
27
(6) |
28
(7) |
|
29
(8) |
30
(13) |
31
(8) |
|
|
|
|
|
From: <sv...@va...> - 2006-10-01 16:17:33
|
Author: sewardj
Date: 2006-10-01 17:17:28 +0100 (Sun, 01 Oct 2006)
New Revision: 6109
Log:
Various minor changes to make these compile on AIX5.
Modified:
branches/AIX5/memcheck/tests/badjump.c
branches/AIX5/memcheck/tests/badjump2.c
branches/AIX5/memcheck/tests/brk.c
branches/AIX5/memcheck/tests/inits.c
branches/AIX5/memcheck/tests/malloc3.c
branches/AIX5/memcheck/tests/malloc3.stdout.exp
branches/AIX5/memcheck/tests/malloc_usable.c
branches/AIX5/memcheck/tests/manuel1.c
branches/AIX5/memcheck/tests/memalign2.c
branches/AIX5/memcheck/tests/pointer-trace.c
branches/AIX5/memcheck/tests/sigprocmask.c
branches/AIX5/memcheck/tests/stack_changes.c
branches/AIX5/memcheck/tests/stack_switch.c
branches/AIX5/memcheck/tests/str_tester.c
branches/AIX5/memcheck/tests/wrap5.c
branches/AIX5/memcheck/tests/wrap8.c
branches/AIX5/memcheck/tests/x86/scalar.h
Modified: branches/AIX5/memcheck/tests/badjump.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
--- branches/AIX5/memcheck/tests/badjump.c 2006-10-01 16:15:58 UTC (rev 6=
108)
+++ branches/AIX5/memcheck/tests/badjump.c 2006-10-01 16:17:28 UTC (rev 6=
109)
@@ -1,7 +1,7 @@
=20
int main ( void )
{
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) || defined(_AIX)
/* on ppc64-linux, a function pointer points to a function
descriptor, not to the function's entry point. Hence to get
uniform behaviour on all supported targets - a jump to 0xE000000
Modified: branches/AIX5/memcheck/tests/badjump2.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
--- branches/AIX5/memcheck/tests/badjump2.c 2006-10-01 16:15:58 UTC (rev =
6108)
+++ branches/AIX5/memcheck/tests/badjump2.c 2006-10-01 16:17:28 UTC (rev =
6109)
@@ -24,7 +24,9 @@
/* Install own SIGSEGV handler */
sigsegv_new.sa_handler =3D SIGSEGV_handler;
sigsegv_new.sa_flags =3D 0;
+#if !defined(_AIX)
sigsegv_new.sa_restorer =3D NULL;
+#endif
res =3D sigemptyset( &sigsegv_new.sa_mask );
assert(res =3D=3D 0);
=20
@@ -33,8 +35,8 @@
=20
if (__builtin_setjmp(myjmpbuf) =3D=3D 0) {
// Jump to zero; will cause seg fault
-#if defined(__powerpc64__)
- unsigned long long int fake_fndescr[3];
+#if defined(__powerpc64__) || defined(_AIX)
+ unsigned long int fake_fndescr[3];
fake_fndescr[0] =3D 0;
fake_fndescr[1] =3D 0;
fake_fndescr[2] =3D 0;
Modified: branches/AIX5/memcheck/tests/brk.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
--- branches/AIX5/memcheck/tests/brk.c 2006-10-01 16:15:58 UTC (rev 6108)
+++ branches/AIX5/memcheck/tests/brk.c 2006-10-01 16:17:28 UTC (rev 6109)
@@ -1,6 +1,8 @@
#include <assert.h>
#include <stdio.h>
-#include <sys/syscall.h>
+#if !defined(_AIX)
+# include <sys/syscall.h>
+#endif
#include <sys/types.h>
#include <unistd.h>
=20
@@ -27,7 +29,9 @@
vals[8] =3D EOL;
=20
for (i =3D 0; EOL !=3D vals[i]; i++) {
+# if !defined(_AIX)
res =3D (void*)syscall(__NR_brk, vals[i]);
+# endif
}
=20
assert( 0 =3D=3D brk(orig_ds) ); // libc brk()
Modified: branches/AIX5/memcheck/tests/inits.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
--- branches/AIX5/memcheck/tests/inits.c 2006-10-01 16:15:58 UTC (rev 610=
8)
+++ branches/AIX5/memcheck/tests/inits.c 2006-10-01 16:17:28 UTC (rev 610=
9)
@@ -11,10 +11,10 @@
int l;
static int ls;
=20
- if (gs =3D=3D 0xDEADBEEF) printf("1!\n");
- if (g =3D=3D 0xDEADBEEF) printf("2!\n");
- if (ls =3D=3D 0xDEADBEEF) printf("3!\n");
- if (l =3D=3D 0xDEADBEEF) printf("4!\n"); // complains
+ if (gs =3D=3D 0xCAFEBABE) printf("1!\n");
+ if (g =3D=3D 0xCAFEBABE) printf("2!\n");
+ if (ls =3D=3D 0xCAFEBABE) printf("3!\n");
+ if (l =3D=3D 0xCAFEBABE) printf("4!\n"); // complains
=20
return 0;
}
Modified: branches/AIX5/memcheck/tests/malloc3.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
--- branches/AIX5/memcheck/tests/malloc3.c 2006-10-01 16:15:58 UTC (rev 6=
108)
+++ branches/AIX5/memcheck/tests/malloc3.c 2006-10-01 16:17:28 UTC (rev 6=
109)
@@ -9,23 +9,23 @@
char* p;
=20
p =3D malloc(0);
- printf("malloc(0) =3D %p\n", p);
+ printf("malloc(0) =3D 0x%lx\n", (unsigned long)p);
free(p);
=20
p =3D malloc(-1);
- printf("malloc(-1) =3D %p\n", p);
+ printf("malloc(-1) =3D 0x%lx\n", (unsigned long)p);
free(p);
=20
p =3D calloc(0,1);
- printf("calloc(0,1) =3D %p\n", p);
+ printf("calloc(0,1) =3D 0x%lx\n", (unsigned long)p);
free(p);
=20
p =3D calloc(0,-1);
- printf("calloc(0,-1) =3D %p\n", p);
+ printf("calloc(0,-1) =3D 0x%lx\n", (unsigned long)p);
free(p);
=20
p =3D calloc(-1,-1);
- printf("calloc(-1,-1) =3D %p\n", p);
+ printf("calloc(-1,-1) =3D 0x%lx\n", (unsigned long)p);
free(p);
=20
return 0;
Modified: branches/AIX5/memcheck/tests/malloc3.stdout.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
--- branches/AIX5/memcheck/tests/malloc3.stdout.exp 2006-10-01 16:15:58 U=
TC (rev 6108)
+++ branches/AIX5/memcheck/tests/malloc3.stdout.exp 2006-10-01 16:17:28 U=
TC (rev 6109)
@@ -1,5 +1,5 @@
malloc(0) =3D 0x........
-malloc(-1) =3D (nil)
+malloc(-1) =3D 0x........
calloc(0,1) =3D 0x........
-calloc(0,-1) =3D (nil)
-calloc(-1,-1) =3D (nil)
+calloc(0,-1) =3D 0x........
+calloc(-1,-1) =3D 0x........
Modified: branches/AIX5/memcheck/tests/malloc_usable.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
--- branches/AIX5/memcheck/tests/malloc_usable.c 2006-10-01 16:15:58 UTC =
(rev 6108)
+++ branches/AIX5/memcheck/tests/malloc_usable.c 2006-10-01 16:17:28 UTC =
(rev 6109)
@@ -7,6 +7,8 @@
{
// Since our allocations are in multiples of 8, 99 will round up to 1=
04.
int* x =3D malloc(99);
+# if !defined(_AIX)
assert(104 =3D=3D malloc_usable_size(x));
+# endif
return 0;
}
Modified: branches/AIX5/memcheck/tests/manuel1.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
--- branches/AIX5/memcheck/tests/manuel1.c 2006-10-01 16:15:58 UTC (rev 6=
108)
+++ branches/AIX5/memcheck/tests/manuel1.c 2006-10-01 16:17:28 UTC (rev 6=
109)
@@ -4,7 +4,7 @@
{
int x;
=20
- printf ("x =3D %d\n", x=3D=3D0xDEADBEEF ? 99 : 88);
+ printf ("x =3D %d\n", x=3D=3D0xCAFEBABE ? 99 : 88);
=20
return 0;
}
Modified: branches/AIX5/memcheck/tests/memalign2.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
--- branches/AIX5/memcheck/tests/memalign2.c 2006-10-01 16:15:58 UTC (rev=
6108)
+++ branches/AIX5/memcheck/tests/memalign2.c 2006-10-01 16:17:28 UTC (rev=
6109)
@@ -25,7 +25,8 @@
int* p;
int res;
assert(sizeof(long int) =3D=3D sizeof(void*));
- =20
+
+# if !defined(_AIX) =20
p =3D memalign(0, 100); assert(0 =3D=3D (long)p % 8);
p =3D memalign(1, 100); assert(0 =3D=3D (long)p % 8);
p =3D memalign(2, 100); assert(0 =3D=3D (long)p % 8);
@@ -44,8 +45,9 @@
p =3D memalign(4095, 100); assert(0 =3D=3D (long)p % 4096);
p =3D memalign(4096, 100); assert(0 =3D=3D (long)p % 4096);
p =3D memalign(4097, 100); assert(0 =3D=3D (long)p % 8192);
+# endif
=20
- #define PM(a,b,c) posix_memalign((void**)a, b, c)
+# define PM(a,b,c) posix_memalign((void**)a, b, c)
=20
res =3D PM(&p, -1,100); assert(EINVAL =3D=3D res);
res =3D PM(&p, 0, 100); assert(0 =3D=3D res && 0 =3D=3D (long)p =
% 8);
Modified: branches/AIX5/memcheck/tests/pointer-trace.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
--- branches/AIX5/memcheck/tests/pointer-trace.c 2006-10-01 16:15:58 UTC =
(rev 6108)
+++ branches/AIX5/memcheck/tests/pointer-trace.c 2006-10-01 16:17:28 UTC =
(rev 6109)
@@ -9,6 +9,10 @@
#include <fcntl.h>
#include <unistd.h>
=20
+#if !defined(MAP_NORESERVE)
+# define MAP_NORESERVE 0
+#endif
+
int main()
{
char **volatile ptrs;
Modified: branches/AIX5/memcheck/tests/sigprocmask.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
--- branches/AIX5/memcheck/tests/sigprocmask.c 2006-10-01 16:15:58 UTC (r=
ev 6108)
+++ branches/AIX5/memcheck/tests/sigprocmask.c 2006-10-01 16:17:28 UTC (r=
ev 6109)
@@ -1,7 +1,9 @@
=20
#include <signal.h>
#include <stdio.h>
-#include <sys/syscall.h>
+#if !defined(_AIX)
+# include <sys/syscall.h>
+#endif
#include <unistd.h>
=20
// Reg test for bug #93328: we were using too-big sigset types, and thus
@@ -11,7 +13,7 @@
{
int x[6], *s, *os, i;
=20
-#if defined(__NR_sigprocmask) && !defined(__powerpc64__)
+#if defined(__NR_sigprocmask) && !defined(__powerpc64__) && !defined(_AI=
X)
=20
x[0] =3D 0x11111111;
x[1] =3D 0x89abcdef;
Modified: branches/AIX5/memcheck/tests/stack_changes.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
--- branches/AIX5/memcheck/tests/stack_changes.c 2006-10-01 16:15:58 UTC =
(rev 6108)
+++ branches/AIX5/memcheck/tests/stack_changes.c 2006-10-01 16:17:28 UTC =
(rev 6109)
@@ -10,10 +10,16 @@
// This test is checking the libc context calls (setcontext, etc.) and
// checks that Valgrind notices their stack changes properly.
=20
-struct ucontext ctx1, ctx2, oldc;
+#if defined(_AIX)
+typedef ucontext_t mycontext;
+#else /* linux */
+typedef struct ucontext mycontext;
+#endif
+
+mycontext ctx1, ctx2, oldc;
int count;
=20
-void hello(struct ucontext *newc)
+void hello(mycontext *newc)
{
printf("hello, world: %d\n", count);
if (count++ =3D=3D 2)
@@ -21,7 +27,7 @@
setcontext(newc);
}
=20
-int init_context(struct ucontext *uc)
+int init_context(mycontext *uc)
{
void *stack;
int ret;
Modified: branches/AIX5/memcheck/tests/stack_switch.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
--- branches/AIX5/memcheck/tests/stack_switch.c 2006-10-01 16:15:58 UTC (=
rev 6108)
+++ branches/AIX5/memcheck/tests/stack_switch.c 2006-10-01 16:17:28 UTC (=
rev 6109)
@@ -1,8 +1,18 @@
#define _XOPEN_SOURCE 600
#define _BSD_SOURCE
=20
+#include <stdio.h>
+
+#if defined(_AIX)
+int main(int argc, char **argv)=20
+{
+ printf("this test is linux-specific\n");
+ return 0;
+}
+
+#else
+
#include <sched.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
@@ -53,3 +63,5 @@
=20
exit( 0 );
}
+
+#endif /* !defined(_AIX) */
Modified: branches/AIX5/memcheck/tests/str_tester.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
--- branches/AIX5/memcheck/tests/str_tester.c 2006-10-01 16:15:58 UTC (re=
v 6108)
+++ branches/AIX5/memcheck/tests/str_tester.c 2006-10-01 16:17:28 UTC (re=
v 6109)
@@ -463,6 +463,7 @@
}
}
=20
+#if !defined(_AIX)
static void
test_strchrnul (void)
{
@@ -496,7 +497,9 @@
}
}
}
+#endif /* !defined(_AIX) */
=20
+#if !defined(_AIX)
static void
test_rawmemchr (void)
{
@@ -523,6 +526,7 @@
}
}
}
+#endif /* !defined(_AIX) */
=20
static void
test_index (void)
@@ -570,6 +574,7 @@
}
}
=20
+#if !defined(_AIX)
static void
test_memrchr (void)
{
@@ -615,6 +620,7 @@
}
}
}
+#endif /* !defined(_AIX) */
=20
static void
test_rindex (void)
@@ -890,6 +896,7 @@
equal(one+4, "c", 50);
=20
{
+# if !defined(_AIX)
char text[] =3D "This,is,a,test";
char *list =3D strdupa (text);
equal (strsep (&list, ","), "This", 51);
@@ -897,6 +904,7 @@
equal (strsep (&list, ","), "a", 53);
equal (strsep (&list, ","), "test", 54);
check (strsep (&list, ",") =3D=3D NULL, 55);
+# endif
}
=20
cp =3D strcpy(one, "a,b, c,, ,d,");
@@ -1049,6 +1057,7 @@
}
}
=20
+#if !defined(_AIX)
static void
test_mempcpy (void)
{
@@ -1085,6 +1094,7 @@
equal (two, "hi there", 12 + (i * 6));
}
}
+#endif /* !defined(_AIX) */
=20
static void
test_memmove (void)
@@ -1390,11 +1400,15 @@
/* strchr. */
test_strchr ();
=20
+# if !defined(_AIX)
/* strchrnul. */
test_strchrnul ();
+# endif
=20
+# if !defined(_AIX)
/* rawmemchr. */
test_rawmemchr ();
+# endif
=20
/* index - just like strchr. */
test_index ();
@@ -1402,8 +1416,10 @@
/* strrchr. */
test_strrchr ();
=20
+# if !defined(_AIX)
/* memrchr. */
test_memrchr ();
+# endif
=20
/* rindex - just like strrchr. */
test_rindex ();
@@ -1441,8 +1457,10 @@
/* memmove - must work on overlap. */
test_memmove ();
=20
+# if !defined(_AIX)
/* mempcpy */
test_mempcpy ();
+# endif
=20
/* memccpy. */
test_memccpy ();
@@ -1479,7 +1497,7 @@
else
{
status =3D EXIT_FAILURE;
- printf("%Zd errors.\n", errors);
+ printf("%d errors.\n", (int)errors);
}
=20
return status;
Modified: branches/AIX5/memcheck/tests/wrap5.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
--- branches/AIX5/memcheck/tests/wrap5.c 2006-10-01 16:15:58 UTC (rev 610=
8)
+++ branches/AIX5/memcheck/tests/wrap5.c 2006-10-01 16:17:28 UTC (rev 610=
9)
@@ -1,6 +1,7 @@
=20
#include <stdio.h>
#include <malloc.h>
+#include <stdlib.h>
#include "valgrind.h"
=20
/* As wrap4.c, but also throw in various calls to another redirected
Modified: branches/AIX5/memcheck/tests/wrap8.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
--- branches/AIX5/memcheck/tests/wrap8.c 2006-10-01 16:15:58 UTC (rev 610=
8)
+++ branches/AIX5/memcheck/tests/wrap8.c 2006-10-01 16:17:28 UTC (rev 610=
9)
@@ -1,6 +1,7 @@
=20
#include <stdio.h>
#include <malloc.h>
+#include <stdlib.h>
#include "valgrind.h"
=20
/* This is the same as wrap5.c, except that the recursion depth is 16.
Modified: branches/AIX5/memcheck/tests/x86/scalar.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
--- branches/AIX5/memcheck/tests/x86/scalar.h 2006-10-01 16:15:58 UTC (re=
v 6108)
+++ branches/AIX5/memcheck/tests/x86/scalar.h 2006-10-01 16:17:28 UTC (re=
v 6109)
@@ -1,4 +1,4 @@
-#include "../../../coregrind/vki_unistd-x86-linux.h"
+#include "../../../include/vki/vki-scnums-x86-linux.h"
=20
#include <assert.h>
#include <errno.h>
|
|
From: <sv...@va...> - 2006-10-01 16:16:01
|
Author: sewardj
Date: 2006-10-01 17:15:58 +0100 (Sun, 01 Oct 2006)
New Revision: 6108
Log:
Supply our own random number generator; else this test produces different
results on different platforms.
Modified:
branches/AIX5/memcheck/tests/oset_test.c
branches/AIX5/memcheck/tests/oset_test.stdout.exp
Modified: branches/AIX5/memcheck/tests/oset_test.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
--- branches/AIX5/memcheck/tests/oset_test.c 2006-10-01 14:09:55 UTC (rev=
6107)
+++ branches/AIX5/memcheck/tests/oset_test.c 2006-10-01 16:15:58 UTC (rev=
6108)
@@ -27,12 +27,26 @@
#define vgPlain_printf printf
#define vgPlain_memset memset
#define vgPlain_memcpy memcpy
-#define vgPlain_random random
=20
#include "coregrind/m_oset.c"
=20
#define NN 1000 // Size of OSets being created
=20
+
+/* Consistent random number generator, so it produces the
+ same results on all platforms. */
+
+#define random error_do_not_use_libc_random
+
+static UInt seed =3D 0;
+static UInt myrandom( void )
+{
+ seed =3D (1103515245 * seed + 12345);
+ return seed;
+}
+
+
+
//----------------------------------------------------------------------=
-----
// Word example
//----------------------------------------------------------------------=
-----
@@ -81,8 +95,8 @@
*(vs[i]) =3D 2*i;
}
for (i =3D 0; i < NN; i++) {
- Word r1 =3D random() % NN;
- Word r2 =3D random() % NN;
+ Word r1 =3D myrandom() % NN;
+ Word r2 =3D myrandom() % NN;
Word* tmp=3D vs[r1];
vs[r1] =3D vs[r2];
vs[r2] =3D tmp;
@@ -255,8 +269,8 @@
vs[i]->b2 =3D i+1;
}
for (i =3D 0; i < NN; i++) {
- Int r1 =3D random() % NN;
- Int r2 =3D random() % NN;
+ Int r1 =3D myrandom() % NN;
+ Int r2 =3D myrandom() % NN;
Block* tmp =3D vs[r1];
vs[r1] =3D vs[r2];
vs[r2] =3D tmp;
Modified: branches/AIX5/memcheck/tests/oset_test.stdout.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
--- branches/AIX5/memcheck/tests/oset_test.stdout.exp 2006-10-01 14:09:55=
UTC (rev 6107)
+++ branches/AIX5/memcheck/tests/oset_test.stdout.exp 2006-10-01 16:15:58=
UTC (rev 6108)
@@ -1,357 +1,358 @@
-- start foo ----------------
-.. .. .. .. .. .. .. .. .. .. 1998
-.. .. .. .. .. .. .. .. .. 1996
+.. .. .. .. .. .. .. .. .. 1998
+.. .. .. .. .. .. .. .. 1996
.. .. .. .. .. .. .. .. .. .. 1994
-.. .. .. .. .. .. .. .. 1992
-.. .. .. .. .. .. .. .. .. 1990
+.. .. .. .. .. .. .. .. .. 1992
+.. .. .. .. .. .. .. .. .. .. 1990
.. .. .. .. .. .. .. 1988
.. .. .. .. .. .. .. .. .. 1986
.. .. .. .. .. .. .. .. .. .. 1984
.. .. .. .. .. .. .. .. 1982
-.. .. .. .. .. .. .. .. .. 1980
-.. .. .. .. .. .. 1978
+.. .. .. .. .. .. .. .. .. .. 1980
+.. .. .. .. .. .. .. .. .. 1978
.. .. .. .. .. .. .. .. .. .. 1976
-.. .. .. .. .. .. .. .. .. 1974
+.. .. .. .. .. .. 1974
.. .. .. .. .. .. .. .. .. .. 1972
-.. .. .. .. .. .. .. .. 1970
-.. .. .. .. .. .. .. .. .. 1968
-.. .. .. .. .. .. .. 1966
+.. .. .. .. .. .. .. .. .. 1970
+.. .. .. .. .. .. .. .. .. .. 1968
+.. .. .. .. .. .. .. .. 1966
.. .. .. .. .. .. .. .. .. .. 1964
.. .. .. .. .. .. .. .. .. 1962
-.. .. .. .. .. .. .. .. .. .. 1960
-.. .. .. .. .. .. .. .. .. .. .. 1958
-.. .. .. .. .. .. .. .. 1956
-.. .. .. .. .. .. .. .. .. 1954
+.. .. .. .. .. .. .. 1960
+.. .. .. .. .. .. .. .. .. .. 1958
+.. .. .. .. .. .. .. .. .. 1956
+.. .. .. .. .. .. .. .. 1954
.. .. .. .. .. .. .. .. .. .. 1952
-.. .. .. .. .. 1950
+.. .. .. .. .. .. .. .. .. 1950
.. .. .. .. .. .. .. .. .. .. 1948
-.. .. .. .. .. .. .. .. .. 1946
-.. .. .. .. .. .. .. .. .. .. 1944
+.. .. .. .. .. 1946
+.. .. .. .. .. .. .. .. .. 1944
.. .. .. .. .. .. .. .. 1942
-.. .. .. .. .. .. .. .. .. 1940
+.. .. .. .. .. .. .. 1940
.. .. .. .. .. .. .. .. .. .. 1938
-.. .. .. .. .. .. .. 1936
-.. .. .. .. .. .. .. .. .. 1934
-.. .. .. .. .. .. .. .. .. .. 1932
-.. .. .. .. .. .. .. .. 1930
+.. .. .. .. .. .. .. .. .. 1936
+.. .. .. .. .. .. .. .. 1934
+.. .. .. .. .. .. .. .. .. 1932
+.. .. .. .. .. .. 1930
.. .. .. .. .. .. .. .. .. 1928
-.. .. .. .. .. .. 1926
-.. .. .. .. .. .. .. .. .. 1924
+.. .. .. .. .. .. .. .. .. .. 1926
+.. .. .. .. .. .. .. .. 1924
.. .. .. .. .. .. .. .. .. .. 1922
-.. .. .. .. .. .. .. .. 1920
-.. .. .. .. .. .. .. .. .. 1918
+.. .. .. .. .. .. .. .. .. 1920
+.. .. .. .. .. .. .. .. .. .. 1918
.. .. .. .. .. .. .. 1916
-.. .. .. .. .. .. .. .. .. .. 1914
-.. .. .. .. .. .. .. .. .. 1912
+.. .. .. .. .. .. .. .. .. 1914
+.. .. .. .. .. .. .. .. 1912
.. .. .. .. .. .. .. .. .. .. 1910
-.. .. .. .. .. .. .. .. 1908
-.. .. .. .. .. .. .. .. .. 1906
+.. .. .. .. .. .. .. .. .. 1908
+.. .. .. .. .. .. .. .. .. .. 1906
.. .. .. .. 1904
.. .. .. .. .. .. .. .. .. 1902
.. .. .. .. .. .. .. .. 1900
-.. .. .. .. .. .. .. .. .. 1898
-.. .. .. .. .. .. .. 1896
-.. .. .. .. .. .. .. .. .. .. 1894
+.. .. .. .. .. .. .. 1898
+.. .. .. .. .. .. .. .. .. 1896
+.. .. .. .. .. .. .. .. 1894
.. .. .. .. .. .. .. .. .. 1892
-.. .. .. .. .. .. .. .. .. .. 1890
-.. .. .. .. .. .. .. .. 1888
+.. .. .. .. .. .. 1890
+.. .. .. .. .. .. .. .. .. .. 1888
.. .. .. .. .. .. .. .. .. 1886
-.. .. .. .. .. .. 1884
-.. .. .. .. .. .. .. .. .. 1882
-.. .. .. .. .. .. .. .. 1880
-.. .. .. .. .. .. .. .. .. 1878
-.. .. .. .. .. .. .. .. .. .. 1876
-.. .. .. .. .. .. .. 1874
-.. .. .. .. .. .. .. .. .. 1872
+.. .. .. .. .. .. .. .. .. .. 1884
+.. .. .. .. .. .. .. .. 1882
+.. .. .. .. .. .. .. .. .. 1880
+.. .. .. .. .. .. .. 1878
+.. .. .. .. .. .. .. .. 1876
+.. .. .. .. .. .. .. .. .. 1874
+.. .. .. .. .. 1872
.. .. .. .. .. .. .. .. .. .. 1870
-.. .. .. .. .. .. .. .. 1868
-.. .. .. .. .. .. .. .. .. 1866
-.. .. .. .. .. 1864
+.. .. .. .. .. .. .. .. .. 1868
+.. .. .. .. .. .. .. .. .. .. 1866
+.. .. .. .. .. .. .. .. 1864
.. .. .. .. .. .. .. .. .. 1862
-.. .. .. .. .. .. .. .. 1860
+.. .. .. .. .. .. .. .. .. .. 1860
.. .. .. .. .. .. .. 1858
-.. .. .. .. .. .. .. .. 1856
-.. .. .. .. .. .. 1854
-.. .. .. .. .. .. .. .. 1852
-.. .. .. .. .. .. .. .. .. 1850
-.. .. .. .. .. .. .. 1848
+.. .. .. .. .. .. .. .. .. 1856
+.. .. .. .. .. .. .. .. 1854
+.. .. .. .. .. .. .. .. .. 1852
+.. .. .. .. .. .. 1848
.. .. .. .. .. .. .. .. .. 1846
.. .. .. .. .. .. .. .. 1844
-.. .. .. .. .. .. .. .. .. 1842
-.. .. .. 1840
-.. .. .. .. .. .. .. .. .. 1838
+.. .. .. .. .. .. .. .. .. .. 1842
+.. .. .. .. .. .. .. .. .. 1840
+.. .. .. .. .. .. .. 1838
.. .. .. .. .. .. .. .. .. .. 1836
-.. .. .. .. .. .. .. .. 1834
-.. .. .. .. .. .. .. .. .. 1832
-.. .. .. .. .. .. .. 1830
-.. .. .. .. .. .. .. .. .. 1828
-.. .. .. .. .. .. .. .. 1826
+.. .. .. .. .. .. .. .. .. 1834
+.. .. .. .. .. .. .. .. .. .. 1832
+.. .. .. .. .. .. .. .. 1830
+.. .. .. .. .. .. .. .. .. .. 1828
+.. .. .. .. .. .. .. .. .. 1826
.. .. .. .. .. .. .. .. .. .. 1824
-.. .. .. .. .. .. .. .. .. 1822
-.. .. .. .. .. .. 1820
-.. .. .. .. .. .. .. .. .. .. 1818
-.. .. .. .. .. .. .. .. .. 1816
-.. .. .. .. .. .. .. .. .. .. 1814
-.. .. .. .. .. .. .. .. 1812
-.. .. .. .. .. .. .. .. .. 1810
-.. .. .. .. .. .. .. 1808
-.. .. .. .. .. .. .. .. .. 1806
+.. .. .. 1822
+.. .. .. .. .. .. .. .. 1820
+.. .. .. .. .. .. .. .. .. 1818
+.. .. .. .. .. .. .. 1816
+.. .. .. .. .. .. .. .. 1814
+.. .. .. .. .. .. 1812
+.. .. .. .. .. .. .. .. 1810
+.. .. .. .. .. .. .. .. .. 1808
+.. .. .. .. .. .. .. 1806
.. .. .. .. .. .. .. .. 1804
.. .. .. .. .. 1802
.. .. .. .. .. .. .. .. 1800
.. .. .. .. .. .. .. .. .. 1798
.. .. .. .. .. .. .. 1796
-.. .. .. .. .. .. .. .. .. 1794
-.. .. .. .. .. .. .. .. 1792
-.. .. .. .. .. .. .. .. .. 1790
-.. .. .. .. .. .. 1788
-.. .. .. .. .. .. .. .. .. 1786
-.. .. .. .. .. .. .. .. 1784
-.. .. .. .. .. .. .. .. .. 1782
-.. .. .. .. .. .. .. 1780
-.. .. .. .. .. .. .. .. .. 1778
-.. .. .. .. .. .. .. .. 1776
-.. .. .. .. .. .. .. .. .. 1774
-.. .. .. .. 1772
-.. .. .. .. .. .. .. .. .. .. 1770
-.. .. .. .. .. .. .. .. .. 1768
-.. .. .. .. .. .. .. .. 1766
-.. .. .. .. .. .. .. .. .. 1764
-.. .. .. .. .. .. .. 1762
-.. .. .. .. .. .. .. .. .. .. 1760
+.. .. .. .. .. .. .. .. 1794
+.. .. .. .. .. .. 1792
+.. .. .. .. .. .. .. .. 1790
+.. .. .. .. .. .. .. .. .. 1788
+.. .. .. .. .. .. .. 1786
+.. .. .. .. .. .. .. .. .. 1784
+.. .. .. .. .. .. .. .. 1782
+.. .. .. .. .. .. .. .. .. 1780
+.. .. .. .. 1778
+.. .. .. .. .. .. .. .. .. 1776
+.. .. .. .. .. .. .. .. 1774
+.. .. .. .. .. .. .. 1772
+.. .. .. .. .. .. .. .. 1770
+.. .. .. .. .. .. 1768
+.. .. .. .. .. .. .. .. .. 1766
+.. .. .. .. .. .. .. .. 1764
+.. .. .. .. .. .. .. .. .. 1762
+.. .. .. .. .. .. .. 1760
.. .. .. .. .. .. .. .. .. 1758
.. .. .. .. .. .. .. .. 1756
-.. .. .. .. .. .. .. .. .. 1754
-.. .. .. .. .. .. .. .. .. .. 1752
-.. .. .. .. .. .. 1750
-.. .. .. .. .. .. .. .. .. .. 1748
-.. .. .. .. .. .. .. .. .. 1746
-.. .. .. .. .. .. .. .. .. .. 1744
-.. .. .. .. .. .. .. .. 1742
-.. .. .. .. .. .. .. .. .. .. 1740
+.. .. .. .. .. 1754
+.. .. .. .. .. .. .. .. 1752
+.. .. .. .. .. .. .. 1750
+.. .. .. .. .. .. .. .. .. 1748
+.. .. .. .. .. .. .. .. 1746
+.. .. .. .. .. .. 1744
+.. .. .. .. .. .. .. .. .. 1742
+.. .. .. .. .. .. .. .. 1740
.. .. .. .. .. .. .. .. .. 1738
.. .. .. .. .. .. .. 1736
-.. .. .. .. .. .. .. .. .. .. 1734
-.. .. .. .. .. .. .. .. .. 1732
-.. .. .. .. .. .. .. .. .. .. 1730
-.. .. .. .. .. .. .. .. 1728
-.. .. .. .. .. .. .. .. .. 1726
-.. .. .. .. .. 1724
-.. .. .. .. .. .. .. .. .. 1722
-.. .. .. .. .. .. .. .. 1720
-.. .. .. .. .. .. .. .. .. 1718
+.. .. .. .. .. .. .. .. .. 1734
+.. .. .. .. .. .. .. .. .. .. 1732
+.. .. .. .. .. .. .. .. 1730
+.. .. .. .. .. .. .. .. .. 1728
+.. .. 1726
+.. .. .. .. .. .. .. .. .. 1724
+.. .. .. .. .. .. .. .. 1722
+.. .. .. .. .. .. .. .. .. 1720
+.. .. .. .. .. .. .. .. .. .. 1718
.. .. .. .. .. .. .. 1716
.. .. .. .. .. .. .. .. .. 1714
.. .. .. .. .. .. .. .. 1712
-.. .. .. .. .. .. .. .. .. 1710
-.. .. .. .. .. .. 1708
-.. .. .. .. .. .. .. .. .. 1706
-.. .. .. .. .. .. .. .. 1704
+.. .. .. .. .. .. 1710
+.. .. .. .. .. .. .. .. .. 1708
+.. .. .. .. .. .. .. .. 1706
+.. .. .. .. .. .. .. 1704
.. .. .. .. .. .. .. .. .. 1702
-.. .. .. .. .. .. .. 1700
+.. .. .. .. .. .. .. .. .. .. 1700
.. .. .. .. .. .. .. .. 1698
-.. .. 1696
-.. .. .. .. .. .. .. .. .. .. 1694
-.. .. .. .. .. .. .. .. .. 1692
-.. .. .. .. .. .. .. .. .. .. 1690
-.. .. .. .. .. .. .. .. 1688
+.. .. .. .. .. .. .. .. .. 1696
+.. .. .. .. .. 1694
+.. .. .. .. .. .. .. .. 1692
+.. .. .. .. .. .. .. .. .. 1690
+.. .. .. .. .. .. .. 1688
.. .. .. .. .. .. .. .. .. 1686
-.. .. .. .. .. .. .. .. .. .. 1684
-.. .. .. .. .. .. .. 1680
+.. .. .. .. .. .. .. .. 1684
+.. .. .. .. .. .. .. .. .. 1682
+.. .. .. .. .. .. 1680
.. .. .. .. .. .. .. .. 1678
-.. .. .. .. .. .. .. .. .. 1676
-.. .. .. .. .. .. 1672
-.. .. .. .. .. .. .. .. .. .. 1670
-.. .. .. .. .. .. .. .. .. 1668
-.. .. .. .. .. .. .. .. 1666
-.. .. .. .. .. .. .. .. .. .. .. 1664
-.. .. .. .. .. .. .. .. .. .. 1662
-.. .. .. .. .. .. .. .. .. 1660
-.. .. .. .. .. .. .. .. .. .. 1658
-.. .. .. .. .. .. .. .. .. .. .. 1656
-.. .. .. .. .. .. .. 1654
-.. .. .. .. .. .. .. .. .. 1652
-.. .. .. .. .. .. .. .. .. .. 1650
-.. .. .. .. .. .. .. .. 1648
-.. .. .. .. .. .. .. .. .. .. 1646
+.. .. .. .. .. .. .. 1676
+.. .. .. .. 1674
+.. .. .. .. .. .. .. .. 1672
+.. .. .. .. .. .. .. 1670
+.. .. .. .. .. .. .. .. 1668
+.. .. .. .. .. .. 1666
+.. .. .. .. .. .. .. .. .. 1664
+.. .. .. .. .. .. .. .. 1662
+.. .. .. .. .. .. .. 1660
+.. .. .. .. .. .. .. .. 1658
+.. .. .. .. .. 1656
+.. .. .. .. .. .. .. .. .. 1654
+.. .. .. .. .. .. .. .. 1652
+.. .. .. .. .. .. .. 1650
+.. .. .. .. .. .. .. .. .. 1648
+.. .. .. .. .. .. .. .. 1646
.. .. .. .. .. .. .. .. .. 1644
-.. .. .. .. .. .. .. .. .. .. 1642
-.. .. .. .. .. 1640
+.. .. .. .. .. .. 1642
+.. .. .. .. .. .. .. .. 1640
.. .. .. .. .. .. .. .. .. 1638
-.. .. .. .. .. .. .. .. 1636
-.. .. .. .. .. .. .. .. .. .. 1634
-.. .. .. .. .. .. .. .. .. 1632
-.. .. .. .. .. .. .. .. .. .. 1630
-.. .. .. .. .. .. .. 1628
-.. .. .. .. .. .. .. .. .. 1626
-.. .. .. .. .. .. .. .. 1624
+.. .. .. .. .. .. .. 1636
+.. .. .. .. .. .. .. .. .. 1634
+.. .. .. .. .. .. .. .. 1632
+.. .. .. .. .. .. .. .. .. 1630
+.. .. .. 1628
+.. .. .. .. .. .. .. .. 1626
+.. .. .. .. .. .. .. 1624
.. .. .. .. .. .. 1622
-.. .. .. .. .. .. .. .. .. .. 1620
-.. .. .. .. .. .. .. .. .. 1618
-.. .. .. .. .. .. .. .. .. .. 1616
+.. .. .. .. .. .. .. .. 1620
+.. .. .. .. .. .. .. 1618
+.. .. .. .. .. .. .. .. .. 1616
.. .. .. .. .. .. .. .. 1614
-.. .. .. .. .. .. .. .. .. 1612
-.. .. .. .. .. .. .. .. .. .. 1610
-.. .. .. .. .. .. .. 1608
-.. .. .. .. .. .. .. .. .. 1606
-.. .. .. .. .. .. .. .. 1604
-.. .. .. .. .. .. .. .. .. 1602
-.. .. .. .. 1600
-.. .. .. .. .. .. .. .. .. .. 1598
-.. .. .. .. .. .. .. .. .. 1596
-.. .. .. .. .. .. .. .. 1594
-.. .. .. .. .. .. .. .. .. 1592
-.. .. .. .. .. .. .. 1590
-.. .. .. .. .. .. .. .. .. 1588
+.. .. .. .. .. 1612
+.. .. .. .. .. .. .. .. .. 1610
+.. .. .. .. .. .. .. .. 1608
+.. .. .. .. .. .. .. 1606
+.. .. .. .. .. .. .. .. .. 1604
+.. .. .. .. .. .. .. .. 1602
+.. .. .. .. .. .. .. .. .. 1600
+.. .. .. .. .. .. 1598
+.. .. .. .. .. .. .. .. 1596
+.. .. .. .. .. .. .. .. .. 1594
+.. .. .. .. .. .. .. 1592
+.. .. .. .. .. .. .. .. 1590
+.. .. .. .. 1588
.. .. .. .. .. .. .. .. 1586
-.. .. .. .. .. .. .. .. .. .. 1584
+.. .. .. .. .. .. .. 1584
.. .. .. .. .. .. .. .. .. 1582
-.. .. .. .. .. .. .. .. .. .. 1580
+.. .. .. .. .. .. .. .. 1580
.. .. .. .. .. .. 1578
-.. .. .. .. .. .. .. .. .. .. 1576
-.. .. .. .. .. .. .. .. .. 1574
+.. .. .. .. .. .. .. .. 1576
+.. .. .. .. .. .. .. 1574
.. .. .. .. .. .. .. .. 1572
.. .. .. .. .. .. .. .. .. 1570
-.. .. .. .. .. .. .. 1568
-.. .. .. .. .. .. .. .. .. 1566
-.. .. .. .. .. .. .. .. 1564
+.. .. .. .. .. 1568
+.. .. .. .. .. .. .. .. 1566
+.. .. .. .. .. .. .. 1564
.. .. .. .. .. .. .. .. .. 1562
-.. .. .. .. .. 1560
-.. .. .. .. .. .. .. .. .. .. 1558
-.. .. .. .. .. .. .. .. .. 1556
+.. .. .. .. .. .. .. .. 1560
+.. .. .. .. .. .. .. .. .. 1558
+.. .. .. .. .. .. 1556
.. .. .. .. .. .. .. .. 1554
-.. .. .. .. .. .. .. .. .. .. 1552
-.. .. .. .. .. .. .. .. .. 1550
-.. .. .. .. .. .. .. 1548
-.. .. .. .. .. .. .. .. .. 1546
-.. .. .. .. .. .. .. .. 1544
-.. .. .. .. .. .. .. .. .. 1542
+.. .. .. .. .. .. .. 1552
+.. .. .. .. .. .. .. .. 1550
+.. 1548
+.. .. .. .. .. .. .. .. 1546
+.. .. .. .. .. .. .. 1544
+.. .. .. .. .. .. .. .. 1542
.. .. .. .. .. .. 1540
.. .. .. .. .. .. .. .. .. 1538
.. .. .. .. .. .. .. .. 1536
-.. .. .. .. .. .. .. .. .. 1534
-.. .. .. .. .. .. .. 1532
-.. .. .. .. .. .. .. .. 1530
+.. .. .. .. .. .. .. 1534
+.. .. .. .. .. .. .. .. 1532
+.. .. .. .. .. 1530
.. .. .. .. .. .. .. .. .. 1528
-.. .. .. 1526
-.. .. .. .. .. .. .. .. .. 1524
+.. .. .. .. .. .. .. .. 1526
+.. .. .. .. .. .. .. 1524
.. .. .. .. .. .. .. .. 1522
-.. .. .. .. .. .. .. 1520
-.. .. .. .. .. .. .. .. .. 1518
-.. .. .. .. .. .. .. .. .. .. 1516
-.. .. .. .. .. .. .. .. 1514
-.. .. .. .. .. .. .. .. .. .. 1512
-.. .. .. .. .. .. .. .. .. 1510
-.. .. .. .. .. .. 1508
-.. .. .. .. .. .. .. .. .. 1506
-.. .. .. .. .. .. .. .. 1504
-.. .. .. .. .. .. .. .. .. 1502
-.. .. .. .. .. .. .. 1500
-.. .. .. .. .. .. .. .. .. 1498
+.. .. .. .. .. .. .. .. .. 1520
+.. .. .. .. .. .. 1518
+.. .. .. .. .. .. .. .. 1516
+.. .. .. .. .. .. .. 1514
+.. .. .. .. .. .. .. .. .. 1512
+.. .. .. .. .. .. .. .. 1510
+.. .. .. .. 1508
+.. .. .. .. .. .. .. .. 1506
+.. .. .. .. .. .. .. 1504
+.. .. .. .. .. .. .. .. 1502
+.. .. .. .. .. .. 1500
+.. .. .. .. .. .. .. 1498
.. .. .. .. .. .. .. .. 1496
-.. .. .. .. .. .. .. .. .. 1494
-.. .. .. .. .. .. .. .. .. .. 1492
-.. .. .. .. .. 1490
-.. .. .. .. .. .. .. .. .. .. 1488
+.. .. .. .. .. 1494
+.. .. .. .. .. .. .. 1492
+.. .. .. .. .. .. .. .. 1490
+.. .. .. .. .. .. 1488
.. .. .. .. .. .. .. .. .. 1486
-.. .. .. .. .. .. .. .. .. .. 1484
-.. .. .. .. .. .. .. .. 1482
-.. .. .. .. .. .. .. .. .. 1480
-.. .. .. .. .. .. .. 1478
-.. .. .. .. .. .. .. .. .. .. 1476
+.. .. .. .. .. .. .. .. 1484
+.. .. .. .. .. .. .. .. .. 1482
+.. .. .. .. .. .. .. 1480
+.. .. .. .. .. .. .. .. .. 1478
+.. .. .. .. .. .. .. .. 1476
.. .. .. .. .. .. .. .. .. 1474
-.. .. .. .. .. .. .. .. 1472
+.. .. .. 1472
.. .. .. .. .. .. .. .. .. .. 1470
.. .. .. .. .. .. .. .. .. 1468
.. .. .. .. .. .. .. .. .. .. 1466
-.. .. .. .. .. .. 1464
+.. .. .. .. .. .. .. .. 1464
.. .. .. .. .. .. .. .. .. 1462
-.. .. .. .. .. .. .. .. 1460
-.. .. .. .. .. .. .. .. .. 1458
-.. .. .. .. .. .. .. 1456
-.. .. .. .. .. .. .. .. .. 1454
+.. .. .. .. .. .. .. 1460
+.. .. .. .. .. .. .. .. .. .. 1458
+.. .. .. .. .. .. .. .. .. 1456
+.. .. .. .. .. .. .. .. .. .. 1454
.. .. .. .. .. .. .. .. 1452
-.. .. .. .. .. .. .. .. .. .. 1450
-.. .. .. .. .. .. .. .. .. 1448
-.. .. .. .. 1446
-.. .. .. .. .. .. .. .. .. .. 1444
-.. .. .. .. .. .. .. .. .. 1442
-.. .. .. .. .. .. .. .. 1440
-.. .. .. .. .. .. .. .. .. 1438
-.. .. .. .. .. .. .. .. .. .. 1436
-.. .. .. .. .. .. .. 1434
-.. .. .. .. .. .. .. .. .. .. 1432
-.. .. .. .. .. .. .. .. .. 1430
-.. .. .. .. .. .. .. .. 1428
-.. .. .. .. .. .. .. .. .. .. 1426
-.. .. .. .. .. .. .. .. .. 1424
-.. .. .. .. .. .. .. .. .. .. .. 1422
+.. .. .. .. .. .. .. .. .. 1450
+.. .. .. .. .. .. .. .. .. .. 1448
+.. .. .. .. .. .. 1446
+.. .. .. .. .. .. .. .. .. 1444
+.. .. .. .. .. .. .. .. 1442
+.. .. .. .. .. .. .. .. .. 1440
+.. .. .. .. .. .. .. 1438
+.. .. .. .. .. .. .. .. 1436
+.. .. .. .. .. 1434
+.. .. .. .. .. .. .. .. .. 1432
+.. .. .. .. .. .. .. .. 1430
+.. .. .. .. .. .. .. .. .. 1428
+.. .. .. .. .. .. .. 1426
+.. .. .. .. .. .. .. .. .. .. 1424
+.. .. .. .. .. .. .. .. .. 1422
.. .. .. .. .. .. .. .. .. .. 1420
-.. .. .. .. .. .. .. .. .. .. .. 1418
-.. .. .. .. .. .. 1416
-.. .. .. .. .. .. .. .. .. .. 1414
-.. .. .. .. .. .. .. .. .. 1412
-.. .. .. .. .. .. .. .. .. .. 1410
-.. .. .. .. .. .. .. .. .. .. .. 1408
-.. .. .. .. .. .. .. .. 1406
+.. .. .. .. .. .. .. .. 1418
+.. .. .. .. .. .. .. .. .. .. 1416
+.. .. .. .. .. .. .. .. .. 1414
+.. .. .. .. .. .. 1412
+.. .. .. .. .. .. .. .. .. 1410
+.. .. .. .. .. .. .. .. 1408
+.. .. .. .. .. .. .. .. .. 1406
.. .. .. .. .. .. .. .. .. .. 1404
-.. .. .. .. .. .. .. .. .. 1402
+.. .. .. .. .. .. .. 1402
.. .. .. .. .. .. .. .. .. .. 1400
-.. .. .. .. .. .. .. 1398
+.. .. .. .. .. .. .. .. .. 1398
.. .. .. .. .. .. .. .. .. .. 1396
-.. .. .. .. .. .. .. .. .. 1394
-.. .. .. .. .. .. .. .. .. .. .. 1392
-.. .. .. .. .. .. .. .. .. .. 1390
-.. .. .. .. .. .. .. .. 1388
+.. .. .. .. .. .. .. .. 1394
+.. .. .. .. .. .. .. .. .. .. 1392
+.. .. .. .. .. .. .. .. .. 1390
+.. .. .. .. 1388
.. .. .. .. .. .. .. .. .. .. 1386
.. .. .. .. .. .. .. .. .. 1384
-.. .. .. .. .. .. .. .. .. .. 1382
-.. .. .. .. .. .. .. .. .. .. .. 1380
-.. .. .. .. .. 1378
+.. .. .. .. .. .. .. .. 1382
+.. .. .. .. .. .. .. .. .. .. 1380
+.. .. .. .. .. .. .. .. .. 1378
.. .. .. .. .. .. .. .. .. .. 1376
-.. .. .. .. .. .. .. .. .. 1374
-.. .. .. .. .. .. .. .. .. .. 1372
-.. .. .. .. .. .. .. .. 1370
-.. .. .. .. .. .. .. .. .. .. 1368
-.. .. .. .. .. .. .. .. .. 1366
-.. .. .. .. .. .. .. 1364
-.. .. .. .. .. .. .. .. .. 1362
-.. .. .. .. .. .. .. .. .. .. 1360
-.. .. .. .. .. .. .. .. 1358
-.. .. .. .. .. .. .. .. .. 1356
-.. .. .. .. .. .. 1354
-.. .. .. .. .. .. .. .. .. 1352
+.. .. .. .. .. .. .. 1374
+.. .. .. .. .. .. .. .. 1372
+.. .. .. .. .. .. .. .. .. 1370
+.. .. .. .. .. .. 1368
+.. .. .. .. .. .. .. .. .. .. 1366
+.. .. .. .. .. .. .. .. .. 1364
+.. .. .. .. .. .. .. .. .. .. 1362
+.. .. .. .. .. .. .. .. 1360
+.. .. .. .. .. .. .. .. .. 1358
+.. .. .. .. .. .. .. 1356
+.. .. .. .. .. .. .. .. .. 1354
+.. .. .. .. .. .. .. .. .. .. 1352
.. .. .. .. .. .. .. .. 1350
.. .. .. .. .. .. .. .. .. .. 1348
.. .. .. .. .. .. .. .. .. 1346
-.. .. .. .. .. .. .. 1344
-.. .. .. .. .. .. .. .. .. 1342
+.. .. .. .. .. .. .. .. .. .. 1344
+.. .. .. .. .. 1342
.. .. .. .. .. .. .. .. .. .. 1340
-.. .. .. .. .. .. .. .. 1338
-.. .. .. .. .. .. .. .. .. .. 1336
-.. .. .. .. .. .. .. .. .. 1334
-.. .. .. .. .. .. .. .. .. .. 1332
-.. 1330
-.. .. .. .. .. .. .. .. 1328
-.. .. .. .. .. .. .. .. .. 1326
-.. .. .. .. .. .. .. 1324
-.. .. .. .. .. .. .. .. .. 1322
+.. .. .. .. .. .. .. .. .. 1338
+.. .. .. .. .. .. .. .. 1336
+.. .. .. .. .. .. .. .. .. .. 1334
+.. .. .. .. .. .. .. .. .. 1332
+.. .. .. .. .. .. .. .. .. .. 1330
+.. .. .. .. .. .. .. 1328
+.. .. .. .. .. .. .. .. .. .. 1326
+.. .. .. .. .. .. .. .. .. 1324
+.. .. .. .. .. .. .. .. .. .. 1322
.. .. .. .. .. .. .. .. 1320
.. .. .. .. .. .. .. .. .. 1318
-.. .. .. .. .. .. 1316
-.. .. .. .. .. .. .. .. .. 1314
+.. .. .. .. .. .. .. .. .. .. 1316
+.. .. .. .. .. .. 1314
.. .. .. .. .. .. .. .. 1312
.. .. .. .. .. .. .. .. .. 1310
.. .. .. .. .. .. .. 1308
-.. .. .. .. .. .. .. .. .. 1306
-.. .. .. .. .. .. .. .. .. .. 1304
-.. .. .. .. .. .. .. .. 1302
-.. .. .. .. .. .. .. .. .. .. 1300
+.. .. .. .. .. .. .. .. .. .. 1306
+.. .. .. .. .. .. .. .. .. 1304
+.. .. .. .. .. .. .. .. .. .. 1302
+.. .. .. .. .. .. .. .. 1300
.. .. .. .. .. .. .. .. .. 1298
-.. .. .. .. .. 1296
-.. .. .. .. .. .. .. .. .. 1294
-.. .. .. .. .. .. .. .. 1292
-.. .. .. .. .. .. .. .. .. 1290
+.. .. .. .. .. .. .. .. .. .. 1296
+.. .. 1294
+.. .. .. .. .. .. .. .. .. 1292
+.. .. .. .. .. .. .. .. 1290
.. .. .. .. .. .. .. 1288
.. .. .. .. .. .. .. .. .. 1286
.. .. .. .. .. .. .. .. 1284
@@ -359,641 +360,640 @@
.. .. .. .. .. .. 1280
.. .. .. .. .. .. .. .. 1278
.. .. .. .. .. .. .. 1276
-.. .. .. .. .. .. .. .. 1274
-.. .. .. .. 1272
+.. .. .. .. .. 1274
+.. .. .. .. .. .. .. .. 1272
.. .. .. .. .. .. .. .. .. 1270
-.. .. .. .. .. .. .. .. 1268
+.. .. .. .. .. .. .. 1268
.. .. .. .. .. .. .. .. .. 1266
-.. .. .. .. .. .. .. 1264
-.. .. .. .. .. .. .. .. 1262
+.. .. .. .. .. .. .. .. 1264
+.. .. .. .. .. .. .. .. .. 1262
.. .. .. .. .. .. 1260
-.. .. .. .. .. .. .. .. .. .. 1258
-.. .. .. .. .. .. .. .. .. 1256
-.. .. .. .. .. .. .. .. .. .. 1254
-.. .. .. .. .. .. .. .. 1252
+.. .. .. .. .. .. .. .. .. 1258
+.. .. .. .. .. .. .. .. 1256
+.. .. .. .. .. .. .. 1254
+.. .. .. .. .. .. .. .. .. .. 1252
.. .. .. .. .. .. .. .. .. 1250
-.. .. .. .. .. .. .. 1248
+.. .. .. .. .. .. .. .. 1248
.. .. .. .. .. .. .. .. .. 1246
.. .. .. .. .. .. .. .. .. .. 1244
-.. .. .. .. .. .. .. .. 1242
+.. .. .. .. 1242
.. .. .. .. .. .. .. .. .. 1240
-.. .. .. .. .. .. .. .. .. .. 1238
-.. .. .. .. .. 1236
-.. .. .. .. .. .. .. .. .. 1234
-.. .. .. .. .. .. .. .. .. .. 1232
-.. .. .. .. .. .. .. .. 1230
+.. .. .. .. .. .. .. .. 1238
+.. .. .. .. .. .. .. .. .. 1236
+.. .. .. .. .. .. .. 1234
+.. .. .. .. .. .. .. .. 1232
+.. .. .. .. .. .. 1230
.. .. .. .. .. .. .. .. .. 1228
-.. .. .. .. .. .. .. 1226
-.. .. .. .. .. .. .. .. 1224
+.. .. .. .. .. .. .. .. 1226
+.. .. .. .. .. .. .. 1224
.. .. .. .. .. .. .. .. .. 1222
-.. .. .. .. .. .. 1220
+.. .. .. .. .. .. .. .. 1220
.. .. .. .. .. .. .. .. .. 1218
-.. .. .. .. .. .. .. .. 1216
+.. .. .. .. .. 1216
.. .. .. .. .. .. .. .. .. 1214
-.. .. .. .. .. .. .. 1212
+.. .. .. .. .. .. .. .. 1212
.. .. .. .. .. .. .. .. .. 1210
-.. .. .. .. .. .. .. .. 1208
-.. .. .. 1206
-.. .. .. .. .. .. .. .. .. 1204
-.. .. .. .. .. .. .. .. 1202
-.. .. .. .. .. .. .. 1200
+.. .. .. .. .. .. .. 1208
+.. .. .. .. .. .. .. .. 1206
+.. .. .. .. .. .. 1204
+.. .. .. .. .. .. .. .. .. 1202
+.. .. .. .. .. .. .. .. .. .. 1200
.. .. .. .. .. .. .. .. 1198
-.. .. .. .. .. .. 1196
-.. .. .. .. .. .. .. .. 1194
-.. .. .. .. .. .. .. 1192
-.. .. .. .. .. .. .. .. .. 1190
-.. .. .. .. .. .. .. .. 1188
-.. .. .. .. .. 1186
-.. .. .. .. .. .. .. .. 1184
-.. .. .. .. .. .. .. 1182
+.. .. .. .. .. .. .. .. .. 1196
+.. .. .. .. .. .. .. 1194
+.. .. .. .. .. .. .. .. .. 1192
+.. .. .. .. .. .. .. .. 1190
+.. .. .. .. .. .. .. .. .. 1188
+.. .. .. 1186
+.. .. .. .. .. .. .. .. .. 1184
+.. .. .. .. .. .. .. .. .. .. 1182
.. .. .. .. .. .. .. .. 1180
-.. .. .. .. .. .. 1178
-.. .. .. .. .. .. .. .. 1176
+.. .. .. .. .. .. .. .. .. 1178
+.. .. .. .. .. .. .. 1176
.. .. .. .. .. .. .. .. .. 1174
-.. .. .. .. .. .. .. 1172
-.. .. .. .. .. .. .. .. .. 1170
-.. .. .. .. .. .. .. .. 1168
-.. .. .. .. 1166
-.. .. .. .. .. .. .. .. 1164
-.. .. .. .. .. .. .. 1162
+.. .. .. .. .. .. .. .. .. .. 1172
+.. .. .. .. .. .. .. .. 1170
+.. .. .. .. .. .. .. .. .. 1168
+.. .. .. .. .. .. 1166
+.. .. .. .. .. .. .. .. .. .. 1164
+.. .. .. .. .. .. .. .. .. 1162
.. .. .. .. .. .. .. .. 1160
-.. .. .. .. .. .. 1158
-.. .. .. .. .. .. .. .. .. 1156
-.. .. .. .. .. .. .. .. 1154
-.. .. .. .. .. .. .. .. .. 1152
-.. .. .. .. .. .. .. 1150
-.. .. .. .. .. .. .. .. 1148
-.. .. .. .. .. 1146
+.. .. .. .. .. .. .. .. .. 1158
+.. .. .. .. .. .. .. .. .. .. 1156
+.. .. .. .. .. .. .. 1152
+.. .. .. .. .. .. .. .. .. 1150
+.. .. .. .. .. .. .. .. .. .. 1148
+.. .. .. .. .. .. .. .. 1146
.. .. .. .. .. .. .. .. .. 1144
-.. .. .. .. .. .. .. .. 1142
+.. .. .. .. .. 1142
.. .. .. .. .. .. .. .. .. 1140
-.. .. .. .. .. .. .. 1138
+.. .. .. .. .. .. .. .. 1138
.. .. .. .. .. .. .. .. .. 1136
-.. .. .. .. .. .. .. .. 1134
+.. .. .. .. .. .. .. 1134
.. .. .. .. .. .. .. .. .. 1132
-.. .. .. .. .. .. 1130
-.. .. .. .. .. .. .. .. 1128
-.. .. .. .. .. .. .. 1126
-.. .. .. .. .. .. .. .. 1124
+.. .. .. .. .. .. .. .. 1130
+.. .. .. .. .. .. .. .. .. 1128
+.. .. .. .. .. .. .. .. .. .. 1126
+.. .. .. .. .. .. 1124
.. .. .. .. .. .. .. .. .. 1122
-.. .. 1120
+.. .. .. .. .. .. .. .. 1120
.. .. .. .. .. .. .. .. .. 1118
-.. .. .. .. .. .. .. .. 1116
-.. .. .. .. .. .. .. .. .. .. 1114
-.. .. .. .. .. .. .. .. .. 1112
-.. .. .. .. .. .. .. 1110
-.. .. .. .. .. .. .. .. .. 1108
-.. .. .. .. .. .. .. .. 1106
-.. .. .. .. .. .. 1104
+.. .. .. .. .. .. .. .. .. .. 1116
+.. .. .. .. .. .. .. 1114
+.. .. .. .. .. .. .. .. 1112
+.. .. .. .. .. .. .. .. .. 1110
+.. .. .. .. 1108
+.. .. .. .. .. .. .. .. .. 1106
+.. .. .. .. .. .. .. .. 1104
.. .. .. .. .. .. .. .. .. 1102
-.. .. .. .. .. .. .. .. 1100
-.. .. .. .. .. .. .. 1098
+.. .. .. .. .. .. .. 1100
+.. .. .. .. .. .. .. .. .. 1098
.. .. .. .. .. .. .. .. .. .. 1096
-.. .. .. .. .. .. .. .. .. 1094
-.. .. .. .. .. .. .. .. 1092
-.. .. .. .. .. .. .. .. .. 1090
-.. .. .. .. .. .. .. .. .. .. 1088
-.. .. .. .. .. 1086
-.. .. .. .. .. .. .. .. .. .. 1084
-.. .. .. .. .. .. .. .. .. 1082
-.. .. .. .. .. .. .. .. .. .. 1080
-.. .. .. .. .. .. .. .. 1078
-.. .. .. .. .. .. .. .. .. 1076
-.. .. .. .. .. .. .. .. .. .. 1074
-.. .. .. .. .. .. .. 1072
+.. .. .. .. .. .. .. .. 1094
+.. .. .. .. .. .. .. .. .. 1092
+.. .. .. .. .. .. 1090
+.. .. .. .. .. .. .. .. 1088
+.. .. .. .. .. .. .. .. .. 1086
+.. .. .. .. .. .. .. 1084
+.. .. .. .. .. .. .. .. 1082
+.. .. .. .. .. .. .. .. .. 1080
+.. .. .. .. .. 1078
+.. .. .. .. .. .. .. .. 1076
+.. .. .. .. .. .. .. 1074
+.. .. .. .. .. .. .. .. 1072
.. .. .. .. .. .. .. .. .. 1070
-.. .. .. .. .. .. .. .. 1068
-.. .. .. .. .. .. .. .. .. 1066
-.. .. .. .. .. .. 1064
-.. .. .. .. .. .. .. .. .. 1062
-.. .. .. .. .. .. .. .. 1060
-.. .. .. .. .. .. .. 1058
+.. .. .. .. .. .. 1068
+.. .. .. .. .. .. .. 1066
+.. .. .. .. .. .. .. .. 1064
+1062
+.. .. .. .. .. .. .. .. .. 1060
+.. .. .. .. .. .. .. .. 1058
.. .. .. .. .. .. .. .. .. 1056
-.. .. .. .. .. .. .. .. .. .. 1054
-.. .. .. .. .. .. .. .. 1052
-.. .. .. .. .. .. .. .. .. .. 1050
-.. .. .. .. .. .. .. .. .. 1048
-.. .. .. .. 1046
-.. .. .. .. .. .. .. .. .. 1044
-.. .. .. .. .. .. .. .. 1042
-.. .. .. .. .. .. .. .. .. 1040
-.. .. .. .. .. .. .. 1038
-.. .. .. .. .. .. .. .. 1036
-.. .. .. .. .. .. .. .. .. 1034
-.. .. .. .. .. .. 1032
+.. .. .. .. .. .. .. 1054
+.. .. .. .. .. .. .. .. .. 1052
+.. .. .. .. .. .. .. .. 1050
+.. .. .. .. .. .. .. .. .. .. 1048
+.. .. .. .. .. .. .. .. .. 1046
+.. .. .. .. .. .. 1044
+.. .. .. .. .. .. .. .. .. .. 1042
+.. .. .. .. .. .. .. .. .. .. .. 1040
+.. .. .. .. .. .. .. .. .. 1038
+.. .. .. .. .. .. .. .. .. .. .. 1036
+.. .. .. .. .. .. .. .. .. .. 1034
+.. .. .. .. .. .. .. .. .. .. .. 1032
.. .. .. .. .. .. .. .. 1030
-.. .. .. .. .. .. .. 1028
+.. .. .. .. .. .. .. .. .. .. 1028
.. .. .. .. .. .. .. .. .. 1026
-.. .. .. .. .. .. .. .. 1024
-.. .. .. .. .. .. .. .. .. 1022
-.. .. .. .. .. 1020
-.. .. .. .. .. .. .. 1018
-.. .. .. .. .. .. 1016
+.. .. .. .. .. .. .. .. .. .. 1024
+.. .. .. .. .. .. .. 1022
+.. .. .. .. .. .. .. .. .. .. 1020
+.. .. .. .. .. .. .. .. .. 1018
+.. .. .. .. .. .. .. .. .. .. 1016
.. .. .. .. .. .. .. .. 1014
-.. .. .. .. .. .. .. 1012
-.. .. .. .. .. .. .. .. 1010
-.. .. .. 1008
-.. .. .. .. .. .. .. .. .. 1006
-.. .. .. .. .. .. .. .. 1004
-.. .. .. .. .. .. .. .. .. 1002
-.. .. .. .. .. .. .. 1000
-.. .. .. .. .. .. .. .. .. 998
-.. .. .. .. .. .. .. .. 996
-.. .. .. .. .. .. 994
-.. .. .. .. .. .. .. .. 992
-.. .. .. .. .. .. .. 990
+.. .. .. .. .. .. .. .. .. .. 1012
+.. .. .. .. .. .. .. .. .. 1010
+.. .. .. .. .. .. .. .. .. .. 1008
+.. .. .. .. .. 1006
+.. .. .. .. .. .. .. .. .. 1004
+.. .. .. .. .. .. .. .. 1002
+.. .. .. .. .. .. .. .. .. 1000
+.. .. .. .. .. .. .. 998
+.. .. .. .. .. .. .. .. .. .. 996
+.. .. .. .. .. .. .. .. .. 994
+.. .. .. .. .. .. .. .. .. .. 992
+.. .. .. .. .. .. .. .. 990
.. .. .. .. .. .. .. .. .. 988
-.. .. .. .. .. .. .. .. 986
-.. .. .. .. .. .. .. .. .. 984
-.. .. .. .. .. 982
-.. .. .. .. .. .. .. .. 980
-.. .. .. .. .. .. .. 978
-.. .. .. .. .. .. 976
-.. .. .. .. .. .. .. .. 974
+.. .. .. .. .. .. 986
+.. .. .. .. .. .. .. .. .. .. 984
+.. .. .. .. .. .. .. .. .. 982
+.. .. .. .. .. .. .. .. .. .. 980
+.. .. .. .. .. .. .. .. 978
+.. .. .. .. .. .. .. .. .. 976
+.. .. .. .. .. .. .. .. .. .. 974
.. .. .. .. .. .. .. 972
-.. .. .. .. .. .. .. .. 970
-.. .. .. .. .. .. .. .. .. 968
-.. .. .. .. 966
-.. .. .. .. .. .. .. .. .. 964
-.. .. .. .. .. .. .. .. 962
-.. .. .. .. .. .. .. .. .. 960
-.. .. .. .. .. .. .. 958
+.. .. .. .. .. .. .. .. .. 970
+.. .. .. .. .. .. .. .. 968
+.. .. .. .. .. .. .. .. .. 966
+.. .. .. .. 964
+.. .. .. .. .. .. .. .. .. 962
+.. .. .. .. .. .. .. .. .. .. 960
+.. .. .. .. .. .. .. .. 958
.. .. .. .. .. .. .. .. .. 956
-.. .. .. .. .. .. .. .. 954
-.. .. .. .. .. .. .. .. .. 952
-.. .. .. .. .. .. .. .. .. .. 950
+.. .. .. .. .. .. .. 954
+.. .. .. .. .. .. .. .. 952
+.. .. .. .. .. .. .. .. .. 950
.. .. .. .. .. .. 948
.. .. .. .. .. .. .. .. .. 946
-.. .. .. .. .. .. .. .. 944
-.. .. .. .. .. .. .. .. .. 942
-.. .. .. .. .. .. .. 940
-.. .. .. .. .. .. .. .. .. .. 938
-.. .. .. .. .. .. .. .. .. 936
-.. .. .. .. .. .. .. .. .. .. 934
+.. .. .. .. .. .. .. .. .. .. 944
+.. .. .. .. .. .. .. .. 942
+.. .. .. .. .. .. .. .. .. 940
+.. .. .. .. .. .. .. 938
+.. .. .. .. .. .. .. .. .. .. 936
+.. .. .. .. .. .. .. .. .. 934
.. .. .. .. .. .. .. .. 932
-.. .. .. .. .. .. .. .. .. 930
-.. .. .. .. .. .. .. .. .. .. 928
-.. .. .. .. .. 926
-.. .. .. .. .. .. .. .. .. .. 924
+.. .. .. .. .. .. .. .. .. .. 930
+.. .. .. .. .. .. .. .. .. 928
+.. .. .. .. .. .. .. .. .. .. 926
+.. .. .. .. .. 924
.. .. .. .. .. .. .. .. .. 922
.. .. .. .. .. .. .. .. 920
.. .. .. .. .. .. .. .. .. .. 918
.. .. .. .. .. .. .. .. .. 916
-.. .. .. .. .. .. .. .. .. .. 914
-.. .. .. .. .. .. .. 912
-.. .. .. .. .. .. .. .. .. 910
-.. .. .. .. .. .. .. .. 908
-.. .. .. .. .. .. .. .. .. .. 906
-.. .. .. .. .. .. .. .. .. 904
-.. .. .. .. .. .. .. .. .. .. 902
-.. .. .. .. .. .. 900
-.. .. .. .. .. .. .. .. .. 898
-.. .. .. .. .. .. .. .. 896
+.. .. .. .. .. .. .. 914
+.. .. .. .. .. .. .. .. .. 912
+.. .. .. .. .. .. .. .. 910
+.. .. .. .. .. .. 908
+.. .. .. .. .. .. .. .. 906
+.. .. .. .. .. .. .. 904
+.. .. .. .. .. .. .. .. .. 900
+.. .. .. .. .. .. .. .. 898
+.. .. .. 896
.. .. .. .. .. .. .. .. .. 894
-.. .. .. .. .. .. .. 892
-.. .. .. .. .. .. .. .. .. .. 890
-.. .. .. .. .. .. .. .. .. 888
-.. .. .. .. .. .. .. .. .. .. 886
-.. .. .. .. .. .. .. .. 884
-.. .. .. .. .. .. .. .. .. .. 882
-.. .. .. .. .. .. .. .. .. 880
-878
-.. .. .. .. .. .. .. .. .. 876
-.. .. .. .. .. .. .. .. 874
+.. .. .. .. .. .. .. .. 892
+.. .. .. .. .. .. .. .. .. 890
+.. .. .. .. .. .. .. .. .. .. 888
+.. .. .. .. .. .. .. 886
+.. .. .. .. .. .. .. .. .. .. 884
+.. .. .. .. .. .. .. .. .. 882
+.. .. .. .. .. .. .. .. .. .. .. 880
+.. .. .. .. .. .. .. .. .. .. 878
+.. .. .. .. .. .. .. .. 876
+.. .. .. .. .. .. .. .. .. .. 874
.. .. .. .. .. .. .. .. .. 872
-.. .. .. .. .. .. .. 870
-.. .. .. .. .. .. .. .. .. .. 868
-.. .. .. .. .. .. .. .. .. 866
-.. .. .. .. .. .. .. .. .. .. 864
+.. .. .. .. .. .. .. .. .. .. 870
+.. .. .. .. .. .. 868
+.. .. .. .. .. .. .. .. .. .. 866
+.. .. .. .. .. .. .. .. .. 864
.. .. .. .. .. .. .. .. 862
.. .. .. .. .. .. .. .. .. 860
-.. .. .. .. .. .. 858
-.. .. .. .. .. .. .. .. .. 856
-.. .. .. .. .. .. .. .. 854
-.. .. .. .. .. .. .. 852
-.. .. .. .. .. .. .. .. 850
-.. .. .. .. .. .. .. .. .. 848
+.. .. .. .. .. .. .. .. .. .. 858
+.. .. .. .. .. .. .. 856
+.. .. .. .. .. .. .. .. .. 854
+.. .. .. .. .. .. .. .. 852
+.. .. .. .. .. .. .. .. .. 850
+.. .. .. .. .. .. .. .. .. .. 848
.. .. .. .. .. 846
-.. .. .. .. .. .. .. .. .. 844
-.. .. .. .. .. .. .. .. 842
-.. .. .. .. .. .. .. .. .. 840
-.. .. .. .. .. .. .. 838
-.. .. .. .. .. .. .. .. .. 836
-.. .. .. .. .. .. .. .. 834
-.. .. .. .. .. .. .. .. .. 832
-.. .. .. .. .. .. 830
-.. .. .. .. .. .. .. .. 828
-.. .. .. .. .. .. .. 826
-.. .. .. .. .. .. .. .. 824
-.. .. .. .. .. .. .. .. .. 822
-.. .. .. .. 820
+.. .. .. .. .. .. .. .. .. .. 844
+.. .. .. .. .. .. .. .. .. 842
+.. .. .. .. .. .. .. .. 840
+.. .. .. .. .. .. .. .. .. 838
+.. .. .. .. .. .. .. 836
+.. .. .. .. .. .. .. .. .. 834
+.. .. .. .. .. .. .. .. .. .. 832
+.. .. .. .. .. .. .. .. 830
+.. .. .. .. .. .. .. .. .. 828
+.. .. .. .. .. .. 826
+.. .. .. .. .. .. .. .. .. 824
+.. .. .. .. .. .. .. .. 822
+.. .. .. .. .. .. .. 820
.. .. .. .. .. .. .. .. .. .. 818
.. .. .. .. .. .. .. .. .. 816
.. .. .. .. .. .. .. .. 814
.. .. .. .. .. .. .. .. .. .. 812
.. .. .. .. .. .. .. .. .. 810
-.. .. .. .. .. .. .. 808
+.. .. .. .. 808
.. .. .. .. .. .. .. .. .. 806
.. .. .. .. .. .. .. .. 804
-.. .. .. .. .. .. 802
-.. .. .. .. .. .. .. .. .. .. 800
-.. .. .. .. .. .. .. .. .. 798
-.. .. .. .. .. .. .. .. .. .. 796
-.. .. .. .. .. .. .. .. 794
-.. .. .. .. .. .. .. .. .. .. 792
-.. .. .. .. .. .. .. .. .. 790
-.. .. .. .. .. .. .. .. .. .. 788
+.. .. .. .. .. .. .. 802
+.. .. .. .. .. .. .. .. .. 800
+.. .. .. .. .. .. .. .. 798
+.. .. .. .. .. .. .. .. .. 796
+.. .. .. .. .. .. 794
+.. .. .. .. .. .. .. .. .. 792
+.. .. .. .. .. .. .. .. 790
+.. .. .. .. .. .. .. .. .. 788
.. .. .. .. .. .. .. 786
-.. .. .. .. .. .. .. .. .. 784
-.. .. .. .. .. .. .. .. .. .. 782
-.. .. .. .. .. .. .. .. 780
-.. .. .. .. .. .. .. .. .. 778
-.. .. .. .. .. .. .. .. .. .. 776
-.. .. .. .. .. 774
+.. .. .. .. .. .. .. .. 784
+.. .. .. .. .. .. .. .. .. 782
+.. .. .. .. .. 780
+.. .. .. .. .. .. .. .. .. .. 778
+.. .. .. .. .. .. .. .. .. 776
+.. .. .. .. .. .. .. .. .. .. 774
.. .. .. .. .. .. .. .. 772
-.. .. .. .. .. .. .. 770
-.. .. .. .. .. .. .. .. .. 768
-.. .. .. .. .. .. .. .. 766
-.. .. .. .. .. .. 764
-.. .. .. .. .. .. .. .. .. .. 762
-.. .. .. .. .. .. .. .. .. 760
-.. .. .. .. .. .. .. .. 758
+.. .. .. .. .. .. .. .. .. 770
+.. .. .. .. .. .. .. 768
+.. .. .. .. .. .. .. .. .. .. 766
+.. .. .. .. .. .. .. .. .. 764
+.. .. .. .. .. .. .. .. 762
+.. .. .. .. .. .. .. .. .. .. 760
+.. .. .. .. .. .. .. .. .. 758
.. .. .. .. .. .. .. .. .. .. 756
-.. .. .. .. .. .. .. .. .. 754
+.. .. .. .. .. .. 754
.. .. .. .. .. .. .. .. .. .. 752
-.. .. .. .. .. .. .. 750
-.. .. .. .. .. .. .. .. .. 748
+.. .. .. .. .. .. .. .. .. 750
+.. .. .. .. .. .. .. .. .. .. 748
.. .. .. .. .. .. .. .. 746
-.. .. .. .. .. .. .. .. .. 744
-.. .. .. 742
-.. .. .. .. .. .. .. .. 740
+.. .. .. .. .. .. .. .. .. .. 744
+.. .. .. .. .. .. .. .. .. 742
+.. .. .. .. .. .. .. .. .. .. 740
.. .. .. .. .. .. .. 738
.. .. .. .. .. .. .. .. .. 736
.. .. .. .. .. .. .. .. 734
-.. .. .. .. .. .. 732
-.. .. .. .. .. .. .. .. .. 730
-.. .. .. .. .. .. .. .. 728
-.. .. .. .. .. .. .. .. .. 726
-.. .. .. .. .. .. .. 724
-.. .. .. .. .. .. .. .. .. 722
-.. .. .. .. .. .. .. .. 720
-.. .. .. .. .. .. .. .. .. 718
-.. .. .. .. .. 716
+.. .. .. .. .. .. .. .. .. 732
+.. .. .. .. .. .. .. .. .. .. 730
+.. .. 728
+.. .. .. .. .. .. .. .. 726
+.. .. .. .. .. .. .. .. .. 724
+.. .. .. .. .. .. .. 722
+.. .. .. .. .. .. .. .. .. 720
+.. .. .. .. .. .. .. .. .. .. 718
+.. .. .. .. .. .. .. .. 716
.. .. .. .. .. .. .. .. .. 714
-.. .. .. .. .. .. .. .. 712
+.. .. .. .. .. .. 712
.. .. .. .. .. .. .. .. .. 710
-.. .. .. .. .. .. .. 708
-.. .. .. .. .. .. .. .. 706
+.. .. .. .. .. .. .. .. 708
+.. .. .. .. .. .. .. 706
.. .. .. .. .. .. .. .. .. 704
-.. .. .. .. .. .. 702
-.. .. .. .. .. .. .. .. 700
-.. .. .. .. .. .. .. .. .. 698
-.. .. .. .. .. .. .. 696
-.. .. .. .. .. .. .. .. .. 694
+.. .. .. .. .. .. .. .. 702
+.. .. .. .. .. .. .. .. .. 700
+.. .. .. .. .. 698
+.. .. .. .. .. .. .. .. 696
+.. .. .. .. .. .. .. 694
.. .. .. .. .. .. .. .. 692
.. .. .. .. .. .. .. .. .. 690
-.. .. .. .. 688
-.. .. .. .. .. .. .. .. .. 686
+.. .. .. .. .. .. 688
+.. .. .. .. .. .. .. 686
.. .. .. .. .. .. .. .. 684
-.. .. .. .. .. .. .. .. .. 682
-.. .. .. .. .. .. .. 680
-.. .. .. .. .. .. .. .. 678
+.. .. .. .. 682
+.. .. .. .. .. .. .. .. 680
+.. .. .. .. .. .. .. 678
.. .. .. .. .. .. 676
-.. .. .. .. .. .. .. .. .. 674
-.. .. .. .. .. .. .. .. 672
-.. .. .. .. .. .. .. .. .. 670
-.. .. .. .. .. .. .. 668
-.. .. .. .. .. .. .. .. 666
-.. .. .. .. .. .. .. .. .. 664
-.. .. .. .. .. 662
-.. .. .. .. .. .. .. .. .. .. 660
-.. .. .. .. .. .. .. .. .. 658
-.. .. .. .. .. .. .. .. 656
+.. .. .. .. .. .. .. .. 674
+.. .. .. .. .. .. .. 672
+.. .. .. .. .. .. .. .. 670
+.. .. .. .. .. 668
+.. .. .. .. .. .. .. .. .. 666
+.. .. .. .. .. .. .. .. 664
+.. .. .. .. .. .. .. .. .. 662
+.. .. .. .. .. .. .. 660
+.. .. .. .. .. .. .. .. 658
+.. .. .. .. .. .. 656
.. .. .. .. .. .. .. .. .. 654
-.. .. .. .. .. .. .. 652
+.. .. .. .. .. .. .. .. 652
.. .. .. .. .. .. .. .. .. 650
-.. .. .. .. .. .. .. .. 648
-.. .. .. .. .. .. 646
+.. .. .. .. .. .. .. 648
+.. .. .. .. .. .. .. .. 646
.. .. .. .. .. .. .. .. .. 644
-.. .. .. .. .. .. .. .. 642
+.. .. .. 642
.. .. .. .. .. .. .. .. .. 640
-.. .. .. .. .. .. .. 638
-.. .. .. .. .. .. .. .. .. 636
-.. .. .. .. .. .. .. .. 634
-.. .. .. .. .. .. .. .. .. .. 632
+.. .. .. .. .. .. .. .. 638
+.. .. .. .. .. .. .. 636
+.. .. .. .. .. .. .. .. .. 634
+.. .. .. .. .. .. .. .. 632
.. .. .. .. .. .. .. .. .. 630
-.. .. 628
-.. .. .. .. .. .. .. .. .. .. 626
-.. .. .. .. .. .. .. .. .. 624
-.. .. .. .. .. .. .. .. 622
-.. .. .. .. .. .. .. .. .. 620
-.. .. .. .. .. .. .. .. .. .. 618
-.. .. .. .. .. .. .. 616
-.. .. .. .. .. .. .. .. .. .. 614
+.. .. .. .. .. .. 628
+.. .. .. .. .. .. .. .. .. 626
+.. .. .. .. .. .. .. .. 624
+.. .. .. .. .. .. .. .. .. 622
+.. .. .. .. .. .. .. 620
+.. .. .. .. .. .. .. .. .. 618
+.. .. .. .. .. .. .. .. 616
+.. .. .. .. .. 614
.. .. .. .. .. .. .. .. .. 612
.. .. .. .. .. .. .. .. 610
.. .. .. .. .. .. .. .. .. .. 608
.. .. .. .. .. .. .. .. .. 606
.. .. .. .. .. .. .. .. .. .. 604
-.. .. .. .. .. .. .. .. .. .. .. 602
-.. .. .. .. .. .. 600
-.. .. .. .. .. .. .. .. .. 598
-.. .. .. .. .. .. .. .. 596
+.. .. .. .. .. .. .. 602
+.. .. .. .. .. .. .. .. .. 600
+.. .. .. .. .. .. .. .. 598
+.. .. .. .. .. .. 596
.. .. .. .. .. .. .. .. .. 594
-.. .. .. .. .. .. .. 592
-.. .. .. .. .. .. .. .. .. .. 590
-.. .. .. .. .. .. .. .. .. 588
+.. .. .. .. .. .. .. .. 592
+.. .. .. .. .. .. .. .. .. 590
+.. .. .. .. .. .. .. 588
.. .. .. .. .. .. .. .. .. .. 586
-.. .. .. .. .. .. .. .. 584
-.. .. .. .. .. .. .. .. .. 582
-.. .. .. .. .. .. .. .. .. .. 580
-.. .. .. .. .. 578
-.. .. .. .. .. .. .. .. 576
-.. .. .. .. .. .. .. .. .. 574
-.. .. .. .. .. .. .. 572
-.. .. .. .. .. .. .. .. 570
-.. .. .. .. .. .. .. .. .. 568
-.. .. .. .. .. .. 566
-.. .. .. .. .. .. .. .. .. 564
-.. .. .. .. .. .. .. .. .. .. 562
-.. .. .. .. .. .. .. .. 560
-.. .. .. .. .. .. .. .. .. 558
-.. .. .. .. .. .. .. .. .. .. 556
-.. .. .. .. .. .. .. 554
+.. .. .. .. .. .. .. .. .. 584
+.. .. .. .. .. .. .. .. 582
+.. .. .. .. .. .. .. .. .. 580
+.. .. .. .. 578
+.. .. .. .. .. .. .. .. .. 576
+.. .. .. .. .. .. .. .. 574
+.. .. .. .. .. .. .. .. .. 572
+.. .. .. .. .. .. .. 570
+.. .. .. .. .. .. .. .. .. .. 568
+.. .. .. .. .. .. .. .. .. 566
+.. .. .. .. .. .. .. .. .. .. 564
+.. .. .. .. .. .. .. .. 562
+.. .. .. .. .. .. .. .. .. 560
+.. .. .. .. .. .. .. .. .. .. 558
+.. .. .. .. .. .. 556
+.. .. .. .. .. .. .. .. .. 554
.. .. .. .. .. .. .. .. 552
-.. .. .. .. .. .. .. .. .. 550
-.. .. .. .. 548
-.. .. .. .. .. .. .. .. .. .. 546
-.. .. .. .. .. .. .. .. .. 544
+.. .. .. .. .. .. .. 550
+.. .. .. .. .. .. .. .. .. 548
+.. .. .. .. .. .. .. .. 546
+.. .. .. .. .. 544
.. .. .. .. .. .. .. .. 542
-.. .. .. .. .. .. .. .. .. .. 540
-.. .. .. .. .. .. .. .. .. 538
-.. .. .. .. .. .. .. .. .. .. 536
-.. .. .. .. .. .. .. 534
+.. .. .. .. .. .. .. .. .. 540
+.. .. .. .. .. .. .. 538
+.. .. .. .. .. .. .. .. .. 536
+.. .. .. .. .. .. .. .. 534
.. .. .. .. .. .. .. .. .. 532
-.. .. .. .. .. .. .. .. 530
-.. .. .. .. .. .. 528
-.. .. .. .. .. .. .. .. .. .. 526
-.. .. .. .. .. .. .. .. .. 524
-.. .. .. .. .. .. .. .. 522
+.. .. .. .. .. .. 530
+.. .. .. .. .. .. .. .. 528
+.. .. .. .. .. .. .. 526
+.. .. .. .. .. .. .. .. 524
+.. 522
.. .. .. .. .. .. .. .. .. .. 520
.. .. .. .. .. .. .. .. .. 518
-.. .. .. .. .. .. .. 516
+.. .. .. .. .. .. .. .. 516
.. .. .. .. .. .. .. .. .. 514
.. .. .. .. .. .. .. .. .. .. 512
-.. .. .. .. .. .. .. .. 510
+.. .. .. .. .. .. .. 510
.. .. .. .. .. .. .. .. .. 508
-.. .. .. .. .. .. .. .. .. .. 506
-.. .. .. .. .. 504
-.. .. .. .. .. .. .. .. 502
-.. .. .. .. .. .. .. 500
+.. .. .. .. .. .. .. .. 506
+.. .. .. .. .. .. .. .. .. 504
+.. .. .. .. .. .. 502
+.. .. .. .. .. .. .. .. .. .. 500
.. .. .. .. .. .. .. .. .. 498
.. .. .. .. .. .. .. .. 496
.. .. .. .. .. .. .. .. .. 494
-.. .. .. .. .. .. 492
-.. .. .. .. .. .. .. .. .. 490
-.. .. .. .. .. .. .. .. 488
-.. .. .. .. .. .. .. .. .. 486
-.. .. .. .. .. .. .. 484
-.. .. .. .. .. .. .. .. .. .. 482
+.. .. .. .. .. .. .. 492
+.. .. .. .. .. .. .. .. .. .. 490
+.. .. .. .. .. .. .. .. .. 488
+.. .. .. .. .. .. .. .. 486
+.. .. .. .. .. .. .. .. .. 484
+.. .. .. .. .. 482
.. .. .. .. .. .. .. .. .. 480
.. .. .. .. .. .. .. .. 478
-.. .. .. .. .. .. .. .. .. .. 476
-.. .. .. .. .. .. .. .. .. 474
-.. .. .. .. .. .. .. .. .. .. 472
-.. .. .. 470
+.. .. .. .. .. .. .. .. .. 476
+.. .. .. .. .. .. .. 474
+.. .. .. .. .. .. .. .. 472
+.. .. .. .. .. .. 470
.. .. .. .. .. .. .. .. 468
.. .. .. .. .. .. .. 466
-.. .. .. .. .. .. .. .. .. 464
-.. .. .. .. .. .. .. .. 462
-.. .. .. .. .. .. 460
-.. .. .. .. .. .. .. .. 458
-.. .. .. .. .. .. .. 456
+.. .. .. .. .. .. .. .. 464
+.. .. .. .. 462
+.. .. .. .. .. .. .. .. .. .. 460
+.. .. .. .. .. .. .. .. .. 458
+.. .. .. .. .. .. .. .. .. .. 456
.. .. .. .. .. .. .. .. 454
-.. .. .. .. .. .. .. .. .. 452
-.. .. .. .. .. 450
-.. .. .. .. .. .. .. .. .. 448
-.. .. .. .. .. .. .. .. 446
-.. .. .. .. .. .. .. 444
-.. .. .. .. .. .. .. .. 442
-.. .. .. .. .. .. .. .. .. 440
-.. .. .. .. .. .. 438
+.. .. .. .. .. .. .. .. .. .. 452
+.. .. .. .. .. .. .. .. .. 450
+.. .. .. .. .. .. .. .. .. .. 448
+.. .. .. .. .. .. .. 446
+.. .. .. .. .. .. .. .. 444
+.. .. .. .. .. .. .. .. .. 442
+.. .. .. .. .. .. 440
+.. .. .. .. .. .. .. .. .. .. 438
.. .. .. .. .. .. .. .. .. 436
-.. .. .. .. .. .. .. .. 434
-.. .. .. .. .. .. .. .. .. 432
-.. .. .. .. .. .. .. 430
-.. .. .. .. .. .. .. .. 428
-.. .. .. .. 426
+.. .. .. .. .. .. .. .. .. .. 434
+.. .. .. .. .. .. .. .. 432
+.. .. .. .. .. .. .. .. .. 430
+.. .. .. .. .. .. .. 428
+.. .. .. .. .. .. .. .. 426
.. .. .. .. .. .. .. .. .. 424
-.. .. .. .. .. .. .. .. 422
-.. .. .. .. .. .. .. .. .. .. 420
-.. .. .. .. .. .. .. .. .. 418
-.. .. .. .. .. .. .. 416
-.. .. .. .. .. .. .. .. .. 414
-.. .. .. .. .. .. .. .. 412
-.. .. .. .. .. .. .. .. .. .. 410
+.. .. .. .. .. 422
+.. .. .. .. .. .. .. .. .. 420
+.. .. .. .. .. .. .. .. .. .. 418
+.. .. .. .. .. .. .. .. 416
+.. .. .. .. .. .. .. .. .. .. 414
+.. .. .. .. .. .. .. .. .. 412
+.. .. .. .. .. .. .. 410
.. .. .. .. .. .. .. .. .. 408
-.. .. .. .. .. .. 406
-.. .. .. .. .. .. .. .. .. 404
-.. .. .. .. .. .. .. .. 402
-.. .. .. .. .. .. .. 400
-.. .. .. .. .. .. .. .. .. 398
-.. .. .. .. .. .. .. .. 396
-.. .. .. .. .. .. .. .. .. 394
-.. .. .. .. .. 392
-.. .. .. .. .. .. .. .. .. 390
-.. .. .. .. .. .. .. .. 388
-.. .. .. .. .. .. .. 386
+.. .. .. .. .. .. .. .. .. .. 406
+.. .. .. .. .. .. .. .. 404
+.. .. .. .. .. .. .. .. .. 402
+.. .. .. .. .. .. .. .. .. .. 400
+.. .. .. .. .. .. 398
+.. .. .. .. .. .. .. .. .. 396
+.. .. .. .. .. .. .. .. 394
+.. .. .. .. .. .. .. .. .. 392
+.. .. .. .. .. .. .. .. .. .. 390
+.. .. .. .. .. .. .. 388
+.. .. .. .. .. .. .. .. .. .. 386
.. .. .. .. .. .. .. .. .. 384
.. .. .. .. .. .. .. .. 382
-.. .. .. .. .. .. 380
-.. .. .. .. .. .. .. .. 378
-.. .. .. .. .. .. .. .. .. 376
-.. .. .. .. .. .. .. 374
-.. .. .. .. .. .. .. .. .. 372
-.. .. .. .. .. .. .. .. 370
-.. .. .. .. .. .. .. .. .. 368
-.. 366
-.. .. .. .. .. .. .. 364
-.. .. .. .. .. .. .. .. 362
-.. .. .. .. .. .. 360
-.. .. .. .. .. .. .. .. 358
-.. .. .. .. .. .. .. 356
+.. .. .. .. .. .. .. .. .. .. 380
+.. .. .. .. .. .. .. .. .. 378
+.. .. .. .. .. .. .. .. .. .. 376
+.. .. .. 374
+.. .. .. .. .. .. .. .. 372
+.. .. .. .. .. .. .. 370
+.. .. .. .. .. .. 368
+.. .. .. .. .. .. .. .. 366
+.. .. .. .. .. .. .. .. .. 364
+.. .. .. .. .. .. .. 362
+.. .. .. .. .. .. .. .. 360
+.. .. .. .. .. 358
+.. .. .. .. .. .. .. .. 356
.. .. .. .. .. .. .. .. .. 354
-.. .. .. .. .. .. .. .. 352
-.. .. .. .. .. 350
+.. .. .. .. .. .. .. 352
+.. .. .. .. .. .. .. .. .. 350
.. .. .. .. .. .. .. .. 348
-.. .. .. .. .. .. .. 346
-.. .. .. .. .. .. .. .. 344
-.. .. .. .. .. .. 342
-.. .. .. .. .. .. .. 340
-.. .. .. .. 338
+.. .. .. .. .. .. .. .. .. 346
+.. .. .. .. .. .. 344
+.. .. .. .. .. .. .. .. .. 342
+.. .. .. .. .. .. .. .. 340
+.. .. .. .. .. .. .. .. .. 338
.. .. .. .. .. .. .. 336
-.. .. .. .. .. .. .. .. 334
-.. .. .. .. .. .. 332
+.. .. .. .. .. .. .. .. .. 334
+.. .. .. .. .. .. .. .. 332
.. .. .. .. .. .. .. .. .. 330
-.. .. .. .. .. .. .. .. 328
+.. .. .. .. 328
.. .. .. .. .. .. .. .. .. 326
-.. .. .. .. .. .. .. 324
-.. .. .. .. .. .. .. .. 322
-.. .. .. .. .. .. .. .. .. 320
-.. .. .. .. .. 318
+.. .. .. .. .. .. .. .. 324
+.. .. .. .. .. .. .. 322
+.. .. .. .. .. .. .. .. 320
+.. .. .. .. .. .. 318
.. .. .. .. .. .. .. .. .. 316
.. .. .. .. .. .. .. .. 314
-.. .. .. .. .. .. .. 312
+.. .. .. .. .. .. .. .. .. .. 312
.. .. .. .. .. .. .. .. .. 310
-.. .. .. .. .. .. .. .. 308
-.. .. .. .. .. .. .. .. .. 306
-.. .. .. .. .. .. 304
+.. .. .. .. .. .. .. .. .. .. 308
+.. .. .. .. .. .. .. 306
+.. .. .. .. .. .. .. .. .. .. 304
.. .. .. .. .. .. .. .. .. 302
.. .. .. .. .. .. .. .. 300
.. .. .. .. .. .. .. .. .. 298
-.. .. .. .. .. .. .. 296
+.. .. .. .. .. 296
.. .. .. .. .. .. .. .. .. 294
.. .. .. .. .. .. .. .. 292
-.. .. .. 290
-.. .. .. .. .. .. .. .. 288
-.. .. .. .. .. .. .. .. .. 286
-.. .. .. .. .. .. .. 284
+.. .. .. .. .. .. .. .. .. 290
+.. .. .. .. .. .. .. 288
+.. .. .. .. .. .. .. .. 286
+.. .. .. .. .. .. 284
.. .. .. .. .. .. .. .. .. 282
.. .. .. .. .. .. .. .. 280
.. .. .. .. .. .. .. .. .. 278
-.. .. .. .. .. .. 276
-.. .. .. .. .. .. .. .. 274
-.. .. .. .. .. .. .. 272
+.. .. .. .. .. .. .. 276
+.. .. .. .. .. .. .. .. .. .. 274
+.. .. .. .. .. .. .. .. .. 272
.. .. .. .. .. .. .. .. 270
-.. .. .. .. .. 268
-.. .. .. .. .. .. .. .. 266
-.. .. .. .. .. .. .. 264
+.. .. .. .. .. .. .. .. .. 268
+.. .. 266
+.. .. .. .. .. .. .. .. .. 264
.. .. .. .. .. .. .. .. 262
.. .. .. .. .. .. .. .. .. 260
-.. .. .. .. .. .. 258
-.. .. .. .. .. .. .. .. 256
-.. .. .. .. .. .. .. 254
-.. .. .. .. 252
-.. .. .. .. .. .. .. .. .. .. 250
+.. .. .. .. .. .. .. 258
+.. .. .. .. .. .. .. .. .. 256
+.. .. .. .. .. .. .. .. 254
+.. .. .. .. .. .. .. .. .. 252
+.. .. .. .. .. .. 250
.. .. .. .. .. .. .. .. .. 248
.. .. .. .. .. .. .. .. 246
.. .. .. .. .. .. .. .. .. 244
.. .. .. .. .. .. .. 242
-.. .. .. .. .. .. .. .. .. 240
-.. .. .. .. .. .. .. .. 238
+.. .. .. .. .. .. .. .. 240
+.. .. .. .. .. 238
.. .. .. .. .. .. .. .. .. 236
-.. .. .. .. .. .. 234
-.. .. .. .. .. .. .. .. .. .. 232
-.. .. .. .. .. .. .. .. .. 230
-.. .. .. .. .. .. .. .. .. .. 228
-.. .. .. .. .. .. .. .. 226
-.. .. .. .. .. .. .. .. .. 224
-.. .. .. .. .. .. .. .. .. .. 222
-.. .. .. .. .. .. .. 220
-.. .. .. .. .. .. .. .. .. 218
-.. .. .. .. .. .. .. .. 216
-.. .. .. .. .. 214
-.. .. .. .. .. .. .. .. .. .. 212
-.. .. .. .. .. .. .. .. .. 210
-.. .. .. .. .. .. .. .. .. .. 208
-.. .. .. .. .. .. .. .. 206
+.. .. .. .. .. .. .. .. 234
+.. .. .. .. .. .. .. .. .. 232
+.. .. .. .. .. .. .. 230
+.. .. .. .. .. .. .. .. 228
+.. .. .. .. .. .. 226
+.. .. .. .. .. .. .. .. .. .. 224
+.. .. .. .. .. .. .. .. .. 222
+.. .. .. .. .. .. .. .. 220
+.. .. .. .. .. .. .. .. .. .. 218
+.. .. .. .. .. .. .. .. .. 216
+.. .. .. .. .. .. .. 214
+.. .. .. .. .. .. .. .. .. 212
+.. .. .. .. .. .. .. .. 210
+.. .. .. .. 208
+.. .. .. .. .. .. .. .. .. .. 206
.. .. .. .. .. .. .. .. .. 204
-.. .. .. .. .. .. .. 202
-.. .. .. .. .. .. .. .. .. 200
+.. .. .. .. .. .. .. .. .. .. 202
+.. .. .. .. .. .. .. .. 200
.. .. .. .. .. .. .. .. .. .. 198
-.. .. .. .. .. .. .. .. 196
-.. .. .. .. .. .. .. .. .. 194
-.. .. .. .. .. .. 192
-.. .. .. .. .. .. .. .. .. 190
-.. .. .. .. .. .. .. .. .. .. 188
-.. .. .. .. .. .. .. .. 186
-.. .. .. .. .. .. .. .. .. 184
-.. .. .. .. .. .. .. 182
-.. .. .. .. .. .. .. .. .. .. 180
+.. .. .. .. .. .. .. .. .. 196
+.. .. .. .. .. .. .. 194
+.. .. .. .. .. .. .. .. .. 192
+.. .. .. .. .. .. .. .. .. .. 190
+.. .. .. .. .. .. .. .. 188
+.. .. .. .. .. .. .. .. .. 186
+.. .. .. .. .. .. 184
+.. .. .. .. .. .. .. .. .. 182
+.. .. .. .. .. .. .. .. 180
.. .. .. .. .. .. .. .. .. 178
-.. .. .. .. .. .. .. .. 176
-.. .. .. .. .. .. .. .. .. 174
-.. .. 172
+.. .. .. .. .. .. .. 176
+.. .. .. .. .. .. .. .. .. .. 174
+.. .. .. .. .. .. .. .. .. 172
.. .. .. .. .. .. .. .. 170
-.. .. .. .. .. .. .. 168
-.. .. .. .. .. .. .. .. 166
-.. .. .. .. .. .. .. .. .. 164
-.. .. .. .. .. .. 162
-.. .. .. .. .. .. .. .. 160
-.. .. .. .. .. .. .. 158
-.. .. .. .. .. .. .. .. 156
-.. .. .. .. .. 154
-.. .. .. .. .. .. .. .. .. 152
-.. .. .. .. .. .. .. .. 150
-.. .. .. .. .. .. .. 148
-.. .. .. .. .. .. .. .. .. .. 146
+.. .. .. .. .. .. .. .. .. .. 168
+.. .. .. .. .. .. .. .. .. 166
+.. .. .. .. .. .. .. .. .. .. 164
+.. .. .. .. .. 162
+.. .. .. .. .. .. .. .. .. 160
+.. .. .. .. .. .. .. .. 158
+.. .. .. .. .. .. .. .. .. 156
+.. .. .. .. .. .. .. 154
+.. .. .. .. .. .. .. .. 152
+.. .. .. .. .. .. .. .. .. 150
+.. .. .. .. .. .. 148
+.. .. .. .. .. .. .. .. 146
.. .. .. .. .. .. .. .. .. 144
-.. .. .. .. .. .. .. .. .. .. 142
-.. .. .. .. .. .. .. .. 140
-.. .. .. .. .. .. .. .. .. 138
-.. .. .. .. .. .. 136
+.. .. .. .. .. .. .. 142
+.. .. .. .. .. .. .. .. .. 140
+.. .. .. .. .. .. .. .. 138
+.. .. .. .. .. .. .. .. .. .. 136
.. .. .. .. .. .. .. .. .. 134
-.. .. .. .. .. .. .. .. 132
-.. .. .. .. .. .. .. .. .. 130
+.. .. .. 132
+.. .. .. .. .. .. .. .. 130
.. .. .. .. .. .. .. 128
-.. .. .. .. .. .. .. .. 126
-.. .. .. .. 124
-.. .. .. .. .. .. .. .. 122
-.. .. .. .. .. .. .. 120
+.. .. .. .. .. .. .. .. .. 126
+.. .. .. .. .. .. .. .. 124
+.. .. .. .. .. .. 122
+.. .. .. .. .. .. .. .. .. 120
.. .. .. .. .. .. .. .. 118
-.. .. .. .. .. .. 116
+.. .. .. .. .. .. .. 116
.. .. .. .. .. .. .. .. .. 114
.. .. .. .. .. .. .. .. 112
.. .. .. .. .. .. .. .. .. 110
-.. .. .. .. .. .. .. 108
-.. .. .. .. .. .. .. .. 106
-.. .. .. .. .. .. .. .. .. 104
-.. .. .. .. .. 102
-.. .. .. .. .. .. .. .. 100
+.. .. .. .. .. 108
+.. .. .. .. .. .. .. .. .. 106
+.. .. .. .. .. .. .. .. 104
+.. .. .. .. .. .. .. .. .. 102
+.. .. .. .. .. .. .. 100
.. .. .. .. .. .. .. .. .. 98
-.. .. .. .. .. .. .. 96
-.. .. .. .. .. .. .. .. 94
-.. .. .. .. .. .. 92
-.. .. .. .. .. .. .. .. .. 90
-.. .. .. .. .. .. .. .. 88
-.. .. .. .. .. .. .. .. .. 86
-.. .. .. .. .. .. .. 84
-.. .. .. .. .. .. .. .. .. 82
-.. .. .. .. .. .. .. .. 80
-.. .. .. .. .. .. .. .. .. 78
-.. .. .. 76
-.. .. .. .. .. .. .. .. 74
-.. .. .. .. .. .. .. 72
+.. .. .. .. .. .. .. .. 96
+.. .. .. .. .. .. .. .. .. 94
+.. .. .. .. .. .. .. .. .. .. 92
+.. .. .. .. .. .. 90
+.. .. .. .. .. .. .. .. .. 88
+.. .. .. .. .. .. .. .. 86
+.. .. .. .. .. .. .. .. .. 84
+.. .. .. .. .. .. .. 82
+.. .. .. .. .. .. .. .. .. 80
+.. .. .. .. .. .. .. .. 78
+.. .. .. .. 76
+.. .. .. .. .. .. .. .. .. 74
+.. .. .. .. .. .. .. .. 72
.. .. .. .. .. .. .. .. .. 70
-.. .. .. .. .. .. .. .. 68
-.. .. .. .. .. .. 66
+.. .. .. .. .. .. .. 68
+.. .. .. .. .. .. .. .. .. .. 66
.. .. .. .. .. .. .. .. .. 64
-.. .. .. .. .. .. .. .. 62
-.. .. .. .. .. .. .. 60
-.. .. .. .. .. .. .. .. 58
-.. .. .. .. .. 56
-.. .. .. .. .. .. .. .. 54
-.. .. .. .. .. .. .. 52
-.. .. .. .. .. .. .. .. 50
-.. .. .. .. .. .. 48
-.. .. .. .. .. .. .. .. 46
-.. .. .. .. .. .. .. 44
-.. .. .. .. .. .. .. .. 42
-.. .. .. .. 40
-.. .. .. .. .. .. .. .. .. 38
-.. .. .. .. .. .. .. .. 36
-.. .. .. .. .. .. .. 34
-.. .. .. .. .. .. .. .. 32
-.. .. .. .. .. .. 30
-.. .. .. .. .. .. .. .. 28
-.. .. .. .. .. .. .. .. .. 26
-.. .. .. .. .. .. .. 24
-.. .. .. .. .. .. .. .. .. 22
-.. .. .. .. .. .. .. .. 20
-.. .. .. .. .. .. .. .. .. 18
-.. .. .. .. .. 16
-.. .. .. .. .. .. .. 14
+.. .. .. .. .. .. .. .. .. .. 62
+.. .. .. .. .. .. .. .. 60
+.. .. .. .. .. .. .. .. .. 58
+.. .. .. .. .. .. 56
+.. .. .. .. .. .. .. .. .. 54
+.. .. .. .. .. .. .. .. 52
+.. .. .. .. .. .. .. .. .. 50
+.. .. .. .. .. .. .. 48
+.. .. .. .. .. .. .. .. .. 46
+.. .. .. .. .. .. .. .. 44
+.. .. .. .. .. .. .. .. .. 42
+.. .. .. .. .. 40
+.. .. .. .. .. .. .. .. .. .. 38
+.. .. .. .. .. .. .. .. .. 36
+.. .. .. .. .. .. .. .. 34
+.. .. .. .. .. .. .. .. .. 32
+.. .. .. .. .. .. .. 30
+.. .. .. .. .. .. .. .. .. 28
+.. .. .. .. .. .. .. .. 26
+.. .. .. .. .. .. .. .. .. 24
+.. .. .. .. .. .. .. .. .. .. 22
+.. .. .. .. .. .. 20
+.. .. .. .. .. .. .. .. .. .. 18
+.. .. .. .. .. .. .. .. .. 16
+.. .. .. .. .. .. .. .. .. .. 14
.. .. .. .. .. .. .. .. 12
-.. .. .. .. .. .. 10
-.. .. .. .. .. .. .. .. 8
-.. .. .. .. .. .. .. .. .. 6
-.. .. .. .. .. .. .. 4
-.. .. .. .. .. .. .. .. 0
+.. .. .. .. .. .. .. .. .. 10
+.. .. .. .. .. .. .. .. .. .. 8
+.. .. .. .. .. .. .. 6
+.. .. .. .. .. .. .. .. .. 4
+.. .. .. .. .. .. .. .. 2
+.. .. .. .. .. .. .. .. .. 0
-- end foo ----------------
|
|
From: <sv...@va...> - 2006-10-01 14:09:58
|
Author: sewardj
Date: 2006-10-01 15:09:55 +0100 (Sun, 01 Oct 2006)
New Revision: 6107
Log:
Move these to a new home.
Added:
branches/AIX5/include/vki/vki-posixtypes-amd64-linux.h
branches/AIX5/include/vki/vki-posixtypes-ppc32-linux.h
branches/AIX5/include/vki/vki-posixtypes-ppc64-linux.h
branches/AIX5/include/vki/vki-posixtypes-x86-linux.h
Removed:
branches/AIX5/include/vki_posixtypes-amd64-linux.h
branches/AIX5/include/vki_posixtypes-ppc32-linux.h
branches/AIX5/include/vki_posixtypes-ppc64-linux.h
branches/AIX5/include/vki_posixtypes-x86-linux.h
Copied: branches/AIX5/include/vki/vki-posixtypes-amd64-linux.h (from rev =
6081, branches/AIX5/include/vki_posixtypes-amd64-linux.h)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-posixtypes-amd64-linux.h =
(rev 0)
+++ branches/AIX5/include/vki/vki-posixtypes-amd64-linux.h 2006-10-01 14:=
09:55 UTC (rev 6107)
@@ -0,0 +1,68 @@
+
+/*--------------------------------------------------------------------*/
+/*--- AMD64/Linux-specific kernel interface: posix types. ---*/
+/*--- vki-posixtypes-amd64-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2006 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.
+*/
+
+#ifndef __VKI_POSIXTYPES_AMD64_LINUX_H
+#define __VKI_POSIXTYPES_AMD64_LINUX_H
+
+//----------------------------------------------------------------------
+// From linux-2.6.9/include/asm-x86_64/posix_types.h
+//----------------------------------------------------------------------
+
+typedef unsigned int __vki_kernel_mode_t;
+typedef long __vki_kernel_off_t;
+typedef int __vki_kernel_pid_t;
+typedef int __vki_kernel_ipc_pid_t;
+typedef unsigned int __vki_kernel_uid_t;
+typedef unsigned int __vki_kernel_gid_t;
+typedef unsigned long __vki_kernel_size_t;
+typedef long __vki_kernel_time_t;
+typedef long __vki_kernel_suseconds_t;
+typedef long __vki_kernel_clock_t;
+typedef int __vki_kernel_timer_t;
+typedef int __vki_kernel_clockid_t;
+typedef char * __vki_kernel_caddr_t;
+
+typedef long long __vki_kernel_loff_t;
+
+typedef struct {
+ int val[2];
+} __vki_kernel_fsid_t;
+
+typedef unsigned short __vki_kernel_old_uid_t;
+typedef unsigned short __vki_kernel_old_gid_t;
+typedef __vki_kernel_uid_t __vki_kernel_uid32_t;
+typedef __vki_kernel_gid_t __vki_kernel_gid32_t;
+
+#endif // __VKI_POSIXTYPES_AMD64_LINUX_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Copied: branches/AIX5/include/vki/vki-posixtypes-ppc32-linux.h (from rev =
6081, branches/AIX5/include/vki_posixtypes-ppc32-linux.h)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-posixtypes-ppc32-linux.h =
(rev 0)
+++ branches/AIX5/include/vki/vki-posixtypes-ppc32-linux.h 2006-10-01 14:=
09:55 UTC (rev 6107)
@@ -0,0 +1,68 @@
+
+/*--------------------------------------------------------------------*/
+/*--- PPC32/Linux-specific kernel interface: posix types. ---*/
+/*--- vki-posixtypes-ppc32-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 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 __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
+#define __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
+
+//----------------------------------------------------------------------
+// From linux-2.6.9/include/asm-ppc/posix_types.h
+//----------------------------------------------------------------------
+
+typedef unsigned int __vki_kernel_mode_t;
+typedef long __vki_kernel_off_t;
+typedef int __vki_kernel_pid_t;
+typedef unsigned short __vki_kernel_ipc_pid_t;
+typedef unsigned int __vki_kernel_uid_t;
+typedef unsigned int __vki_kernel_gid_t;
+typedef unsigned int __vki_kernel_size_t;
+typedef long __vki_kernel_time_t;
+typedef long __vki_kernel_suseconds_t;
+typedef long __vki_kernel_clock_t;
+typedef int __vki_kernel_timer_t;
+typedef int __vki_kernel_clockid_t;
+typedef char * __vki_kernel_caddr_t;
+typedef unsigned int __vki_kernel_uid32_t;
+typedef unsigned int __vki_kernel_gid32_t;
+
+typedef unsigned int __vki_kernel_old_uid_t;
+typedef unsigned int __vki_kernel_old_gid_t;
+
+typedef long long __vki_kernel_loff_t;
+
+typedef struct {
+ int val[2];
+} __vki_kernel_fsid_t;
+
+#endif // __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Copied: branches/AIX5/include/vki/vki-posixtypes-ppc64-linux.h (from rev =
6081, branches/AIX5/include/vki_posixtypes-ppc64-linux.h)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-posixtypes-ppc64-linux.h =
(rev 0)
+++ branches/AIX5/include/vki/vki-posixtypes-ppc64-linux.h 2006-10-01 14:=
09:55 UTC (rev 6107)
@@ -0,0 +1,75 @@
+
+/*--------------------------------------------------------------------*/
+/*--- PPC64/Linux-specific kernel interface: posix types. ---*/
+/*--- vki-posixtypes-ppc64-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 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 __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
+#define __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
+
+//----------------------------------------------------------------------
+// From linux-2.6.13/include/asm-ppc64/posix_types.h
+//----------------------------------------------------------------------
+
+typedef unsigned long __vki_kernel_ino_t;
+typedef unsigned long __vki_kernel_nlink_t;
+typedef unsigned int __vki_kernel_mode_t;
+typedef long __vki_kernel_off_t;
+typedef long long __vki_kernel_loff_t;
+typedef int __vki_kernel_pid_t;
+typedef int __vki_kernel_ipc_pid_t;
+typedef unsigned int __vki_kernel_uid_t;
+typedef unsigned int __vki_kernel_gid_t;
+typedef unsigned long __vki_kernel_size_t;
+typedef long __vki_kernel_ssize_t;
+typedef long __vki_kernel_ptrdiff_t;
+typedef long __vki_kernel_time_t;
+typedef int __vki_kernel_timer_t;
+typedef int __vki_kernel_clockid_t;
+typedef long __vki_kernel_suseconds_t;
+typedef long __vki_kernel_clock_t;
+typedef int __vki_kernel_daddr_t;
+typedef char * __vki_kernel_caddr_t;
+typedef unsigned short __vki_kernel_uid16_t;
+typedef unsigned short __vki_kernel_gid16_t;
+typedef unsigned int __vki_kernel_uid32_t;
+typedef unsigned int __vki_kernel_gid32_t;
+
+typedef unsigned int __vki_kernel_old_uid_t;
+typedef unsigned int __vki_kernel_old_gid_t;
+typedef unsigned long __vki_kernel_old_dev_t;
+
+typedef struct {
+ int val[2];
+} __vki_kernel_fsid_t;
+
+#endif // __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Copied: branches/AIX5/include/vki/vki-posixtypes-x86-linux.h (from rev 60=
81, branches/AIX5/include/vki_posixtypes-x86-linux.h)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki/vki-posixtypes-x86-linux.h =
(rev 0)
+++ branches/AIX5/include/vki/vki-posixtypes-x86-linux.h 2006-10-01 14:09=
:55 UTC (rev 6107)
@@ -0,0 +1,68 @@
+
+/*--------------------------------------------------------------------*/
+/*--- x86/Linux-specific kernel interface: posix types. ---*/
+/*--- vki-posixtypes-x86-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2006 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.
+*/
+
+#ifndef __VKI_POSIXTYPES_X86_LINUX_H
+#define __VKI_POSIXTYPES_X86_LINUX_H
+
+//----------------------------------------------------------------------
+// From linux-2.6.8.1/include/asm-i386/posix_types.h
+//----------------------------------------------------------------------
+
+typedef unsigned short __vki_kernel_mode_t;
+typedef long __vki_kernel_off_t;
+typedef int __vki_kernel_pid_t;
+typedef unsigned short __vki_kernel_ipc_pid_t;
+typedef unsigned short __vki_kernel_uid_t;
+typedef unsigned short __vki_kernel_gid_t;
+typedef unsigned int __vki_kernel_size_t;
+typedef long __vki_kernel_time_t;
+typedef long __vki_kernel_suseconds_t;
+typedef long __vki_kernel_clock_t;
+typedef int __vki_kernel_timer_t;
+typedef int __vki_kernel_clockid_t;
+typedef char * __vki_kernel_caddr_t;
+typedef unsigned int __vki_kernel_uid32_t;
+typedef unsigned int __vki_kernel_gid32_t;
+
+typedef unsigned short __vki_kernel_old_uid_t;
+typedef unsigned short __vki_kernel_old_gid_t;
+
+typedef long long __vki_kernel_loff_t;
+
+typedef struct {
+ int val[2];
+} __vki_kernel_fsid_t;
+
+#endif // __VKI_POSIXTYPES_X86_LINUX_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Deleted: branches/AIX5/include/vki_posixtypes-amd64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki_posixtypes-amd64-linux.h 2006-10-01 13:57:2=
4 UTC (rev 6106)
+++ branches/AIX5/include/vki_posixtypes-amd64-linux.h 2006-10-01 14:09:5=
5 UTC (rev 6107)
@@ -1,68 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- AMD64/Linux-specific kernel interface: posix types. ---*/
-/*--- vki_posixtypes-amd64-linux.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2006 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.
-*/
-
-#ifndef __VKI_POSIXTYPES_AMD64_LINUX_H
-#define __VKI_POSIXTYPES_AMD64_LINUX_H
-
-//----------------------------------------------------------------------
-// From linux-2.6.9/include/asm-x86_64/posix_types.h
-//----------------------------------------------------------------------
-
-typedef unsigned int __vki_kernel_mode_t;
-typedef long __vki_kernel_off_t;
-typedef int __vki_kernel_pid_t;
-typedef int __vki_kernel_ipc_pid_t;
-typedef unsigned int __vki_kernel_uid_t;
-typedef unsigned int __vki_kernel_gid_t;
-typedef unsigned long __vki_kernel_size_t;
-typedef long __vki_kernel_time_t;
-typedef long __vki_kernel_suseconds_t;
-typedef long __vki_kernel_clock_t;
-typedef int __vki_kernel_timer_t;
-typedef int __vki_kernel_clockid_t;
-typedef char * __vki_kernel_caddr_t;
-
-typedef long long __vki_kernel_loff_t;
-
-typedef struct {
- int val[2];
-} __vki_kernel_fsid_t;
-
-typedef unsigned short __vki_kernel_old_uid_t;
-typedef unsigned short __vki_kernel_old_gid_t;
-typedef __vki_kernel_uid_t __vki_kernel_uid32_t;
-typedef __vki_kernel_gid_t __vki_kernel_gid32_t;
-
-#endif // __VKI_POSIXTYPES_AMD64_LINUX_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Deleted: branches/AIX5/include/vki_posixtypes-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki_posixtypes-ppc32-linux.h 2006-10-01 13:57:2=
4 UTC (rev 6106)
+++ branches/AIX5/include/vki_posixtypes-ppc32-linux.h 2006-10-01 14:09:5=
5 UTC (rev 6107)
@@ -1,68 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- PPC32/Linux-specific kernel interface: posix types. ---*/
-/*--- vki_posixtypes-ppc32-linux.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 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 __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
-#define __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
-
-//----------------------------------------------------------------------
-// From linux-2.6.9/include/asm-ppc/posix_types.h
-//----------------------------------------------------------------------
-
-typedef unsigned int __vki_kernel_mode_t;
-typedef long __vki_kernel_off_t;
-typedef int __vki_kernel_pid_t;
-typedef unsigned short __vki_kernel_ipc_pid_t;
-typedef unsigned int __vki_kernel_uid_t;
-typedef unsigned int __vki_kernel_gid_t;
-typedef unsigned int __vki_kernel_size_t;
-typedef long __vki_kernel_time_t;
-typedef long __vki_kernel_suseconds_t;
-typedef long __vki_kernel_clock_t;
-typedef int __vki_kernel_timer_t;
-typedef int __vki_kernel_clockid_t;
-typedef char * __vki_kernel_caddr_t;
-typedef unsigned int __vki_kernel_uid32_t;
-typedef unsigned int __vki_kernel_gid32_t;
-
-typedef unsigned int __vki_kernel_old_uid_t;
-typedef unsigned int __vki_kernel_old_gid_t;
-
-typedef long long __vki_kernel_loff_t;
-
-typedef struct {
- int val[2];
-} __vki_kernel_fsid_t;
-
-#endif // __PPC32_LINUX_VKI_ARCH_POSIXTYPES_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Deleted: branches/AIX5/include/vki_posixtypes-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki_posixtypes-ppc64-linux.h 2006-10-01 13:57:2=
4 UTC (rev 6106)
+++ branches/AIX5/include/vki_posixtypes-ppc64-linux.h 2006-10-01 14:09:5=
5 UTC (rev 6107)
@@ -1,75 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- PPC64/Linux-specific kernel interface: posix types. ---*/
-/*--- vki_posixtypes-ppc64-linux.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 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 __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
-#define __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
-
-//----------------------------------------------------------------------
-// From linux-2.6.13/include/asm-ppc64/posix_types.h
-//----------------------------------------------------------------------
-
-typedef unsigned long __vki_kernel_ino_t;
-typedef unsigned long __vki_kernel_nlink_t;
-typedef unsigned int __vki_kernel_mode_t;
-typedef long __vki_kernel_off_t;
-typedef long long __vki_kernel_loff_t;
-typedef int __vki_kernel_pid_t;
-typedef int __vki_kernel_ipc_pid_t;
-typedef unsigned int __vki_kernel_uid_t;
-typedef unsigned int __vki_kernel_gid_t;
-typedef unsigned long __vki_kernel_size_t;
-typedef long __vki_kernel_ssize_t;
-typedef long __vki_kernel_ptrdiff_t;
-typedef long __vki_kernel_time_t;
-typedef int __vki_kernel_timer_t;
-typedef int __vki_kernel_clockid_t;
-typedef long __vki_kernel_suseconds_t;
-typedef long __vki_kernel_clock_t;
-typedef int __vki_kernel_daddr_t;
-typedef char * __vki_kernel_caddr_t;
-typedef unsigned short __vki_kernel_uid16_t;
-typedef unsigned short __vki_kernel_gid16_t;
-typedef unsigned int __vki_kernel_uid32_t;
-typedef unsigned int __vki_kernel_gid32_t;
-
-typedef unsigned int __vki_kernel_old_uid_t;
-typedef unsigned int __vki_kernel_old_gid_t;
-typedef unsigned long __vki_kernel_old_dev_t;
-
-typedef struct {
- int val[2];
-} __vki_kernel_fsid_t;
-
-#endif // __PPC64_LINUX_VKI_ARCH_POSIXTYPES_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Deleted: branches/AIX5/include/vki_posixtypes-x86-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/AIX5/include/vki_posixtypes-x86-linux.h 2006-10-01 13:57:24 =
UTC (rev 6106)
+++ branches/AIX5/include/vki_posixtypes-x86-linux.h 2006-10-01 14:09:55 =
UTC (rev 6107)
@@ -1,68 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- x86/Linux-specific kernel interface: posix types. ---*/
-/*--- vki_posixtypes-x86-linux.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2006 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.
-*/
-
-#ifndef __VKI_POSIXTYPES_X86_LINUX_H
-#define __VKI_POSIXTYPES_X86_LINUX_H
-
-//----------------------------------------------------------------------
-// From linux-2.6.8.1/include/asm-i386/posix_types.h
-//----------------------------------------------------------------------
-
-typedef unsigned short __vki_kernel_mode_t;
-typedef long __vki_kernel_off_t;
-typedef int __vki_kernel_pid_t;
-typedef unsigned short __vki_kernel_ipc_pid_t;
-typedef unsigned short __vki_kernel_uid_t;
-typedef unsigned short __vki_kernel_gid_t;
-typedef unsigned int __vki_kernel_size_t;
-typedef long __vki_kernel_time_t;
-typedef long __vki_kernel_suseconds_t;
-typedef long __vki_kernel_clock_t;
-typedef int __vki_kernel_timer_t;
-typedef int __vki_kernel_clockid_t;
-typedef char * __vki_kernel_caddr_t;
-typedef unsigned int __vki_kernel_uid32_t;
-typedef unsigned int __vki_kernel_gid32_t;
-
-typedef unsigned short __vki_kernel_old_uid_t;
-typedef unsigned short __vki_kernel_old_gid_t;
-
-typedef long long __vki_kernel_loff_t;
-
-typedef struct {
- int val[2];
-} __vki_kernel_fsid_t;
-
-#endif // __VKI_POSIXTYPES_X86_LINUX_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2006-10-01 13:57:28
|
Author: sewardj
Date: 2006-10-01 14:57:24 +0100 (Sun, 01 Oct 2006)
New Revision: 6106
Log:
Rename the Linux launcher and add an AIX5 one. One day there might be
a Grand Unified Launcher, but for now AIX5 is so different it's easier
to have a completely different implementation.
Added:
branches/AIX5/coregrind/launcher-aix5-bootblock.h
branches/AIX5/coregrind/launcher-aix5.c
branches/AIX5/coregrind/launcher-linux.c
Removed:
branches/AIX5/coregrind/launcher.c
Added: branches/AIX5/coregrind/launcher-aix5-bootblock.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
--- branches/AIX5/coregrind/launcher-aix5-bootblock.h =
(rev 0)
+++ branches/AIX5/coregrind/launcher-aix5-bootblock.h 2006-10-01 13:57:24=
UTC (rev 6106)
@@ -0,0 +1,85 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Structure written into the child process by launcher-aix5.c. ---*/
+/*--- launcher-aix5-bootblock.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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.
+*/
+
+
+/* This is the structure written into the child process by the AIX5
+ launcher. The tool's entry point (see bottom of
+ coregrind/m_main.c) must be aware of the layout as it will have to
+ read info from it at startup. This struct is designed to work
+ equally well in 32- and 64-bit mode. It must be placed at an
+ 8-aligned address in the child. */
+
+#define N_BOOTBLOCK_INSNS 60 /* number of insns */
+#define N_BOOTBLOCK_ERRMSG 64 /* max bytes in the error message */
+#define N_BOOTBLOCK_TOOLFILE 256 /* max bytes in the tool file name */
+
+typedef
+
+ struct {
+ /* Adler32 checksum of the uncompressed data of the compressed
+ page (the second part of which contains this struct. */
+ /* 0 */ UInt adler32;
+=20
+ /* The system call numbers for enough critical syscalls that the
+ tool can start both debug logging and also read the
+ /proc/../sysent file. */
+ /* 4 */ UInt __NR_getpid;
+ /* 8 */ UInt __NR_write;
+ /* 12 */ UInt __NR_exit;
+ /* 16 */ UInt __NR_open;
+ /* 20 */ UInt __NR_read;
+ /* 24 */ UInt __NR_close;
+ /* 28 */ UInt __off28;
+
+ /* The 37 integer registers for the client, as they should be at
+ startup. On 32-bit targets the registers are stored in the
+ lower half of each quadword, which, since this is a bigendian
+ platform, is the higher-addressed 4 bytes. */
+ /* MUST BE 8-aligned */
+ /* 32 */ ULong iregs_pc_cr_lr_ctr_xer[37];
+
+ /* The instructions for the bootstrap loader. */
+ /* 328 */ UInt code[N_BOOTBLOCK_INSNS];
+
+ /* A zero-terminated error message to be used when the bootstrap
+ loader fails. */
+ /* 628 */ UChar errmsg[N_BOOTBLOCK_ERRMSG];
+
+ /* The name of the tool file, again zero-terminated. */
+ /* 692 */ UChar toolfile[N_BOOTBLOCK_TOOLFILE];
+
+ /* 1024 */
+ }
+ AIX5Bootblock;
+
+/*--------------------------------------------------------------------*/
+/*--- end launcher-aix5-bootblock.h ---*/
+/*--------------------------------------------------------------------*/
Added: branches/AIX5/coregrind/launcher-aix5.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
--- branches/AIX5/coregrind/launcher-aix5.c (rev =
0)
+++ branches/AIX5/coregrind/launcher-aix5.c 2006-10-01 13:57:24 UTC (rev =
6106)
@@ -0,0 +1,1634 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Launching Valgrind on AIX5. launcher-aix5.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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.
+*/
+
+/* Cut-down version of the normal launcher, except it is completely
+ different on AIX5. Does not handle shell scripts, only real
+ machine code XCOFF executables.
+
+ Note: this is a "normal" program and not part of Valgrind proper,
+ and so it doesn't have to conform to Valgrind's arcane rules on
+ no-glibc-usage etc.
+*/
+
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/ptrace.h>
+#include <sys/wait.h>
+
+/* Get both struct __ld_info32 and struct __ld_info64. */
+#define __LDINFO_PTRACE32__ 1
+#define __LDINFO_PTRACE64__ 1
+#include <sys/ldr.h>
+
+#include <sys/reg.h> /* GPR0 .. GPR31 */
+#include <sys/procfs.h> /* prsysent_t */
+
+#include "pub_core_debuglog.h"
+#include "pub_core_vki.h"
+#include "pub_core_vkiscnums.h"
+#include "pub_core_libcproc.h" // For VALGRIND_LIB, VALGRIND_LAUNCHER
+
+/* Get the definition for the AIX5Bootblock structure. This is what
+ we will generate and patch into the child's address space. */
+#include "launcher-aix5-bootblock.h"
+
+/* Simple routines for Huffman compression/decompression */
+#include "m_initimg/simple_huffman.c"
+
+
+/* -------------------------------------------------------------- */
+/* --- --- */
+/* --- A uniform interface to the ptrace facilities we need. --- */
+/* --- --- */
+/* -------------------------------------------------------------- */
+
+typedef
+ struct {
+ pid_t pid;
+ Bool is64;
+ }=20
+ Child;
+
+
+/* Read len bytes from target's rsrc to local ldst. Returns True if
+ error. */
+static=20
+Bool ptrace_READ_BLOCK ( Child* ch, Int len, void* ldst, Addr64 rsrc )
+{
+ Int r;
+ assert(len >=3D 0 && len <=3D 1024);
+ r =3D ptrace64( PT_READ_BLOCK, (ULong)ch->pid, rsrc, len, ldst );
+ if (r =3D=3D len)
+ return False; /* success */
+ return True; /* error */
+}
+
+
+/* Write len bytes to target's rdst from local lsrc. Returns True if
+ error. */
+static
+Bool ptrace_WRITE_BLOCK ( Child* child, Int len, Addr64 rdst, void* lsrc=
)
+{
+ Int r;
+ assert(len >=3D 0 && len <=3D 1024);
+ r =3D ptrace64( PT_WRITE_BLOCK, (ULong)child->pid, rdst, len, lsrc );
+ if (r =3D=3D len)
+ return False; /* success */
+ return True; /* error */
+}
+
+
+/* Read a GPR from the target. Returns True if error. */
+static
+Bool ptrace_READ_GPR ( Child* child, Int reg, ULong* ldst )
+{
+ ULong w64;
+ UInt w32;
+ errno =3D 0;
+ if (child->is64) {
+ (void)ptrace64( PT_READ_GPR,=20
+ (ULong)child->pid, (ULong)reg, 8, (Int*)(&w64) );
+ if (errno !=3D 0) return True; /* error */
+ } else {
+ w32 =3D ptrace64( PT_READ_GPR,=20
+ (ULong)child->pid, (ULong)reg, 0, 0 );
+ if (errno !=3D 0) return True; /* error */
+ w64 =3D (ULong)w32;
+ }
+ *ldst =3D w64;
+ return False; /* success */
+}
+
+
+/* Write a GPR to the target. Returns True if error. */
+static
+Bool ptrace_WRITE_GPR ( Child* child, Int reg, ULong val )
+{
+ ULong w64;
+ UInt w32;
+ errno =3D 0;
+ if (child->is64) {
+ w64 =3D val;
+ (void)ptrace64( PT_WRITE_GPR,
+ (ULong)child->pid, (ULong)reg, 8, (Int*)&w64 );
+ if (errno !=3D 0) return True; /* error */
+ } else {
+ w32 =3D (UInt)val;
+ (void)ptrace64( PT_WRITE_GPR,=20
+ (ULong)child->pid, (ULong)reg, w32, 0 );
+ if (errno !=3D 0) return True; /* error */
+ }
+ return False; /* success */
+}
+
+
+/* -------------------------------------------------------------- */
+/* --- --- */
+/* --- Helper functions --- */
+/* --- --- */
+/* -------------------------------------------------------------- */
+
+/* Search the path for the client program */
+static const char* find_client ( const char* clientname )
+{
+ static char fullname[PATH_MAX];
+ const char *path =3D getenv("PATH");
+ const char *colon;
+
+ while (path)
+ {
+ if ((colon =3D strchr(path, ':')) =3D=3D NULL)
+ {
+ strcpy(fullname, path);
+ path =3D NULL;
+ }
+ else
+ {
+ memcpy(fullname, path, colon - path);
+ fullname[colon - path] =3D '\0';
+ path =3D colon + 1;
+ }
+ strcat(fullname, "/");
+ strcat(fullname, clientname);
+
+ if (access(fullname, R_OK|X_OK) =3D=3D 0)
+ return fullname;
+ }
+
+ return clientname;
+}
+
+/* Examine the given file. If it looks like valid XCOFF32 return 32,
+ if valid XCOFF64 return 64, else return 0. */
+static Int examine_client ( const char* clientname )
+{
+ UChar buf[16];
+ Int n;
+ FILE* f =3D fopen( clientname, "r" );
+ if (f =3D=3D NULL)
+ return 0;
+ n =3D fread( buf, 1, 16, f );
+ fclose(f);
+ if (n !=3D 16)
+ return 0;
+ if (buf[0] =3D=3D 0x01 && buf[1] =3D=3D 0xDF)
+ return 32; /* XCOFF32 */
+ if (buf[0] =3D=3D 0x01 && buf[1] =3D=3D 0xF7)
+ return 64; /* XCOFF64 */
+ return 0;
+}
+
+static Bool file_exists ( char* fname )
+{
+ struct stat buf;
+ int r =3D stat(fname, &buf);
+ return r =3D=3D 0;
+}
+
+static Addr64 ROUNDDN_PAGE ( Addr64 v )
+{
+ ULong p =3D (ULong)v;
+ ULong a =3D PAGE_SIZE;
+ p &=3D ~(a-1);
+ return (Addr64)p;
+}
+
+static Bool IS_PAGE_ALIGNED ( Addr64 v )
+{
+ ULong p =3D (ULong)v;
+ ULong a =3D PAGE_SIZE;
+ if (p & (a-1))
+ return False;
+ else
+ return True;
+}
+
+static Bool IS_8_ALIGNED ( Addr64 v )
+{
+ ULong p =3D (ULong)v;
+ ULong a =3D 8;
+ if (p & (a-1))
+ return False;
+ else
+ return True;
+}
+
+
+/* Read a 4096-byte page from CHILD's address space at location SRC,
+ into local address space at DST. Returns True if error, False
+ otherwise.
+*/
+static Bool ptrace_read_page ( Child* child, UChar* ldst, Addr64 rsrc )
+{
+ Int off;
+ Bool err;
+
+ assert(IS_PAGE_ALIGNED(rsrc));
+
+ off =3D 0;
+ err =3D ptrace_READ_BLOCK(child, 1024, ldst + off, rsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_READ_BLOCK(child, 1024, ldst + off, rsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_READ_BLOCK(child, 1024, ldst + off, rsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_READ_BLOCK(child, 1024, ldst + off, rsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ assert(off =3D=3D PAGE_SIZE);
+
+ return False;
+}
+
+
+/* Write a 4096-byte page from local address space at SRC to CHILD's
+ address space at location DST. Returns True if error, False
+ otherwise.
+*/
+static Bool ptrace_write_page ( Child* child, Addr64 rdst, UChar* lsrc )
+{
+ Int off;
+ Bool err;
+
+ assert(IS_PAGE_ALIGNED(rdst));
+
+ off =3D 0;
+ err =3D ptrace_WRITE_BLOCK(child, 1024, rdst + off, lsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_WRITE_BLOCK(child, 1024, rdst + off, lsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_WRITE_BLOCK(child, 1024, rdst + off, lsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ err =3D ptrace_WRITE_BLOCK(child, 1024, rdst + off, lsrc + off);
+ if (err) return err;
+
+ off +=3D 1024;
+ assert(off =3D=3D PAGE_SIZE);
+
+ return False;
+}
+
+
+/* Get 37 integer registers (GPR0 .. GPR31, PC, CR, LR, CTR, XER) from
+ CHILD into the given array. Returns True if there is any kind of
+ error. */
+static=20
+Bool ptrace_get_iregs_pc_cr_lr_ctr_xer (=20
+ Child* child,=20
+ /*OUT*/ULong* iregs_pc_cr_lr_ctr_xer=20
+ )
+{
+ Int i, j;
+ Bool err;
+
+ for (i =3D GPR0; i <=3D GPR31; i++) {
+ j =3D i - GPR0;
+ assert(j >=3D 0 && j < 32);
+ err =3D ptrace_READ_GPR( child, i, &iregs_pc_cr_lr_ctr_xer[j] );
+ if (err) return err;
+ }
+
+ /* PC */
+ err =3D ptrace_READ_GPR( child, IAR, &iregs_pc_cr_lr_ctr_xer[32+0] );
+ if (err) return err;
+
+ /* CR */
+ err =3D ptrace_READ_GPR( child, CR, &iregs_pc_cr_lr_ctr_xer[32+1] );
+ if (err) return err;
+
+ /* LR */
+ err =3D ptrace_READ_GPR( child, LR, &iregs_pc_cr_lr_ctr_xer[32+2] );
+ if (err) return err;
+
+ /* CTR */
+ err =3D ptrace_READ_GPR( child, CTR, &iregs_pc_cr_lr_ctr_xer[32+3] );
+ if (err) return err;
+
+ /* XER */
+ err =3D ptrace_READ_GPR( child, XER, &iregs_pc_cr_lr_ctr_xer[32+4] );
+ if (err) return err;
+
+ return False;
+}
+
+
+/* Set CHILD's program counter to the given value. Returns True if
+ there is any kind of error. */
+static=20
+Bool ptrace_put_pc ( Child* child, ULong newpc )
+{
+ return ptrace_WRITE_GPR( child, IAR, newpc );
+}
+
+
+/* Set CHILD's R31 to the given value. Returns True if there is any
+ kind of error. */
+static=20
+Bool ptrace_put_r31 ( Child* child, ULong newr31 )
+{
+ return ptrace_WRITE_GPR( child, GPR31, newr31 );
+}
+
+
+/* ------ Instruction generators ------ */
+
+static UInt mkFormD ( UInt opc1, UInt r1, UInt r2, UInt imm )
+{
+ UInt theInstr;
+ assert(opc1 < 0x40);
+ assert(r1 < 0x20);
+ assert(r2 < 0x20);
+ imm =3D imm & 0xFFFF;
+ theInstr =3D ((opc1<<26) | (r1<<21) | (r2<<16) | (imm));
+ return theInstr;
+}
+static UInt mkFormX ( UInt opc1,=20
+ UInt r1, UInt r2, UInt r3, UInt opc2, UInt b0 )
+{
+ UInt theInstr;
+ assert(opc1 < 0x40);
+ assert(r1 < 0x20);
+ assert(r2 < 0x20);
+ assert(r3 < 0x20);
+ assert(opc2 < 0x400);
+ assert(b0 < 0x2);
+ theInstr =3D ((opc1<<26) | (r1<<21) | (r2<<16) |
+ (r3<<11) | (opc2<<1) | (b0));
+ return theInstr;
+}
+static UInt mkFormXFX ( UInt r1, UInt f2, UInt opc2 )
+{
+ UInt theInstr;
+ assert(r1 < 0x20);
+ assert(f2 < 0x20);
+ assert(opc2 < 0x400);
+ switch (opc2) {
+ case 144: // mtcrf
+ assert(f2 < 0x100);
+ f2 =3D f2 << 1;
+ break;
+ case 339: // mfspr
+ case 371: // mftb
+ case 467: // mtspr
+ assert(f2 < 0x400);
+ // re-arrange split field
+ f2 =3D ((f2>>5) & 0x1F) | ((f2 & 0x1F)<<5);
+ break;
+ default: assert(0);
+ }
+ theInstr =3D ((31<<26) | (r1<<21) | (f2<<11) | (opc2<<1));
+ return theInstr;
+}
+static UInt mkFormMD ( UInt opc1, UInt r1, UInt r2,
+ UInt imm1, UInt imm2, UInt opc2 )
+{
+ UInt theInstr;
+ assert(opc1 < 0x40);
+ assert(r1 < 0x20);
+ assert(r2 < 0x20);
+ assert(imm1 < 0x40);
+ assert(imm2 < 0x40);
+ assert(opc2 < 0x08);
+ imm2 =3D ((imm2 & 0x1F) << 1) | (imm2 >> 5);
+ theInstr =3D ((opc1<<26) | (r1<<21) | (r2<<16) |
+ ((imm1 & 0x1F)<<11) | (imm2<<5) |
+ (opc2<<2) | ((imm1 >> 5)<<1));
+ return theInstr;
+}
+static UInt mkFormXO ( UInt opc1, UInt r1, UInt r2,
+ UInt r3, UInt b10, UInt opc2, UInt b0 )
+{
+ UInt theInstr;
+ assert(opc1 < 0x40);
+ assert(r1 < 0x20);
+ assert(r2 < 0x20);
+ assert(r3 < 0x20);
+ assert(b10 < 0x2);
+ assert(opc2 < 0x200);
+ assert(b0 < 0x2);
+ theInstr =3D ((opc1<<26) | (r1<<21) | (r2<<16) |
+ (r3<<11) | (b10 << 10) | (opc2<<1) | (b0));
+ return theInstr;
+}
+
+static UInt gen_lis_r_N ( UInt r, UInt N ) {
+ return mkFormD(15, r, 0, N & 0xFFFF); /* lis r,r,N */
+}
+static UInt gen_ori_r_r_N ( UInt r, UInt N ) {
+ return mkFormD(24, r, r, N & 0xFFFF); /* ori r,r,N */
+}
+static UInt gen_addi_rd_rs_N ( UInt rd, UInt rs, UInt N ) {
+ assert(rs !=3D 0);
+ return mkFormD(14, rd, rs, N & 0xFFFF); /* addi rd,rs,N */
+}
+static UInt gen_crorc_6_6_6 ( void ) {
+ return 0x4CC63342; /* crorc 6,6,6 */
+}
+static UInt gen_mr_rd_rs ( UInt rd, UInt rs ) {
+ return mkFormX(31, rs, rd, rs, 444, 0); /* or rd,rs,ts */
+}
+static UInt gen_bl_next ( void ) {
+ return 0x48000005; /* bl .+4 */
+}
+static UInt gen_mflr_r ( UInt r ) {
+ return mkFormXFX(r, 8, 339); /* mflr r */
+}
+static UInt gen_mtlr_r ( UInt r ) {
+ return mkFormXFX(r, 8, 467); /* mtlr r */
+}
+static UInt gen_blr ( void ) {
+ return 0x4E800020; /* blr */
+}
+__attribute__((unused))
+static UInt gen_blrl ( void ) {
+ return 0x4E800021; /* blrl */
+}
+static UInt gen_add_r_N ( UInt r, UInt N ) {
+ return mkFormD(14, r, r, N & 0xFFFF); /* addi r,r,N */
+}
+static UInt gen_cmpli_cr7_r_N ( UInt r, UInt N ) {
+ return mkFormD(10, 7<<2, r, N & 0xFFFF); /* cmpli cr7,r,N */
+}
+static UInt gen_bne_cr7_delta ( UInt delta ) {
+ return 0x409E0000 | (delta & 0x0000FFFC); /* bne- cr7,delta */
+}
+__attribute__((unused))
+static UInt gen_beq_cr7_delta ( UInt delta ) {
+ return 0x419E0000 | (delta & 0x0000FFFC); /* beq- cr7,delta */
+}
+static UInt gen_sc ( void ) {
+ return 0x44000002; /* sc */
+}
+static UInt gen_lwz_rd_off_ra ( UInt rd, UInt off, UInt ra ) {
+ return mkFormD(32, rd, ra, off); /* lwz rd, off(ra) */
+}
+static UInt gen_add_rd_rL_rR (UInt rd, UInt rsrcL, UInt rsrcR ) {
+ return mkFormXO(31, rd, rsrcL, rsrcR, 0, 266, 0);
+}
+static UInt gen_subf_rd_rL_rR (UInt rd, UInt rsrcL, UInt rsrcR ) {
+ return mkFormXO(31, rd, rsrcL, rsrcR, 0, 40, 0);
+}
+
+static Int emit_insn ( UInt* code, Int ix, UInt insn ) {
+ code[ix++] =3D insn;
+ return ix;
+}
+static Int emit_li32 ( UInt* code, Int ix, UInt rd, UInt imm32 ) {
+ code[ix++] =3D gen_lis_r_N(rd, imm32 >> 16);
+ code[ix++] =3D gen_ori_r_r_N(rd, imm32 & 0xFFFF);
+ return ix;
+}
+static Int emit_dosc ( UInt* code, Int ix ) {
+ /* Generate code to do a syscall and continue at the next insn.
+ Note: trashes r29. */
+ code[ix++] =3D gen_crorc_6_6_6();
+ code[ix++] =3D gen_bl_next();
+ code[ix++] =3D gen_mflr_r(29);
+ code[ix++] =3D gen_add_r_N(29,16);
+ code[ix++] =3D gen_mtlr_r(29);
+ code[ix++] =3D gen_sc();
+ return ix;
+}
+
+/* Generate 64-bit insns */
+static Int emit_li64 ( UInt* code, Int ix, UInt rd, ULong imm64 ) {
+ if (imm64 >=3D 0xFFFFFFFF80000000ULL || imm64 < 0x80000000ULL) {
+ // sign-extendable from 32 bits
+ // addis rd,r0,(imm64>>16) =3D> lis rd, (imm64>>16)
+ code[ix++] =3D mkFormD(15, rd, 0, (imm64>>16) & 0xFFFF);
+ // ori rd, rd, (imm64 & 0xFFFF)
+ code[ix++] =3D mkFormD(24, rd, rd, imm64 & 0xFFFF);
+ } else {
+ // load high word
+ // lis rd, (imm64>>48) & 0xFFFF
+ code[ix++] =3D mkFormD(15, rd, 0, (imm64>>48) & 0xFFFF);
+ // ori rd, rd, (imm64>>32) & 0xFFFF
+ code[ix++] =3D mkFormD(24, rd, rd, (imm64>>32) & 0xFFFF);
+ // shift rd low word to high word =3D> rldicr
+ code[ix++] =3D mkFormMD(30, rd, rd, 32, 31, 1);
+ // load low word
+ // oris rd, rd, (imm64>>16) & 0xFFFF
+ code[ix++] =3D mkFormD(25, rd, rd, (imm64>>16) & 0xFFFF);
+ // ori rd, rd, (imm64) & 0xFFFF
+ code[ix++] =3D mkFormD(24, rd, rd, imm64 & 0xFFFF);
+ }
+ return ix;
+}
+static UInt gen_ld_rd_off_ra ( UInt rd, UInt off, UInt ra ) {
+ assert((off & 3) =3D=3D 0);
+ return mkFormD(58, rd, ra, off); /* ld rd, off(ra) */
+}
+
+static UInt compute_adler32 ( void* addr, UWord len )
+{
+ UInt s1 =3D 1;
+ UInt s2 =3D 0;
+ UChar* buf =3D (UChar*)addr;
+ while (len > 0) {
+ s1 +=3D buf[0];
+ s2 +=3D s1;
+ s1 %=3D 65521;
+ s2 %=3D 65521;
+ len--;
+ buf++;
+ }
+ return (s2 << 16) + s1;
+}
+
+
+/* -------------------------------------------------------------- */
+/* --- --- */
+/* --- BEGIN write bootstrap loader into child process --- */
+/* --- --- */
+/* -------------------------------------------------------------- */
+
+/* From using truss, __loadx is used to load a module into a running
+ process in 32-bit mode, and kload in 64-bit mode. __loadx is
+ simple: it returns a pointer to a standard function descriptor to
+ the entry point.
+
+ kload isn't: it returns a pointer which, from examination of
+ /proc/<pid>/maps, doesn't point into the loaded object image. It
+ does appear to point to some kind of struct, words [4] and [6] of
+ which do point into the loaded object image. From comparison with
+ /proc/<pid>/maps, they are respectively the actual VMAs of the text
+ and data sections of the loaded module.
+
+ Knowing this it is possible to find the entry point descriptor:
+ - figure out where the auxiliary header is. We have a pointer to
+ the start of the mapped text section, so just add the size of
+ the XCOFF file header to that.
+ - figure out the data bias. We know the avma of the data section;
+ and the svma of it is in the auxiliary header in field
+ o_data_start. The data bias is therefore the difference between
+ them.
+ - The auxiliary header also gives the svma of the entry point
+ descriptor; (o_entry); therefore its avma is o_entry + the data
+ bias.
+
+ ULong* kr =3D (result of kload)
+ // r3 is this value
+
+ AOUTHDR* aux =3D kr[4] (text_avma) + 24 (size of XCOFF file header);
+ // ld 9,32(3) kr[4]
+ // addi 9,9,24 + 24
+ // 9=3Daux
+
+ ULong data_avma =3D kr[6];
+ // ld 11,48(3) kr[6]
+ // 9=3Daux
+ // 11=3Ddata_avma
+
+ ULong data_svma =3D aux->o_data_start;
+ // ld 0,16(9) aux->o_data_start
+ // 9=3Daux
+ // 11=3Ddata_avma
+ // 0=3Ddata_svma
+
+ ULong data_bias =3D data_avma - data_svma;
+ // subf 11,0,11
+ // 9=3Daux
+ // 11=3Ddata_bias
+ // 0=3Ddata_svma
+
+ ULong ent_svma =3D (ULong)aux->o_entry;
+ // ld 9,80(9) aux->o_entry
+ // 9=3Dent_svma
+ // 11=3Ddata_bias
+ // 0=3Ddata_svma
+
+ ULong ent_avma =3D ent_svma + data_bias;
+ // add 10,9,11
+ // 9=3Dent_svma
+ // 11=3Ddata_bias
+ // 0=3Ddata_svma
+ // 10=3Dent_avma
+*/
+
+#define LAUNCHER_SYSENT_SIZE 100000
+static char sysent_buf[LAUNCHER_SYSENT_SIZE];
+
+/* The executable loaded must have no more than N_LDINFOs direct
+ shared-object dependencies. Just increase this value and rebuild,
+ if you ever run out. We have two arrays, one for each kind of
+ target process. */
+#define N_LDINFOs 1000
+static struct __ld_info32 ld_info32_array[N_LDINFOs];
+static struct __ld_info64 ld_info64_array[N_LDINFOs];
+
+
+static=20
+UChar* bootstrap_errmsg=20
+ =3D "\nvalgrind: bootstrap loader failed. Cannot continue.\n\n=
";
+
+
+/* Write the bootstrap loader and associated data (iow, an
+ AIX5Bootblock structure) into CHILD, so that when
+ ptrace-detached, it will continue by loading TOOLNAME and
+ continuing with that. Returns NULL on success or an error string
+ on failure. */
+
+static char* write_bootstrap_loader_into_child=20
+ ( Child* child, char* toolfile )
+{
+ /* ------ STEP 1: Fill in most parts of the bootblock. ------ */
+
+ /* All parts except code[], off_zdata and len_zdata. */
+
+ AIX5Bootblock block;
+
+ VG_(debugLog)(1, "launcher", "parent: size of bootblock is %ld\n",
+ sizeof(AIX5Bootblock));
+
+ assert(IS_8_ALIGNED( sizeof(AIX5Bootblock) ));
+
+ memset(&block, 0, sizeof(block));
+
+ /* --- OFFSETS--- */
+
+ /* off_zdata not known yet */
+ /* len_zdata not known yet */
+
+ /* --- SYSCALL NUMBERS --- */
+
+ /* Read some system call entries from the child's
+ /proc/<pid>/sysent file. */
+ char sysent_name[50];
+ FILE* sysent_file;
+ int sysent_used =3D 0;
+ prsysent_t* sysent_hdr;
+ int i;
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: reading child's /proc/../sysent\n");
+
+ sprintf(sysent_name, "/proc/%d/sysent", child->pid);
+ sysent_file =3D fopen(sysent_name, "r");
+ if (sysent_file =3D=3D NULL)
+ return "Can't open child's /proc/<pid>/sysent file";
+
+ sysent_used =3D fread(sysent_buf, 1, LAUNCHER_SYSENT_SIZE, sysent_fil=
e);
+ if (sysent_used =3D=3D 0)
+ return "Error reading child's /proc/<pid>/sysent file";
+ if (sysent_used =3D=3D LAUNCHER_SYSENT_SIZE)
+ return "LAUNCHER_SYSENT_SIZE is too low; increase and recompile";
+ assert(sysent_used > 0 && sysent_used < LAUNCHER_SYSENT_SIZE);
+
+ fclose(sysent_file);
+
+ sysent_hdr =3D (prsysent_t*)&sysent_buf[0];
+
+ /* Find some syscall numbers for the child. */
+ Int __nr__getpid =3D -1;
+ Int __nr_kwrite =3D -1;
+ Int __nr___loadx =3D -1; /* 32-bit child only */
+ Int __nr_kload =3D -1; /* 64-bit child only */
+ Int __nr__exit =3D -1;
+ Int __nr_open =3D -1;
+ Int __nr_kread =3D -1;
+ Int __nr_close =3D -1;
+
+ for (i =3D 0; i < sysent_hdr->pr_nsyscalls; i++) {
+ char* name =3D &sysent_buf[ sysent_hdr->pr_syscall[i].pr_nameoff ]=
;
+ int nmbr =3D sysent_hdr->pr_syscall[i].pr_number;
+ if (0 =3D=3D strcmp(name, "_getpid"))
+ __nr__getpid =3D nmbr;
+ if (0 =3D=3D strcmp(name, "kwrite"))
+ __nr_kwrite =3D nmbr;
+ if (0 =3D=3D strcmp(name, "__loadx"))
+ __nr___loadx =3D nmbr;
+ if (0 =3D=3D strcmp(name, "kload"))
+ __nr_kload =3D nmbr;
+ if (0 =3D=3D strcmp(name, "_exit"))
+ __nr__exit =3D nmbr;
+ if (0 =3D=3D strcmp(name, "open"))
+ __nr_open =3D nmbr;
+ if (0 =3D=3D strcmp(name, "kread"))
+ __nr_kread =3D nmbr;
+ if (0 =3D=3D strcmp(name, "close"))
+ __nr_close =3D nmbr;
+ }
+
+ if (__nr__getpid =3D=3D -1=20
+ || __nr_kwrite =3D=3D -1=20
+ || ((!child->is64) && __nr___loadx =3D=3D -1)
+ || ((child->is64) && __nr_kload =3D=3D -1)
+ || __nr__exit =3D=3D -1
+ || __nr_open =3D=3D -1=20
+ || __nr_kread =3D=3D -1=20
+ || __nr_close =3D=3D -1)
+ return "can't establish syscall #s needed for bootstrap";
+
+ block.__NR_getpid =3D __nr__getpid;
+ block.__NR_write =3D __nr_kwrite;
+ block.__NR_exit =3D __nr__exit;
+ block.__NR_open =3D __nr_open;
+ block.__NR_read =3D __nr_kread;
+ block.__NR_close =3D __nr_close;
+
+ /* --- REGS --- */
+
+ /* Continue by copying out the child's current integer register
+ state. */
+ VG_(debugLog)(1, "launcher",=20
+ "parent: reading child's int registers\n");
+
+ Bool err =3D ptrace_get_iregs_pc_cr_lr_ctr_xer=20
+ ( child, &block.iregs_pc_cr_lr_ctr_xer[0] );
+ if (err)
+ return "read of child's int registers failed";
+
+ /* --- CODE --- */
+
+ /* We'll leave that till last (is difficult). */
+
+ /* --- ERRMSG --- */
+
+ if (1 + strlen(bootstrap_errmsg) > N_BOOTBLOCK_ERRMSG)
+ return "bootstrap error message won't fit in bootblock";
+
+ for (i =3D 0; bootstrap_errmsg[i]; i++)
+ block.errmsg[i] =3D bootstrap_errmsg[i];
+ assert(i <=3D N_BOOTBLOCK_ERRMSG);
+
+ /* --- TOOLFILE --- */
+
+ if (1 + strlen(toolfile) > N_BOOTBLOCK_TOOLFILE)
+ return "tool file path is too long, won't fit in bootblock";
+
+ for (i =3D 0; toolfile[i]; i++)
+ block.toolfile[i] =3D toolfile[i];
+ assert(i <=3D N_BOOTBLOCK_TOOLFILE);
+
+
+ /* ------ STEP 2: Generate the bootblock code. ------ */
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: creating bootblock code ..\n");
+
+ /* This is the tricky bit. The resulting code has to be position
+ independent since we don't yet know where it's going to be
+ placed. The code is entered with r31 pointing at the bootblock.
+ r29-31 are callee-saved, so presumably they don't get trashed
+ across syscalls. r30 is used as scratch, and r29 is also used
+ as scratch by 'emit_dosc'. */
+
+ /* Preliminaries: to do a syscall, we have to do 'crorc 6,6,6' and
+ put the continuation address in LR, which is a bit of a drag.
+ Hence the following macro:
+
+ SYSCALL_SEQUENCE =3D crorc 6,6,6
+ bl .+4
+ mflr 29
+ addi 29,29,16
+ mtlr 29
+ sc
+
+ Also: 'imm' is an imaginary instruction to get a 32-bit literal in=
to
+ a register. It's really li followed by oris.
+ */
+
+ /* So, the code. First, prepare for and do a _loadx syscall, to
+ get the tool aboard:
+ imm 2, __NR__loadx
+ imm 3, VKI_DL_LOAD
+ imm 4, 0
+ mr 5, 4
+ addi 6, 31, offset_of_toolfile
+ mr 7, 4
+ mr 8, 4
+ mr 9, 4
+ mr 10,4
+ SYSCALL_SEQUENCE
+
+ If the syscall failed, r4 will be nonzero. Branch elsewhere if so=
.
+ cmpi 4, 0
+ bne error
+ */
+ int ix =3D 0;
+
+# if 1
+# define TRAP \
+ do { \
+ ix=3Demit_insn( &block.code[0],ix, 0x7fe00008 ); } \
+ while (0)
+# define SEGV \
+ do { \
+ if (child->is64) { \
+ ix=3Demit_li64( &block.code[0],ix, 28,0); \
+ ix=3Demit_insn( &block.code[0],ix, \
+ gen_ld_rd_off_ra(27,0xfffc,28)); \
+ } else { \
+ ix=3Demit_li32( &block.code[0],ix, 28,0); \
+ ix=3Demit_insn( &block.code[0],ix, \
+ gen_lwz_rd_off_ra(27,0xffff,28)); \
+ } \
+ } while (0)
+# define ILL \
+ do { \
+ ix=3Demit_insn( &block.code[0],ix, 0 ); } \
+ while (0) =20
+# endif
+
+ if (child->is64) {
+
+ /* 64-bit sequence */
+ /* Set up for 'sys_kload(toolfile, 0, 0)'
+ li64 2, __NR_kload
+ addi 3, 31, offset_toolfile
+ li64 4, 0
+ mr 5, 4
+ mr 6, 4
+ mr 7, 4
+ mr 8, 4
+ mr 9, 4
+ mr 10,4
+ SYSCALL_SEQUENCE
+
+ // if kload failed, r3 will hold zero
+ cmpdi 3,0
+ beq error
+
+ // from result of kload, figure out entry point address
+ // as described above
+ ld 9,32(3)
+ addi 9,9,24
+ ld 11,48(3)
+ ld 0,16(9)
+ subf 11,0,11
+ ld 9,80(9)
+ add 10,9,11 // r10 is entry descriptor avma
+
+ void(*fn)(void*) =3D (void(*)(void*))ent_avma;
+ fn();
+ ld 9,0(10)
+ mtlr 9
+ ld 2,8(10)
+ ld 11,16(10)
+ mr 3,31 // arg to pass
+ blr
+ */
+ ix =3D emit_li64( &block.code[0],ix, 2, __nr_kload );
+ ix =3D emit_insn( &block.code[0],ix,=20
+ gen_addi_rd_rs_N(3,31,offsetof(AIX5Bootblock,toolf=
ile)));
+ ix =3D emit_li64( &block.code[0],ix, 4, 0 );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(5,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(6,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(7,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(8,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(9,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(10,4) );
+ ix =3D emit_dosc( &block.code[0],ix );
+
+ ix =3D emit_insn( &block.code[0],ix, gen_cmpli_cr7_r_N(3,0) );
+ Int ix_beq =3D ix; /* Patch this later */
+ ix =3D emit_insn( &block.code[0],ix, 0 );
+
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 9, 32, 3 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_addi_rd_rs_N( 9, 9, 24 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 11, 48, 3 )=
);
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 0, 16, 9 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_subf_rd_rL_rR( 11, 0, 11 =
) );
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 9, 80, 9 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_add_rd_rL_rR( 10, 9, 11 )=
);
+
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 9, 0, 10 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_mtlr_r( 9 ) );
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 2, 8, 10 ) =
);
+ ix =3D emit_insn( &block.code[0],ix, gen_ld_rd_off_ra( 11, 16, 10 =
) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(3, 31) );
+ ix =3D emit_insn( &block.code[0],ix, gen_blr() );
+ TRAP;
+ assert(ix <=3D N_BOOTBLOCK_INSNS);
+
+ /* error:
+ We get here if the kload syscall fails. Write a terse message
+ to stderr saying so, then exit, carrying the error code of the
+ kload call. The latter is saved in r30 across the write() call=
.
+ mr 30,4 (4 contains the error result from kload)
+ imm 2, __NR_write
+ imm 3,2 (2=3Dstderr)
+ addi 4, 31, offset_of_errormsg
+ imm 5, length(errormsg)
+ SYSCALL_SEQUENCE
+ imm 2, __NR_exit
+ mr 3, 30
+ SYSCALL_SEQUENCE
+ =20
+ Well, we shouldn't be alive here. But just in case we do, put
+ a zero word, which will generate SIGILL and definitely stop the
+ party.
+ .word 0
+ */
+ /* fill in the conditional jump */
+ (void)emit_insn( &block.code[0],ix_beq,=20
+ gen_beq_cr7_delta(4*(ix-ix_beq)));
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(30,4) );
+ ix =3D emit_li64( &block.code[0],ix, 2, __nr_kwrite);
+ ix =3D emit_li64( &block.code[0],ix, 3, 2);
+ ix =3D emit_insn( &block.code[0],ix,=20
+ gen_addi_rd_rs_N(4,31,offsetof(AIX5Bootblock,errms=
g)));
+ ix =3D emit_li64( &block.code[0],ix, 5, strlen(bootstrap_errmsg));
+ ix =3D emit_dosc( &block.code[0],ix );
+ ix =3D emit_li64( &block.code[0],ix, 2, __nr__exit);
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(3,30) );
+ ix =3D emit_dosc( &block.code[0],ix );
+ ix =3D emit_insn( &block.code[0],ix, 0 );
+ assert(ix <=3D N_BOOTBLOCK_INSNS);
+
+ } else {
+
+ /* 32-bit sequence */
+ ix =3D emit_li32( &block.code[0],ix, 2, __nr___loadx );
+ ix =3D emit_li32( &block.code[0],ix, 3, VKI_DL_LOAD );
+ ix =3D emit_li32( &block.code[0],ix, 4, 0 );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(5,4) );
+ ix =3D emit_insn( &block.code[0],ix,=20
+ gen_addi_rd_rs_N(6,31,offsetof(AIX5Bootblock,toolf=
ile)));
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(7,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(8,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(9,4) );
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(10,4) );
+ ix =3D emit_dosc( &block.code[0],ix );
+ ix =3D emit_insn( &block.code[0],ix, gen_cmpli_cr7_r_N(4,0) );
+ Int ix_bne =3D ix; /* Patch this later */
+ ix =3D emit_insn( &block.code[0],ix, 0 );
+ assert(ix <=3D N_BOOTBLOCK_INSNS);
+
+ /* Looks like we're good. r3 now points at a standard function
+ descriptor for the entry point of the module we just loaded.
+ Load r2/r11 from the descriptor, then put the address of the
+ bootstrap area in r3, and jump to the code address. Not a
+ call -- we don't intend to return here. Note, must use r30
+ as scratch here since r31 is live.
+ lwz 30, 0(3)
+ mtlr 30
+ lwz 2, 4(3)
+ lwz 11, 8(3)
+ mr 3, 31
+ blr
+ */
+ ix =3D emit_insn( &block.code[0],ix, gen_lwz_rd_off_ra(30, 0, 3));
+ ix =3D emit_insn( &block.code[0],ix, gen_mtlr_r(30) );
+ ix =3D emit_insn( &block.code[0],ix, gen_lwz_rd_off_ra( 2, 4, 3));
+ ix =3D emit_insn( &block.code[0],ix, gen_lwz_rd_off_ra(11, 8, 3));
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(3,31));
+ ix =3D emit_insn( &block.code[0],ix, gen_blr() );
+ assert(ix <=3D N_BOOTBLOCK_INSNS);
+
+ /* error:
+ We get here if the _loadx syscall fails. Write a terse message
+ to stderr saying so, then exit, carrying the error code of the
+ _loadx call. The latter is saved in r30 across the write() cal=
l.
+ mr 30,4 (4 contains the error result from __loadx)
+ imm 2, __NR_write
+ imm 3,2 (2=3Dstderr)
+ addi 4, 31, offset_of_errormsg
+ imm 5, length(errormsg)
+ SYSCALL_SEQUENCE
+ imm 2, __NR_exit
+ mr 3, 30
+ SYSCALL_SEQUENCE
+ =20
+ Well, we shouldn't be alive here. But just in case we do, put
+ a zero word, which will generate SIGILL and definitely stop the
+ party.
+ .word 0
+ */
+ /* fill in the conditional jump */
+ (void)emit_insn( &block.code[0],ix_bne,=20
+ gen_bne_cr7_delta(4*(ix-ix_bne)));
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(30,4) );
+ ix =3D emit_li32( &block.code[0],ix, 2, __nr_kwrite);
+ ix =3D emit_li32( &block.code[0],ix, 3, 2);
+ ix =3D emit_insn( &block.code[0],ix,=20
+ gen_addi_rd_rs_N(4,31,offsetof(AIX5Bootblock,errms=
g)));
+ ix =3D emit_li32( &block.code[0],ix, 5, strlen(bootstrap_errmsg));
+ ix =3D emit_dosc( &block.code[0],ix );
+ ix =3D emit_li32( &block.code[0],ix, 2, __nr__exit);
+ ix =3D emit_insn( &block.code[0],ix, gen_mr_rd_rs(3,30) );
+ ix =3D emit_dosc( &block.code[0],ix );
+ ix =3D emit_insn( &block.code[0],ix, 0 );
+ assert(ix <=3D N_BOOTBLOCK_INSNS);
+
+ }
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: .. %d instructions emitted\n", ix);
+
+# if 0
+ for (i =3D 0; i < ix; i++) {
+ if (0) printf("code[%d] =3D 0x%08x\n", i, block.code[i]);
+ char buff[100];
+ sprintf(buff, "echo 0x%x | ./ascii2u32", block.code[i]);
+ system(buff);
+ }
+# endif
+
+ /* ------ STEP 3: Find out where to place stuff in the child. ------ =
*/
+
+ /* We'll have to hijack some space in the data section of the main
+ executable. First off, find the first and last pages of said
+ data section. We can't use the text section, because the child
+ is unable to write to its own text section, to undo the
+ compression of the hijacked page. We can't use the stack
+ because it appears, although stacks in AIX 5.3 appear to be
+ executable, the child gets SIGKILL'd after the ptrace detach if
+ its program counter is pointing into its stack. The data
+ section of the main executable appears to be executable, though,
+ so use that.
+
+ This requires wading though the list of loaded modules in the
+ child, to find the main executable. */
+
+ long lr;
+ if (child->is64) {
+ lr =3D ptrace64(PT_LDINFO, (ULong)child->pid,
+ (ULong)(UWord)&ld_info64_array,=20
+ sizeof(ld_info64_array), 0/*ignored*/);
+ } else {
+ lr =3D ptrace64(PT_LDINFO, (ULong)child->pid,
+ (ULong)(UWord)&ld_info32_array,=20
+ sizeof(ld_info32_array), 0/*ignored*/);
+ }
+ VG_(debugLog)(1, "launcher", "parent: ptrace PT_LDINFO got %ld\n", lr=
);
+ if (lr =3D=3D -1)
+ return "ptrace(PT_LDINFO, ...) failed";
+ else=20
+ assert(lr =3D=3D 0);
+
+ /* We have to iterate through the entire array to close the object
+ files that this has opened. Duh. */
+ if (child->is64) {
+ char* p =3D (char*)&ld_info64_array;
+ while (1) {
+ struct __ld_info64* info =3D (struct __ld_info64*)p;
+ =20
+ VG_(debugLog)(1,=20
+ "launcher", "parent: text 0x%llx-0x%llx data 0x%llx-0x%llx\n=
",
+ (Addr64)info->ldinfo_textorg,=20
+ (Addr64)info->ldinfo_textorg + (Addr64)info->ldinfo_textsize=
,
+ (Addr64)info->ldinfo_dataorg,=20
+ (Addr64)info->ldinfo_dataorg + (Addr64)info->ldinfo_datasize
+ );
+
+ Int ir =3D close(info->_file._ldinfo_fd);
+ assert(ir =3D=3D 0);
+ /* The last entry in the array is marked by having a zero
+ offset-link field. */
+ if (info->ldinfo_next =3D=3D 0)
+ break;
+ p +=3D info->ldinfo_next;
+ }
+ } else {
+ char* p =3D (char*)&ld_info32_array;
+ while (1) {
+ struct __ld_info32* info =3D (struct __ld_info32*)p;
+ =20
+ VG_(debugLog)(1,=20
+ "launcher", "parent: text 0x%llx-0x%llx data 0x%llx-0x%llx\n=
",
+ (Addr64)(UWord)info->ldinfo_textorg,=20
+ (Addr64)(UWord)info->ldinfo_textorg + info->ldinfo_textsize,
+ (Addr64)(UWord)info->ldinfo_dataorg,=20
+ (Addr64)(UWord)info->ldinfo_dataorg + info->ldinfo_datasize
+ );
+
+ Int ir =3D close(info->_file._ldinfo_fd);
+ assert(ir =3D=3D 0);
+ /* The last entry in the array is marked by having a zero
+ offset-link field. */
+ if (info->ldinfo_next =3D=3D 0)
+ break;
+ p +=3D info->ldinfo_next;
+ }
+ }
+
+ /* The first entry in that array -- and it is guaranteed to to have
+ at least one entry -- is that of the the main executable. We
+ need to put our bootblock in one of the pages the main
+ executable's data segment. The abovementioned AIX 'ptrace'
+ documentation says:
+
+ To allow a debugger to generate code more easily (in order to
+ handle fast trap instructions, for example), memory from the
+ end of the main program up to the next segment boundary can be
+ modified. That memory is read-only to the process but can be
+ modified by the debugger.
+
+ which would be great if it actually worked reliably; but not so.
+ On AIX 5.2 this is true, but on 5.3 it appears to be impossible
+ to read or write (via ptrace) anything beyond the last page of
+ the executable's text section.
+ */
+ Addr64 c_cand_text_first, c_cand_text_last;
+
+ if (child->is64) {
+ c_cand_text_first
+ =3D (Addr64)ld_info64_array[0].ldinfo_dataorg;
+ c_cand_text_last=20
+ =3D c_cand_text_first
+ + ld_info64_array[0].ldinfo_datasize - 1;
+ } else {
+ c_cand_text_first
+ =3D (Addr64)(UWord)ld_info32_array[0].ldinfo_dataorg;
+ c_cand_text_last=20
+ =3D c_cand_text_first
+ + ld_info32_array[0].ldinfo_datasize - 1;
+ }
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: candidate first 0x%llx last 0x%llx\n",
+ c_cand_text_first, c_cand_text_last);
+
+ /* Page align the text section limits. */
+ Addr64 c_first_page =3D ROUNDDN_PAGE( c_cand_text_first );
+ Addr64 c_last_page =3D ROUNDDN_PAGE( c_cand_text_last );
+
+ /* It's safe to try out any page p satisfying
+ c_first_page <=3D p && p <=3D c_last_page
+ */
+
+ /* CHOOSE A PAGE. Do a test compression of available pages until
+ we find one for which compression yields enough free space to
+ put the bootblock in. */
+ Int zsize;
+ Addr64 c_chosen_page =3D 0;
+ Addr64 c_page;
+ UChar p_page_unzbuf[PAGE_SIZE];
+ UChar p_page_unzbuf2[PAGE_SIZE];
+ UChar p_page_zbuf[PAGE_SIZE + 384 + 8/*paranoia*/];
+
+ for (c_page =3D c_first_page; c_page <=3D c_last_page; c_page +=3D PA=
GE_SIZE) {
+ assert(IS_PAGE_ALIGNED(c_page));
+ err =3D ptrace_read_page( child, p_page_unzbuf, c_page );
+ if (err)
+ return "read of page from child failed(1)";
+ zsize =3D Huffman_Compress(p_page_unzbuf, p_page_zbuf, PAGE_SIZE);
+ assert(zsize >=3D 0 && zsize <=3D PAGE_SIZE + 384);
+
+ /* Do a test decompression, to check the compress/decompress
+ cycle works properly */
+ Huffman_Uncompress( p_page_zbuf, p_page_unzbuf2,=20
+ PAGE_SIZE + 384, PAGE_SIZE);
+ assert(0 =3D=3D memcmp(p_page_unzbuf, p_page_unzbuf2, PAGE_SIZE));
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: page 0x%llx has %d usable bytes\n",=20
+ c_page, PAGE_SIZE - zsize);
+
+ if ( (Int)(PAGE_SIZE - zsize)=20
+ >=3D (Int)sizeof(AIX5Bootblock)+8/*paranoia*/) {
+ c_chosen_page =3D c_page;
+ break;
+ }
+ }
+
+ if (c_chosen_page =3D=3D NULL)
+ return "can't find a page with enough free space for bootblock";
+
+ /* Compress the chosen page, leaving the compressed data at the
+ start of the page, and put the bootblock at the end of the
+ page. */
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: reading page at 0x%llx\n", c_chosen_page);
+
+ err =3D ptrace_read_page( child, p_page_unzbuf, c_chosen_page );
+ if (err)
+ return "read of page from child failed(2)";
+
+ block.adler32 =3D compute_adler32( p_page_unzbuf, PAGE_SIZE );
+ VG_(debugLog)(1, "launcher",=20
+ "parent: adler32 of unz page is 0x%x\n", block.adler=
32);
+
+ memset(p_page_zbuf, 0, sizeof(p_page_zbuf));
+ zsize =3D Huffman_Compress(p_page_unzbuf, p_page_zbuf, PAGE_SIZE);
+ assert(zsize >=3D 0 && zsize <=3D PAGE_SIZE + 384);
+
+ assert(PAGE_SIZE - zsize >=3D sizeof(AIX5Bootblock)+8/*paranoia*/);
+
+ UChar* p_dst =3D p_page_zbuf + PAGE_SIZE - sizeof(AIX5Bootblock);
+ Addr64 c_dst =3D c_chosen_page + PAGE_SIZE - sizeof(AIX5Bootblock);
+ assert(IS_8_ALIGNED(c_dst));
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: free space starts at 0x%llx in child\n",
+ c_chosen_page + zsize);
+ VG_(debugLog)(1, "launcher",=20
+ "parent: bootblock will be at 0x%llx in child\n",
+ c_dst);
+
+ *(AIX5Bootblock*)p_dst =3D block;
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: writing page at 0x%llx\n", c_chosen_page);
+
+ err =3D ptrace_write_page( child, c_chosen_page, p_page_zbuf );
+ if (err)
+ return "write of page to child failed";
+
+ /* Do a test read back to ensure ptrace didn't screw up. */
+
+ err =3D ptrace_read_page( child, p_page_unzbuf2, c_chosen_page );
+ if (err)
+ return "test read back of boot page failed (1)";
+ if (0 !=3D memcmp(p_page_zbuf, p_page_unzbuf2, PAGE_SIZE))
+ return "test read back of boot page failed (2)";
+
+ /* Finally .. set the program counter so that when we detach, our
+ magic stub is run, not the original program. */
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: set child's pc to 0x%llx\n",
+ c_dst + offsetof(AIX5Bootblock,code) );
+ err =3D ptrace_put_pc ( child, c_dst + offsetof(AIX5Bootblock,code) )=
;
+ if (err)
+ return "write of new initial pc into child failed";
+
+ VG_(debugLog)(1, "launcher",=20
+ "parent: set child's r31 to 0x%llx\n", c_dst);
+ err =3D ptrace_put_r31 ( child, c_dst );
+ if (err)
+ return "write of new r31 into child failed";
+
+ return NULL; /* success */
+}
+
+
+/* -------------------------------------------------------------- */
+/* --- --- */
+/* --- END write bootstrap loader into child process --- */
+/* --- --- */
+/* -------------------------------------------------------------- */
+
+static void barf ( int exitcode, char* argv0, char* msg )
+{
+ fprintf(stderr, "%s: %s\n", argv0, msg);
+ exit(exitcode);
+}
+
+int main ( int argc, char** argv, char** envp )
+{
+ Child child;
+ Int i, loglevel;
+ const char *toolname =3D NULL;
+ const char *clientname =3D NULL;
+
+ /* First, look in our own /proc/<pid>/sysent file to find
+ the syscall numbers for kwrite and _getpid. These are needed
+ to make the VG_(debugLog) usable. We'll temporarily use
+ the sysent_buf used by write_bootstrap_loader_into_child for this
+ purpose. */
+
+ char sysent_name[50];
+ FILE* sysent_file;
+ int sysent_used =3D 0;
+ prsysent_t* sysent_hdr;
+
+ child.pid =3D 0;
+ child.is64 =3D False;
+
+ sprintf(sysent_name, "/proc/%d/sysent", getpid());
+ sysent_file =3D fopen(sysent_name, "r");
+ if (sysent_file =3D=3D NULL)
+ barf(1, argv[0], "Can't open my own /proc/<pid>/sysent file");
+
+ sysent_used =3D fread(sysent_buf, 1, LAUNCHER_SYSENT_SIZE, sysent_fil=
e);
+ if (sysent_used =3D=3D 0)
+ barf(1, argv[0], "Error reading my own /proc/<pid>/sysent file");
+ if (sysent_used =3D=3D LAUNCHER_SYSENT_SIZE)
+ barf(1, argv[0], "LAUNCHER_SYSENT_SIZE is too low; increase and re=
compile");
+ assert(sysent_used > 0 && sysent_used < LAUNCHER_SYSENT_SIZE);
+
+ fclose(sysent_file);
+
+ sysent_hdr =3D (prsysent_t*)&sysent_buf[0];
+
+ /* Find some syscall numbers for the child. Note, we copy them
+ from our own /proc/../sysent file, which isn't really right. */
+ Word __nr__getpid =3D -1;
+ Word __nr_kwrite =3D -1;
+ for (i =3D 0; i < sysent_hdr->pr_nsyscalls; i++) {
+ char* name =3D &sysent_buf[ sysent_hdr->pr_syscall[i].pr_nameoff ]=
;
+ int nmbr =3D sysent_hdr->pr_syscall[i].pr_number;
+ if (0 =3D=3D strcmp(name, "_getpid"))
+ __nr__getpid =3D nmbr;
+ if (0 =3D=3D strcmp(name, "kwrite"))
+ __nr_kwrite =3D nmbr;
+ }
+ if (__nr__getpid =3D=3D -1 || __nr_kwrite =3D=3D -1)
+ barf(1, argv[0], "can't establish syscall #s needed for startup");
+
+ /* "Tell" m_vkiscnums about them */
+ __NR_getpid =3D __nr__getpid;
+ __NR_write =3D __nr_kwrite;
+
+ /* Right, now we're safe to start the debug logging system. */
+ /* Start the debugging-log system ASAP. First find out how many
+ "-d"s were specified. This is a pre-scan of the command line.
+ At the same time, look for the tool name. */
+ loglevel =3D 0;
+ for (i =3D 1; i < argc; i++) {
+ if (argv[i][0] !=3D '-') {
+ clientname =3D argv[i];
+ break;
+ }
+ if (0 =3D=3D strcmp(argv[i], "--")) {
+ if (i+1 < argc)
+ clientname =3D argv[i+1];
+ break;
+ }
+ if (0 =3D=3D strcmp(argv[i], "-d"))
+ loglevel++;
+ if (0 =3D=3D strncmp(argv[i], "--tool=3D", 7))
+ toolname =3D argv[i] + 7;
+ }
+
+ /* ... and start the debug logger. Now we can safely emit logging
+ messages all through startup. */
+ VG_(debugLog_startup)(loglevel, "Stage 1");
+
+ /* Make sure we know which tool we're using */
+ if (toolname) {
+ VG_(debugLog)(1, "launcher", "tool '%s' requested\n", toolname);
+ } else {
+ VG_(debugLog)(1, "launcher",
+ "no tool requested, defaulting to 'memcheck'\n");
+ toolname =3D "memcheck";
+ }
+
+ /* Do some preliminary sanity checks */
+ long pagesize =3D sysconf(_SC_PAGESIZE);
+ if (pagesize !=3D 4096)
+ barf(1, argv[0], "config error: sysconf(_SC_PAGESIZE) is not 4096"=
);
+
+ assert(PAGE_SIZE =3D=3D 4096); /* stay sane */
+
+ if (argc < 2 || toolname =3D=3D NULL || clientname =3D=3D NULL)
+ barf(1, argv[0], "usage: valgrind [args-for-valgrind] prog args");=
=20
+
+ /* Find the client, and figure out if it's a 32- or 64-bit
+ executable. */
+ VG_(debugLog)(1, "launcher", "searching for client in $PATH\n");
+ if (strchr(clientname, '/') =3D=3D NULL)
+ clientname =3D find_client(clientname);
+ VG_(debugLog)(1, "launcher", "found %s\n", clientname);
+
+ Int client_exekind =3D examine_client ( clientname );
+ switch (client_exekind) {
+ case 32:=20
+ child.is64 =3D False;=20
+ break;
+ case 64:=20
+ child.is64 =3D True;=20
+ break;
+ default:=20
+ fprintf(stderr, "%s: requested executable %s\n",=20
+ argv[0], clientname);
+ fprintf(stderr, "%s: not found, or is not a valid XCOFF32 "
+ "or XCOFF64 executable.\n", argv[0]);
+ return 1;
+ }
+
+ VG_(debugLog)(1, "launcher", "client is an XCOFF%d executable\n",=20
+ client_exekind);
+
+ const char* valgrind_lib =3D VG_LIBDIR;
+ const char* platform =3D child.is64 ? "ppc64-aix5" : "ppc32-aix5";
+
+ VG_(debugLog)(1, "launcher", "looking for the tool file\n");
+
+ char* toolfile =3D malloc(strlen(valgrind_lib)=20
+ + strlen(toolname) + strlen(platform) + 3);
+ if (toolfile =3D=3D NULL) {
+ fprintf(stderr,"%s: malloc of toolfile failed\n", argv[0]);
+ return 1;
+ }
+ sprintf(toolfile, "%s/%s/%s", valgrind_lib, platform, toolname);
+
+ if (!file_exists(toolfile)) {
+ fprintf(stderr,"%s: can't stat %s\n", argv[0], toolfile);
+ return 1;
+ }
+
+ /* Force the client to use a 1:1 threading model - this works
+ because the client inherits our environment. */
+ VG_(debugLog)(1, "launcher", "doing putenv(\"AIXTHREAD_SCOPE=3DS\")\n=
");
+ Int putenv_err =3D putenv("AIXTHREAD_SCOPE=3DS");
+ if (putenv_err) {
+ fprintf(stderr,"%s: putenv(\"AIXTHREAD_SCOPE=3DS\") failed\n", arg=
v[0]);
+ return 1;
+ }
+
+ VG_(debugLog)(1, "launcher", "doing putenv(\"MP_SHARED_MEMORY=3Dno\")=
\n");
+ putenv_err =3D putenv("MP_SHARED_MEMORY=3Dno");
+ if (putenv_err) {
+ fprintf(stderr,"%s: putenv(\"MP_SHARED_MEMORY=3Dno\") failed\n", a=
rgv[0]);
+ return 1;
+ }
+
+ /* Also, cook up the fully qualified name of this executable. The
+ following is a kludge, but I don't see how to really get the
+ fully qualified name on AIX. */
+ char* up_n_down =3D "/../../bin/valgrind";
+ char* launcher =3D malloc(strlen(valgrind_lib)
+ + strlen(up_n_down) + 2);
+ if (launcher =3D=3D NULL) {
+ fprintf(stderr,"%s: malloc of launcher failed\n", argv[0]);
+ return 1;
+ }
+ sprintf(launcher, "%s%s", valgrind_lib, up_n_down);
+
+ if (!file_exists(launcher)) {
+ fprintf(stderr,"%s: can't stat %s\n", argv[0], launcher);
+ return 1;
+ }
+
+ /* First, fork. =20
+
+ In the child, ask for a ptrace, then exec argv[2 ..]. This
+ causes the kernel to complete the exec, hence loading the
+ child, but does not start it; instead the child remains frozen
+ so that the parent can mess with it via ptrace().
+ */
+ VG_(debugLog)(1, "launcher", "doing fork()\n");
+ child.pid =3D fork();
+ if (child.pid =3D=3D -1) {
+ fprintf(stderr,"%s: fork() failed\n", argv[0]);
+ return 1;
+ }
+
+ if (child.pid =3D=3D 0) {
+ /* --- CHILD --- */
+ VG_(debugLog)(1, "launcher", "child: before ptrace\n");
+ long rl =3D ptrace64(PT_TRACE_ME, 0,0,0,0);
+ if (rl !=3D 0) {
+ fprintf(stderr,"%s: child: ptrace(PT_TRACE_ME, ...) failed\n", =
argv[0]);
+ fprintf(stderr,"%s: ", argv[0]);
+ perror(NULL);
+ fflush(stderr);
+ _exit(1);
+ }
+ VG_(debugLog)(1, "launcher", "child: before execve\n");
+
+ /* make VALGRIND_LAUNCHER point at something plausible. */
+ VG_(debugLog)(1, "launcher", "child: launcher =3D %s\n", launcher)=
;
+ int r =3D setenv("VALGRIND_LAUNCHER", launcher, 1/*overwrite*/);
+ if (r) {
+ /* setenv failed. */
+ fprintf(stderr,"%s: child: setenv failed\n", argv[0]);
+ fprintf(stderr,"%s: ", argv[0]);
+ perror(NULL);
+ fflush(stderr);
+ _exit(1);
+ /* NOTREACHED */
+ }
+
+ /* This is kind-of strange. We're execvp-ing the client but
+ argv[0] is the toolname, which is irrelevant - m_main ignores
+ it. However, setting it like this at least makes m_main's
+ view of the world (as far as the argv goes) look the same as
+ it does in Linux-land:=20
+ tool-exe-name [args for V] client-name [args for client]
+ */
+ argv[0] =3D toolfile;
+ int ri =3D execvp(clientname, &argv[0]);
+ /* WE ONLY GET HERE IF execve FAILED */
+ assert(ri =3D=3D -1);
+ fprintf(stderr,"%s: exec failed: %s: ", argv[0], clientname);
+ perror("");
+ return 1;
+ /* NOTREACHED */
+ }
+
+ /* --- PARENT --- */
+ VG_(debugLog)(1, "launcher", "parent: waitpid-ing for child\n");
+ int status;
+ /* Wait to hear back from the child. */
+ pid_t p2 =3D waitpid(child.pid, &status, 0);
+ /* We could hear back for two reasons. (1) the exec was
+ successful, and because the child is being ptraced, it is now
+ waiting for the parent. (2) the exec failed, and so the child
+ did _exit(). */
+ VG_(debugLog)(1, "launcher", "parent: waitpid got pid %d\n", (int)p2)=
;
+ VG_(debugLog)(1, "launcher", "parent: waitpid got status 0x%x\n", sta=
tus);
+ assert(p2 =3D=3D child.pid); /* Huh?! We only have one child. */
+
+ if (WIFEXITED(status)) {
+ /* Case (2) - exec failed. */
+ fprintf(stderr, "parent: child's exec failed.\n");
+ return 0;
+ }
+
+ /* else case (1) must apply */
+ assert(WIFSTOPPED(status));
+
+ /* ------ BEGIN write bootstrap pages into child ------ */
+
+ /* In this section, if for any reason we can't continue to the
+ child-detach and so have to give up, we have to kill the child,
+ else it'll become a zombie. That's what the code at
+ latched_error: does. */
+ char* badness=20
+ =3D write_bootstrap_loader_into_child ( &child, toolfile );
+ /* Returns NULL if no error, else points to a string of at least
+ some descriptiveness. */
+ if (badness)
+ goto latched_error;
+
+ /* ------ END write bootstrap pages into child ------ */
+
+ VG_(debugLog)(1, "launcher", "parent: detaching child\n");
+ long lr =3D ptrace64(PT_DETACH, (ULong)child.pid, 0, SIGCONT, 0);
+ VG_(debugLog)(1, "launcher", "parent: detach got %ld\n", lr);
+ assert(lr =3D=3D 0);
+ VG_(debugLog)(1, "launcher", "parent: waiting for child to finish\n")=
;
+
+ p2 =3D waitpid(child.pid, &status, 0);
+ assert(p2 =3D=3D child.pid);
+ if (0)
+ fprintf(stderr,"parent: child finished, status 0x%x 0x%x\n",=20
+ status, WEXITSTATUS(status));
+
+ if (WIFEXITED(status)) {
+ VG_(debugLog)(1, "launcher",=20
+ "parent: child finished normally, exit code %d\n"=
,
+ WEXITSTATUS(status));
+ return WEXITSTATUS(status);
+ }=20
+ else if (WIFSIGNALED(status)) {
+ VG_(debugLog)(0, "launcher",
+ "parent: child exited on signal %d\n",
+ WTERMSIG(status));
+ return 0; /* This is completely bogus */
+ /* Better: since the child exited with a signal, we'd better
+ whack ourselves on the head with the same signal. Duh. */
+ }=20
+ else {
+ /* erm. Can we ever get here? */
+ assert(0);
+ return 0;
+ }
+
+ latched_error:
+ /* ...
[truncated message content] |
|
From: <sv...@va...> - 2006-10-01 13:30:39
|
Author: sewardj Date: 2006-10-01 14:30:36 +0100 (Sun, 01 Oct 2006) New Revision: 6105 Log: Refactor the address space manager, so there are two implementations of it, plus a small common supporting library. Added: branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c branches/AIX5/coregrind/m_aspacemgr/aspacemgr-common.c branches/AIX5/coregrind/m_aspacemgr/aspacemgr-linux.c branches/AIX5/coregrind/m_aspacemgr/priv_aspacemgr.h [... diff too large to include ...] |
|
From: <js...@ac...> - 2006-10-01 13:17:15
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-10-01 09:00:02 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 207 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/jm-int (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <sv...@va...> - 2006-10-01 12:38:16
|
Author: sewardj
Date: 2006-10-01 13:38:12 +0100 (Sun, 01 Oct 2006)
New Revision: 6104
Log:
Initial-image creation stuff for Linux. This all used to be in
m_main.c. Perhaps in the future m_ume.c should be folded into this.
Added:
branches/AIX5/coregrind/m_initimg/initimg-linux.c
Added: branches/AIX5/coregrind/m_initimg/initimg-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
--- branches/AIX5/coregrind/m_initimg/initimg-linux.c =
(rev 0)
+++ branches/AIX5/coregrind/m_initimg/initimg-linux.c 2006-10-01 12:38:12=
UTC (rev 6104)
@@ -0,0 +1,998 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Startup: create initial process image on Linux ---*/
+/*--- initimg-linux.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2006 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.
+*/
+
+#include "pub_core_basics.h"
+#include "pub_core_vki.h"
+#include "pub_core_debuglog.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcfile.h"
+#include "pub_core_libcproc.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_clientstate.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_mallocfree.h"
+#include "pub_core_machine.h"
+#include "pub_core_ume.h"
+#include "pub_core_options.h"
+#include "pub_core_tooliface.h" /* VG_TRACK */
+#include "pub_core_threadstate.h" /* ThreadArchState */
+#include "pub_core_initimg.h" /* self */
+
+/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+/* This is for ELF types etc, and also the AT_ constants. */
+#include <elf.h>
+/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D Find executable =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* Scan a colon-separated list, and call a function on each element.
+ The string must be mutable, because we insert a temporary '\0', but
+ the string will end up unmodified. (*func) should return True if it
+ doesn't need to see any more.
+
+ This routine will return True if (*func) returns True and False if
+ it reaches the end of the list without that happening.
+*/
+static Bool scan_colsep(char *colsep, Bool (*func)(const char *))
+{
+ char *cp, *entry;
+ int end;
+
+ if (colsep =3D=3D NULL ||
+ *colsep =3D=3D '\0')
+ return False;
+
+ entry =3D cp =3D colsep;
+
+ do {
+ end =3D (*cp =3D=3D '\0');
+
+ if (*cp =3D=3D ':' || *cp =3D=3D '\0') {
+ char save =3D *cp;
+
+ *cp =3D '\0';
+ if ((*func)(entry)) {
+ *cp =3D save;
+ return True;
+ }
+ *cp =3D save;
+ entry =3D cp+1;
+ }
+ cp++;
+ } while(!end);
+
+ return False;
+}
+
+/* Need a static copy because can't use dynamic mem allocation yet */
+static HChar executable_name_in [VKI_PATH_MAX];
+static HChar executable_name_out[VKI_PATH_MAX];
+
+static Bool match_executable(const char *entry)=20
+{
+ HChar buf[VG_(strlen)(entry) + VG_(strlen)(executable_name_in) + 3];
+
+ /* empty PATH element means '.' */
+ if (*entry =3D=3D '\0')
+ entry =3D ".";
+
+ VG_(snprintf)(buf, sizeof(buf), "%s/%s", entry, executable_name_in);
+
+ // Don't match directories
+ if (VG_(is_dir)(buf))
+ return False;
+
+ // If we match an executable, we choose that immediately. If we find=
a
+ // matching non-executable we remember it but keep looking for an
+ // matching executable later in the path.
+ if (VG_(access)(buf, True/*r*/, False/*w*/, True/*x*/) =3D=3D 0) {
+ VG_(strncpy)( executable_name_out, buf, VKI_PATH_MAX-1 );
+ executable_name_out[VKI_PATH_MAX-1] =3D 0;
+ return True; // Stop looking
+ } else if (VG_(access)(buf, True/*r*/, False/*w*/, False/*x*/) =3D=3D=
0=20
+ && VG_STREQ(executable_name_out, ""))=20
+ {
+ VG_(strncpy)( executable_name_out, buf, VKI_PATH_MAX-1 );
+ executable_name_out[VKI_PATH_MAX-1] =3D 0;
+ return False; // Keep looking
+ } else {=20
+ return False; // Keep looking
+ }
+}
+
+// Returns NULL if it wasn't found.
+static HChar* find_executable ( HChar* exec )
+{
+ vg_assert(NULL !=3D exec);
+ if (VG_(strchr)(exec, '/')) {
+ // Has a '/' - use the name as is
+ VG_(strncpy)( executable_name_out, exec, VKI_PATH_MAX-1 );
+ } else {
+ // No '/' - we need to search the path
+ HChar* path;
+ VG_(strncpy)( executable_name_in, exec, VKI_PATH_MAX-1 );
+ VG_(memset) ( executable_name_out, 0, VKI_PATH_MAX );
+ path =3D VG_(getenv)("PATH");
+ scan_colsep(path, match_executable);
+ }
+ return VG_STREQ(executable_name_out, "") ? NULL : executable_name_out=
;
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D Loading the client =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* Load the client whose name is VG_(argv_the_exename). */
+
+static void load_client ( /*OUT*/ExeInfo* info,=20
+ /*OUT*/Addr* client_ip,
+ /*OUT*/Addr* client_toc)
+{
+ HChar* exe_name;
+ Int ret;
+ SysRes res;
+
+ vg_assert( VG_(args_the_exename) !=3D NULL);
+ exe_name =3D find_executable( VG_(args_the_exename) );
+
+ if (!exe_name) {
+ VG_(printf)("valgrind: %s: command not found\n", VG_(args_the_exen=
ame));
+ VG_(exit)(127); // 127 is Posix NOTFOUND
+ }
+
+ VG_(memset)(info, 0, sizeof(*info));
+ info->exe_base =3D VG_(client_base);
+ info->exe_end =3D VG_(client_end);
+
+ ret =3D VG_(do_exec)(exe_name, info);
+
+ // The client was successfully loaded! Continue.
+
+ /* Get hold of a file descriptor which refers to the client
+ executable. This is needed for attaching to GDB. */
+ res =3D VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR);
+ if (!res.isError)
+ VG_(cl_exec_fd) =3D res.res;
+
+ /* Copy necessary bits of 'info' that were filled in */
+ *client_ip =3D info->init_ip;
+ *client_toc =3D info->init_toc;
+ VG_(brk_base) =3D VG_(brk_limit) =3D VG_PGROUNDUP(info->brkbase);
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D Setting up the client's environment =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* Prepare the client's environment. This is basically a copy of our
+ environment, except:
+
+ LD_PRELOAD=3D$VALGRIND_LIB/PLATFORM/vgpreload_core.so:
+ ($VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so:)?
+ $LD_PRELOAD
+
+ If this is missing, then it is added.
+
+ Also, remove any binding for VALGRIND_LAUNCHER=3D. The client should
+ not be able to see this.
+
+ If this needs to handle any more variables it should be hacked
+ into something table driven. The copy is VG_(malloc)'d space.
+*/
+static HChar** setup_client_env ( HChar** origenv, const HChar* toolname=
)
+{
+ HChar* preload_core =3D "vgpreload_core";
+ HChar* ld_preload =3D "LD_PRELOAD=3D";
+ HChar* v_launcher =3D VALGRIND_LAUNCHER "=3D";
+ Int ld_preload_len =3D VG_(strlen)( ld_preload );
+ Int v_launcher_len =3D VG_(strlen)( v_launcher );
+ Bool ld_preload_done =3D False;
+ Int vglib_len =3D VG_(strlen)(VG_(libdir));
+
+ HChar** cpp;
+ HChar** ret;
+ HChar* preload_tool_path;
+ Int envc, i;
+
+ /* Alloc space for the vgpreload_core.so path and vgpreload_<tool>.so
+ paths. We might not need the space for vgpreload_<tool>.so, but i=
t
+ doesn't hurt to over-allocate briefly. The 16s are just cautious
+ slop. */
+ Int preload_core_path_len =3D vglib_len + sizeof(preload_core)=20
+ + sizeof(VG_PLATFORM) + 16;
+ Int preload_tool_path_len =3D vglib_len + VG_(strlen)(toolname)=20
+ + sizeof(VG_PLATFORM) + 16;
+ Int preload_string_len =3D preload_core_path_len + preload_tool_pa=
th_len;
+ HChar* preload_string =3D VG_(malloc)(preload_string_len);
+ vg_assert(preload_string);
+
+ /* Determine if there's a vgpreload_<tool>.so file, and setup
+ preload_string. */
+ preload_tool_path =3D VG_(malloc)(preload_tool_path_len);
+ vg_assert(preload_tool_path);
+ VG_(snprintf)(preload_tool_path, preload_tool_path_len,
+ "%s/%s/vgpreload_%s.so", VG_(libdir), VG_PLATFORM, tool=
name);
+ if (VG_(access)(preload_tool_path, True/*r*/, False/*w*/, False/*x*/)=
=3D=3D 0) {
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so:%s"=
,=20
+ VG_(libdir), VG_PLATFORM, preload_core, preload_tool=
_path);
+ } else {
+ VG_(snprintf)(preload_string, preload_string_len, "%s/%s/%s.so",=20
+ VG_(libdir), VG_PLATFORM, preload_core);
+ }
+ VG_(free)(preload_tool_path);
+
+ VG_(debugLog)(2, "initimg", "preload_string:\n");
+ VG_(debugLog)(2, "initimg", " \"%s\"\n", preload_string);
+
+ /* Count the original size of the env */
+ envc =3D 0;
+ for (cpp =3D origenv; cpp && *cpp; cpp++)
+ envc++;
+
+ /* Allocate a new space */
+ ret =3D VG_(malloc) (sizeof(HChar *) * (envc+1+1)); /* 1 new entry + =
NULL */
+ vg_assert(ret);
+
+ /* copy it over */
+ for (cpp =3D ret; *origenv; )
+ *cpp++ =3D *origenv++;
+ *cpp =3D NULL;
+ =20
+ vg_assert(envc =3D=3D (cpp - ret));
+
+ /* Walk over the new environment, mashing as we go */
+ for (cpp =3D ret; cpp && *cpp; cpp++) {
+ if (VG_(memcmp)(*cpp, ld_preload, ld_preload_len) =3D=3D 0) {
+ Int len =3D VG_(strlen)(*cpp) + preload_string_len;
+ HChar *cp =3D VG_(malloc)(len);
+ vg_assert(cp);
+
+ VG_(snprintf)(cp, len, "%s%s:%s",
+ ld_preload, preload_string, (*cpp)+ld_preload_len=
);
+
+ *cpp =3D cp;
+
+ ld_preload_done =3D True;
+ }
+ }
+
+ /* Add the missing bits */
+ if (!ld_preload_done) {
+ Int len =3D ld_preload_len + preload_string_len;
+ HChar *cp =3D VG_(malloc) (len);
+ vg_assert(cp);
+
+ VG_(snprintf)(cp, len, "%s%s", ld_preload, preload_string);
+
+ ret[envc++] =3D cp;
+ }
+
+ /* ret[0 .. envc-1] is live now. */
+ /* Find and remove a binding for VALGRIND_LAUNCHER. */
+ for (i =3D 0; i < envc; i++)
+ if (0 =3D=3D VG_(memcmp(ret[i], v_launcher, v_launcher_len)))
+ break;
+
+ if (i < envc) {
+ for (; i < envc-1; i++)
+ ret[i] =3D ret[i+1];
+ envc--;
+ }
+
+ VG_(free)(preload_string);
+ ret[envc] =3D NULL;
+
+ return ret;
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D Setting up the client's stack =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+#ifndef AT_DCACHEBSIZE
+#define AT_DCACHEBSIZE 19
+#endif /* AT_DCACHEBSIZE */
+
+#ifndef AT_ICACHEBSIZE
+#define AT_ICACHEBSIZE 20
+#endif /* AT_ICACHEBSIZE */
+
+#ifndef AT_UCACHEBSIZE
+#define AT_UCACHEBSIZE 21
+#endif /* AT_UCACHEBSIZE */
+
+#ifndef AT_SYSINFO
+#define AT_SYSINFO 32
+#endif /* AT_SYSINFO */
+
+#ifndef AT_SYSINFO_EHDR
+#define AT_SYSINFO_EHDR 33
+#endif /* AT_SYSINFO_EHDR */
+
+#ifndef AT_SECURE
+#define AT_SECURE 23 /* secure mode boolean */
+#endif /* AT_SECURE */
+
+/* Add a string onto the string table, and return its address */
+static char *copy_str(char **tab, const char *str)
+{
+ char *cp =3D *tab;
+ char *orig =3D cp;
+
+ while(*str)
+ *cp++ =3D *str++;
+ *cp++ =3D '\0';
+
+ if (0)
+ VG_(printf)("copied %p \"%s\" len %lld\n", orig, orig, (Long)(cp-o=
rig));
+
+ *tab =3D cp;
+
+ return orig;
+}
+
+
+/* ----------------------------------------------------------------
+=20
+ This sets up the client's initial stack, containing the args,
+ environment and aux vector.
+
+ The format of the stack is:
+
+ higher address +-----------------+ <- clstack_end
+ | |
+ : string table :
+ | |
+ +-----------------+
+ | AT_NULL |
+ - -
+ | auxv |
+ +-----------------+
+ | NULL |
+ - -
+ | envp |
+ +-----------------+
+ | NULL |
+ - -
+ | argv |
+ +-----------------+
+ | argc |
+ lower address +-----------------+ <- sp
+ | undefined |
+ : :
+
+ Allocate and create the initial client stack. It is allocated down
+ from clstack_end, which was previously determined by the address
+ space manager. The returned value is the SP value for the client.
+
+ The client's auxv is created by copying and modifying our own one.
+ As a side effect of scanning our own auxv, some important bits of
+ info are collected:
+
+ VG_(cache_line_size_ppc32) // ppc32 only -- cache line size
+ VG_(have_altivec_ppc32) // ppc32 only -- is Altivec supported?
+
+ ---------------------------------------------------------------- */
+
+static=20
+Addr setup_client_stack( void* init_sp,
+ char** orig_envp,=20
+ const ExeInfo* info,
+ UInt** client_auxv,
+ Addr clstack_end,
+ SizeT clstack_max_size )
+{
+ SysRes res;
+ char **cpp;
+ char *strtab; /* string table */
+ char *stringbase;
+ Addr *ptr;
+ struct ume_auxv *auxv;
+ const struct ume_auxv *orig_auxv;
+ const struct ume_auxv *cauxv;
+ unsigned stringsize; /* total size of strings in bytes */
+ unsigned auxsize; /* total size of auxv in bytes */
+ Int argc; /* total argc */
+ Int envc; /* total number of env vars */
+ unsigned stacksize; /* total client stack size */
+ Addr client_SP; /* client stack base (initial SP) */
+ Addr clstack_start;
+ Int i;
+ Bool have_exename;
+
+ vg_assert(VG_IS_PAGE_ALIGNED(clstack_end+1));
+
+ /* use our own auxv as a prototype */
+ orig_auxv =3D VG_(find_auxv)(init_sp);
+
+ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D compu=
te sizes =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+
+ /* first of all, work out how big the client stack will be */
+ stringsize =3D 0;
+ have_exename =3D VG_(args_the_exename) !=3D NULL;
+
+ /* paste on the extra args if the loader needs them (ie, the #!=20
+ interpreter and its argument) */
+ argc =3D 0;
+ if (info->interp_name !=3D NULL) {
+ argc++;
+ stringsize +=3D VG_(strlen)(info->interp_name) + 1;
+ }
+ if (info->interp_args !=3D NULL) {
+ argc++;
+ stringsize +=3D VG_(strlen)(info->interp_args) + 1;
+ }
+
+ /* now scan the args we're given... */
+ if (have_exename)
+ stringsize +=3D VG_(strlen)( VG_(args_the_exename) ) + 1;
+
+ for (i =3D 0; i < VG_(args_for_client).used; i++) {
+ argc++;
+ stringsize +=3D VG_(strlen)( VG_(args_for_client).strs[i] ) + 1;
+ }
+
+ /* ...and the environment */
+ envc =3D 0;
+ for (cpp =3D orig_envp; cpp && *cpp; cpp++) {
+ envc++;
+ stringsize +=3D VG_(strlen)(*cpp) + 1;
+ }
+
+ /* now, how big is the auxv? */
+ auxsize =3D sizeof(*auxv); /* there's always at least one entry: AT_N=
ULL */
+ for (cauxv =3D orig_auxv; cauxv->a_type !=3D AT_NULL; cauxv++) {
+ if (cauxv->a_type =3D=3D AT_PLATFORM)
+ stringsize +=3D VG_(strlen)(cauxv->u.a_ptr) + 1;
+ auxsize +=3D sizeof(*cauxv);
+ }
+
+# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ auxsize +=3D 2 * sizeof(*cauxv);
+# endif
+
+ /* OK, now we know how big the client stack is */
+ stacksize =3D
+ sizeof(Word) + /* argc */
+ (have_exename ? sizeof(char **) : 0) + /* argc[0] =3D=3D exename =
*/
+ sizeof(char **)*argc + /* argv */
+ sizeof(char **) + /* terminal NULL */
+ sizeof(char **)*envc + /* envp */
+ sizeof(char **) + /* terminal NULL */
+ auxsize + /* auxv */
+ VG_ROUNDUP(stringsize, sizeof(Word)); /* strings (aligned) */
+
+ if (0) VG_(printf)("stacksize =3D %d\n", stacksize);
+
+ /* client_SP is the client's stack pointer */
+ client_SP =3D clstack_end - stacksize;
+ client_SP =3D VG_ROUNDDN(client_SP, 16); /* make stack 16 byte aligne=
d */
+
+ /* base of the string table (aligned) */
+ stringbase =3D strtab =3D (char *)clstack_end=20
+ - VG_ROUNDUP(stringsize, sizeof(int));
+
+ clstack_start =3D VG_PGROUNDDN(client_SP);
+
+ /* The max stack size */
+ clstack_max_size =3D VG_PGROUNDUP(clstack_max_size);
+
+ /* Record stack extent -- needed for stack-change code. */
+ VG_(clstk_base) =3D clstack_start;
+ VG_(clstk_end) =3D clstack_end;
+
+ if (0)
+ VG_(printf)("stringsize=3D%d auxsize=3D%d stacksize=3D%d maxsize=3D=
0x%x\n"
+ "clstack_start %p\n"
+ "clstack_end %p\n",
+ stringsize, auxsize, stacksize, (Int)clstack_max_size,
+ (void*)clstack_start, (void*)clstack_end);
+
+ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D alloc=
ate space =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+
+ { SizeT anon_size =3D clstack_end - clstack_start + 1;
+ SizeT resvn_size =3D clstack_max_size - anon_size;
+ Addr anon_start =3D clstack_start;
+ Addr resvn_start =3D anon_start - resvn_size;
+ SizeT inner_HACK =3D 0;
+ Bool ok;
+
+ /* So far we've only accounted for space requirements down to the
+ stack pointer. If this target's ABI requires a redzone below
+ the stack pointer, we need to allocate an extra page, to
+ handle the worst case in which the stack pointer is almost at
+ the bottom of a page, and so there is insufficient room left
+ over to put the redzone in. In this case the simple thing to
+ do is allocate an extra page, by shrinking the reservation by
+ one page and growing the anonymous area by a corresponding
+ page. */
+ vg_assert(VG_STACK_REDZONE_SZB >=3D 0);
+ vg_assert(VG_STACK_REDZONE_SZB < VKI_PAGE_SIZE);
+ if (VG_STACK_REDZONE_SZB > 0) {
+ vg_assert(resvn_size > VKI_PAGE_SIZE);
+ resvn_size -=3D VKI_PAGE_SIZE;
+ anon_start -=3D VKI_PAGE_SIZE;
+ anon_size +=3D VKI_PAGE_SIZE;
+ }
+
+ vg_assert(VG_IS_PAGE_ALIGNED(anon_size));
+ vg_assert(VG_IS_PAGE_ALIGNED(resvn_size));
+ vg_assert(VG_IS_PAGE_ALIGNED(anon_start));
+ vg_assert(VG_IS_PAGE_ALIGNED(resvn_start));
+ vg_assert(resvn_start =3D=3D clstack_end + 1 - clstack_max_size);
+
+# ifdef ENABLE_INNER
+ inner_HACK =3D 1024*1024; // create 1M non-fault-extending stack
+# endif
+
+ if (0)
+ VG_(printf)("%p 0x%x %p 0x%x\n",=20
+ resvn_start, resvn_size, anon_start, anon_size);
+
+ /* Create a shrinkable reservation followed by an anonymous
+ segment. Together these constitute a growdown stack. */
+ ok =3D VG_(am_create_reservation)(
+ resvn_start,
+ resvn_size -inner_HACK,
+ SmUpper,=20
+ anon_size +inner_HACK
+ );
+ vg_assert(ok);
+ /* allocate a stack - mmap enough space for the stack */
+ res =3D VG_(am_mmap_anon_fixed_client)(
+ anon_start -inner_HACK,
+ anon_size +inner_HACK,
+ VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC
+ );
+ vg_assert(!res.isError);=20
+ }
+
+ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D creat=
e client stack =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/
+
+ ptr =3D (Addr*)client_SP;
+
+ /* --- client argc --- */
+ *ptr++ =3D argc + (have_exename ? 1 : 0);
+
+ /* --- client argv --- */
+ if (info->interp_name) {
+ *ptr++ =3D (Addr)copy_str(&strtab, info->interp_name);
+ VG_(free)(info->interp_name);
+ }
+ if (info->interp_args) {
+ *ptr++ =3D (Addr)copy_str(&strtab, info->interp_args);
+ VG_(free)(info->interp_args);
+ }
+
+ if (have_exename)
+ *ptr++ =3D (Addr)copy_str(&strtab, VG_(args_the_exename));
+
+ for (i =3D 0; i < VG_(args_for_client).used; i++) {
+ *ptr++ =3D (Addr)copy_str(&strtab, VG_(args_for_client).strs[i]);
+ }
+ *ptr++ =3D 0;
+
+ /* --- envp --- */
+ VG_(client_envp) =3D (Char **)ptr;
+ for (cpp =3D orig_envp; cpp && *cpp; ptr++, cpp++)
+ *ptr =3D (Addr)copy_str(&strtab, *cpp);
+ *ptr++ =3D 0;
+
+ /* --- auxv --- */
+ auxv =3D (struct ume_auxv *)ptr;
+ *client_auxv =3D (UInt *)auxv;
+
+# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ auxv[0].a_type =3D AT_IGNOREPPC;
+ auxv[0].u.a_val =3D AT_IGNOREPPC;
+ auxv[1].a_type =3D AT_IGNOREPPC;
+ auxv[1].u.a_val =3D AT_IGNOREPPC;
+ auxv +=3D 2;
+# endif
+
+ for (; orig_auxv->a_type !=3D AT_NULL; auxv++, orig_auxv++) {
+
+ /* copy the entry... */
+ *auxv =3D *orig_auxv;
+
+ /* ...and fix up / examine the copy */
+ switch(auxv->a_type) {
+
+ case AT_IGNORE:
+ case AT_PHENT:
+ case AT_PAGESZ:
+ case AT_FLAGS:
+ case AT_NOTELF:
+ case AT_UID:
+ case AT_EUID:
+ case AT_GID:
+ case AT_EGID:
+ case AT_CLKTCK:
+ case AT_FPUCW:
+ /* All these are pointerless, so we don't need to do
+ anything about them. */
+ break;
+
+ case AT_PHDR:
+ if (info->phdr =3D=3D 0)
+ auxv->a_type =3D AT_IGNORE;
+ else
+ auxv->u.a_val =3D info->phdr;
+ break;
+
+ case AT_PHNUM:
+ if (info->phdr =3D=3D 0)
+ auxv->a_type =3D AT_IGNORE;
+ else
+ auxv->u.a_val =3D info->phnum;
+ break;
+
+ case AT_BASE:
+ auxv->u.a_val =3D info->interp_base;
+ break;
+
+ case AT_PLATFORM:
+ /* points to a platform description string */
+ auxv->u.a_ptr =3D copy_str(&strtab, orig_auxv->u.a_ptr);
+ break;
+
+ case AT_ENTRY:
+ auxv->u.a_val =3D info->entry;
+ break;
+
+ case AT_HWCAP:
+ break;
+
+ case AT_DCACHEBSIZE:
+ case AT_ICACHEBSIZE:
+ case AT_UCACHEBSIZE:
+# if defined(VGP_ppc32_linux)
+ /* acquire cache info */
+ if (auxv->u.a_val > 0) {
+ VG_(machine_ppc32_set_clszB)( auxv->u.a_val );
+ VG_(debugLog)(2, "initimg",=20
+ "PPC32 cache line size %u (type %u)\n",=20
+ (UInt)auxv->u.a_val, (UInt)auxv->a_type =
);
+ }
+# elif defined(VGP_ppc64_linux)
+ /* acquire cache info */
+ if (auxv->u.a_val > 0) {
+ VG_(machine_ppc64_set_clszB)( auxv->u.a_val );
+ VG_(debugLog)(2, "initimg",=20
+ "PPC64 cache line size %u (type %u)\n",=20
+ (UInt)auxv->u.a_val, (UInt)auxv->a_type =
);
+ }
+# endif
+ break;
+
+# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ case AT_IGNOREPPC:
+ break;
+# endif
+
+ case AT_SECURE:
+ /* If this is 1, then it means that this program is
+ running suid, and therefore the dynamic linker should
+ be careful about LD_PRELOAD, etc. However, since
+ stage1 (the thing the kernel actually execve's) should
+ never be SUID, and we need LD_PRELOAD to work for the
+ client, we set AT_SECURE to 0. */
+ auxv->u.a_val =3D 0;
+ break;
+
+ case AT_SYSINFO:
+# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64_linux)
+ case AT_SYSINFO_EHDR:
+# endif
+ /* Trash this, because we don't reproduce it */
+ auxv->a_type =3D AT_IGNORE;
+ break;
+
+ default:
+ /* stomp out anything we don't know about */
+ VG_(debugLog)(2, "initimg",
+ "stomping auxv entry %lld\n",=20
+ (ULong)auxv->a_type);
+ auxv->a_type =3D AT_IGNORE;
+ break;
+ }
+ }
+ *auxv =3D *orig_auxv;
+ vg_assert(auxv->a_type =3D=3D AT_NULL);
+
+ vg_assert((strtab-stringbase) =3D=3D stringsize);
+
+ /* client_SP is pointing at client's argc/argv */
+
+ if (0) VG_(printf)("startup SP =3D %p\n", client_SP);
+ return client_SP;
+}
+
+
+/* Allocate the client data segment. It is an expandable anonymous
+ mapping abutting a shrinkable reservation of size max_dseg_size.
+ The data segment starts at VG_(brk_base), which is page-aligned,
+ and runs up to VG_(brk_limit), which isn't. */
+
+static void setup_client_dataseg ( SizeT max_size )
+{
+ Bool ok;
+ SysRes sres;
+ Addr anon_start =3D VG_(brk_base);
+ SizeT anon_size =3D VKI_PAGE_SIZE;
+ Addr resvn_start =3D anon_start + anon_size;
+ SizeT resvn_size =3D max_size - anon_size;
+
+ vg_assert(VG_IS_PAGE_ALIGNED(anon_size));
+ vg_assert(VG_IS_PAGE_ALIGNED(resvn_size));
+ vg_assert(VG_IS_PAGE_ALIGNED(anon_start));
+ vg_assert(VG_IS_PAGE_ALIGNED(resvn_start));
+
+ /* Because there's been no brk activity yet: */
+ vg_assert(VG_(brk_base) =3D=3D VG_(brk_limit));
+
+ /* Try to create the data seg and associated reservation where
+ VG_(brk_base) says. */
+ ok =3D VG_(am_create_reservation)(=20
+ resvn_start,=20
+ resvn_size,=20
+ SmLower,=20
+ anon_size
+ );
+
+ if (!ok) {
+ /* Hmm, that didn't work. Well, let aspacem suggest an address
+ it likes better, and try again with that. */
+ anon_start =3D VG_(am_get_advisory_client_simple)
+ ( 0/*floating*/, anon_size+resvn_size, &ok );
+ if (ok) {
+ resvn_start =3D anon_start + anon_size;
+ ok =3D VG_(am_create_reservation)(=20
+ resvn_start,=20
+ resvn_size,=20
+ SmLower,=20
+ anon_size
+ );
+ if (ok)
+ VG_(brk_base) =3D VG_(brk_limit) =3D anon_start;
+ }
+ /* that too might have failed, but if it has, we're hosed: there
+ is no Plan C. */
+ }
+ vg_assert(ok);
+
+ /* We make the data segment (heap) executable because LinuxThreads on
+ ppc32 creates trampolines in this area. Also, on x86/Linux the da=
ta
+ segment is RWX natively, at least according to /proc/self/maps.
+ Also, having a non-executable data seg would kill any program whic=
h
+ tried to create code in the data seg and then run it. */
+ sres =3D VG_(am_mmap_anon_fixed_client)(=20
+ anon_start,=20
+ anon_size,=20
+ VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC
+ );
+ vg_assert(!sres.isError);
+ vg_assert(sres.res =3D=3D anon_start);
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D TOP-LEVEL: VG_(setup_client_initial_image) =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* Create the client's initial memory image. */
+
+ClientInitImgInfo
+ VG_(setup_client_initial_image)(
+ /*IN*/ HChar** argv,
+ /*IN*/ HChar** envp,
+ /*IN*/ HChar* toolname,
+ /*IN*/ Addr clstack_top,
+ /*IN*/ SizeT clstack_max_size
+ )
+{
+ ClientInitImgInfo ciii =3D { 0, 0, 0, NULL };
+ ExeInfo info;
+ HChar** env =3D NULL;
+
+ //--------------------------------------------------------------
+ // Load client executable, finding in $PATH if necessary
+ // p: get_helprequest_and_toolname() [for 'exec', 'need_help']
+ // p: layout_remaining_space [so there's space]
+ //--------------------------------------------------------------
+ VG_(debugLog)(1, "initimg", "Loading client\n");
+
+ if (VG_(args_the_exename) =3D=3D NULL)
+ VG_(err_missing_prog)();
+
+ load_client(&info, &ciii.initial_client_IP, &ciii.initial_client_TOC)=
;
+
+ //--------------------------------------------------------------
+ // Set up client's environment
+ // p: set-libdir [for VG_(libdir)]
+ // p: get_helprequest_and_toolname [for toolname]
+ //--------------------------------------------------------------
+ VG_(debugLog)(1, "initimg", "Setup client env\n");
+ env =3D setup_client_env(envp, toolname);
+
+ //--------------------------------------------------------------
+ // Setup client stack, eip, and VG_(client_arg[cv])
+ // p: load_client() [for 'info']
+ // p: fix_environment() [for 'env']
+ //--------------------------------------------------------------
+ {
+ void* init_sp =3D argv - 1;
+ SizeT m1 =3D 1024 * 1024;
+ SizeT m16 =3D 16 * m1;
+ VG_(debugLog)(1, "initimg", "Setup client stack\n");
+ clstack_max_size =3D (SizeT)VG_(client_rlimit_stack).rlim_cur;
+ if (clstack_max_size < m1) clstack_max_size =3D m1;
+ if (clstack_max_size > m16) clstack_max_size =3D m16;
+ clstack_max_size =3D VG_PGROUNDUP(clstack_max_size);
+
+ ciii.initial_client_SP
+ =3D setup_client_stack( init_sp, env,=20
+ &info, &ciii.client_auxv,=20
+ clstack_top, clstack_max_size );
+
+ VG_(free)(env);
+
+ VG_(debugLog)(2, "initimg",
+ "Client info: "
+ "initial_IP=3D%p initial_SP=3D%p initial_TOC=3D%p=
brk_base=3D%p\n",
+ (void*)(ciii.initial_client_IP),=20
+ (void*)(ciii.initial_client_SP),
+ (void*)(ciii.initial_client_TOC),
+ (void*)VG_(brk_base) );
+ }
+
+ //--------------------------------------------------------------
+ // Setup client data (brk) segment. Initially a 1-page segment
+ // which abuts a shrinkable reservation.=20
+ // p: load_client() [for 'info' and hence VG_(brk_base)]
+ //--------------------------------------------------------------
+ {=20
+ SizeT m1 =3D 1024 * 1024;
+ SizeT m8 =3D 8 * m1;
+ SizeT dseg_max_size =3D (SizeT)VG_(client_rlimit_data).rlim_cur;
+ VG_(debugLog)(1, "initimg", "Setup client data (brk) segment\n");
+ if (dseg_max_size < m1) dseg_max_size =3D m1;
+ if (dseg_max_size > m8) dseg_max_size =3D m8;
+ dseg_max_size =3D VG_PGROUNDUP(dseg_max_size);
+
+ setup_client_dataseg( dseg_max_size );
+ }
+
+ return ciii;
+}
+
+
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+/*=3D=3D=3D TOP-LEVEL: VG_(finalise_thread1state) =
=3D=3D=3D*/
+/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
+
+/* Make final adjustments to the initial image. Also, initialise the
+ VEX guest state for thread 1 (the root thread) and copy in
+ essential starting values. Is handed the ClientInitImgInfo created
+ by VG_(setup_client_initial_image). Upon return, the client's
+ memory and register state should be ready to start the JIT. */
+extern=20
+void VG_(finalise_thread1state)( /*MOD*/ThreadArchState* arch,
+ ClientInitImgInfo ciii )
+{
+ /* On Linux we get client_{ip/sp/toc}, and start the client with
+ all other registers zeroed. */
+
+# if defined(VGP_x86_linux)
+ vg_assert(0 =3D=3D sizeof(VexGuestX86State) % 8);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestX86_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestX86State));
+
+ /* Put essential stuff into the new state. */
+ arch->vex.guest_ESP =3D ciii.initial_client_SP;
+ arch->vex.guest_EIP =3D ciii.initial_client_IP;
+
+ /* initialise %cs, %ds and %ss to point at the operating systems
+ default code, data and stack segments */
+ asm volatile("movw %%cs, %0" : : "m" (arch->vex.guest_CS));
+ asm volatile("movw %%ds, %0" : : "m" (arch->vex.guest_DS));
+ asm volatile("movw %%ss, %0" : : "m" (arch->vex.guest_SS));
+
+# elif defined(VGP_amd64_linux)
+ vg_assert(0 =3D=3D sizeof(VexGuestAMD64State) % 8);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestAMD64_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestAMD64State));
+
+ /* Put essential stuff into the new state. */
+ arch->vex.guest_RSP =3D ciii.initial_client_SP;
+ arch->vex.guest_RIP =3D ciii.initial_client_IP;
+
+# elif defined(VGP_ppc32_linux)
+ vg_assert(0 =3D=3D sizeof(VexGuestPPC32State) % 8);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestPPC32_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestPPC32State));
+
+ /* Put essential stuff into the new state. */
+ arch->vex.guest_GPR1 =3D ciii.initial_client_SP;
+ arch->vex.guest_CIA =3D ciii.initial_client_IP;
+
+# elif defined(VGP_ppc64_linux)
+ vg_assert(0 =3D=3D sizeof(VexGuestPPC64State) % 16);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestPPC64_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestPPC64State));
+
+ /* Put essential stuff into the new state. */
+ arch->vex.guest_GPR1 =3D ciii.initial_client_SP;
+ arch->vex.guest_GPR2 =3D ciii.initial_client_TOC;
+ arch->vex.guest_CIA =3D ciii.initial_client_IP;
+
+# else
+# error Unknown platform
+# endif
+
+ /* Tell the tool that we just wrote to the registers. */
+ VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
+ sizeof(VexGuestArchState));
+}
+
+
+/*--------------------------------------------------------------------*/
+/*--- initimg-linux.c ---*/
+/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2006-10-01 11:20:40
|
Author: sewardj
Date: 2006-10-01 12:20:36 +0100 (Sun, 01 Oct 2006)
New Revision: 6103
Log:
Initial-image creation stuff for AIX5.
Added:
branches/AIX5/coregrind/m_initimg/initimg-aix5.c
branches/AIX5/coregrind/m_initimg/simple_huffman.c
branches/AIX5/coregrind/pub_core_initimg.h
Added: branches/AIX5/coregrind/m_initimg/initimg-aix5.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
--- branches/AIX5/coregrind/m_initimg/initimg-aix5.c =
(rev 0)
+++ branches/AIX5/coregrind/m_initimg/initimg-aix5.c 2006-10-01 11:20:36 =
UTC (rev 6103)
@@ -0,0 +1,513 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Startup: create initial process image on AIX5 ---*/
+/*--- initimg-aix5.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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 "pub_core_basics.h"
+#include "pub_core_vki.h"
+#include "pub_core_vkiscnums.h"
+#include "pub_core_debuglog.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcfile.h"
+#include "pub_core_libcproc.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_clientstate.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_mallocfree.h"
+#include "pub_core_machine.h"
+#include "pub_core_ume.h"
+#include "pub_core_options.h"
+#include "pub_core_threadstate.h" /* ThreadArchState */
+#include "pub_core_tooliface.h" /* VG_TRACK */
+#include "pub_core_trampoline.h" /* VG_(ppc32_aix5_do_preloads_then_star=
t_client) */
+#include "pub_core_syscall.h" // VG_(do_syscall1)
+#include "pub_core_initimg.h" /* self */
+
+#include "simple_huffman.c"
+
+#if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+#error "This should only be compiled on AIX"
+#endif
+
+
+static void diagnose_load_failure ( void );
+
+/* --- Create the client's initial memory image. --- */
+
+ClientInitImgInfo
+ VG_(setup_client_initial_image)(
+ /*IN*/ HChar** argv,
+ /*IN*/ HChar** envp,
+ /*IN*/ HChar* toolname,
+ /*IN*/ Addr clstack_top,
+ /*IN*/ SizeT clstack_max_size
+ )
+{
+ ClientInitImgInfo ciii;
+
+ /* Set up an AIX5PreloadPage structure with the names of
+
+ $VALGRIND_LIB/PLATFORM/vgpreload_core.so
+ $VALGRIND_LIB/PLATFORM/vgpreload_TOOL.so, if it exists
+ xxx in "LD_PRELOAD=3Dxxx", if it exists
+
+ The client is started by running (on the simulator, of course)
+ VG_(ppc{32,64}_aix5_do_preloads_then_start_client), which uses
+ __loadx/_kload to load these .so's. When the preloading is
+ done, various guest registers are restored to what they are
+ really supposed to be at client startup, so these values too are
+ stored in the AIX5PreloadPage. Finally, we jump to the client's
+ entry point address.=20
+ */
+ const HChar* _so =3D ".so";
+ const HChar* vgpreload_ =3D "vgpreload_";
+ const HChar* vgpreload_core_so =3D "vgpreload_core.so";
+ const HChar* errmsg_str=20
+ =3D "valgrind: FATAL: core/tool/LD_PRELOAD=3D "
+ "preload failed.\n";
+ Int plcore_len, pltool_len, ld_pre_len, errmsg_len;
+ HChar *plcore_str, *pltool_str, *ld_pre_str;
+ Bool have_tool_so, have_ld_pre;
+
+ AIX5PreloadPage* pp;
+ UChar* pc;
+ Int szB, szPG;
+ SysRes sres;
+
+ vg_assert( toolname );
+ pltool_len =3D VG_(strlen)( VG_(libdir) )=20
+ + 1 /*slash*/
+ + VG_(strlen)(VG_PLATFORM)
+ + 1 /*slash*/
+ + VG_(strlen)( vgpreload_ )
+ + VG_(strlen)( toolname )
+ + VG_(strlen)( _so )
+ + 1 /*NUL*/;
+ vg_assert(pltool_len > 0);
+ pltool_str =3D VG_(malloc)( pltool_len );
+ pltool_str[0] =3D 0;
+ VG_(strcat)( pltool_str, VG_(libdir) );
+ VG_(strcat)( pltool_str, "/" );
+ VG_(strcat)( pltool_str, VG_PLATFORM );
+ VG_(strcat)( pltool_str, "/" );
+ VG_(strcat)( pltool_str, vgpreload_ );
+ VG_(strcat)( pltool_str, toolname );
+ VG_(strcat)( pltool_str, _so );
+ vg_assert( pltool_str[pltool_len-1] =3D=3D 0);
+ vg_assert( VG_(strlen)(pltool_str) =3D=3D pltool_len-1 );
+
+ plcore_len =3D VG_(strlen)( VG_(libdir) )=20
+ + 1 /*slash*/
+ + VG_(strlen)(VG_PLATFORM)
+ + 1 /*slash*/
+ + VG_(strlen)( vgpreload_core_so )
+ + 1 /*NUL*/;
+ vg_assert(plcore_len > 0);
+ plcore_str =3D VG_(malloc)( plcore_len );
+ plcore_str[0] =3D 0;
+ VG_(strcat)( plcore_str, VG_(libdir) );
+ VG_(strcat)( plcore_str, "/" );
+ VG_(strcat)( plcore_str, VG_PLATFORM );
+ VG_(strcat)( plcore_str, "/" );
+ VG_(strcat)( plcore_str, vgpreload_core_so );
+ vg_assert( plcore_str[plcore_len-1] =3D=3D 0 );
+ vg_assert( VG_(strlen)(plcore_str) =3D=3D plcore_len-1 );
+
+ errmsg_len =3D VG_(strlen)( errmsg_str )
+ + 1 /*NUL*/;
+
+ ld_pre_str =3D VG_(getenv)("LD_PRELOAD");
+ if (ld_pre_str && VG_(strlen)(ld_pre_str) > 0) {
+ have_ld_pre =3D True;
+ ld_pre_len =3D VG_(strlen)(ld_pre_str) + 1/*NUL*/;
+ ld_pre_str =3D VG_(malloc)( ld_pre_len );
+ ld_pre_str[0] =3D 0;
+ VG_(strcat)( ld_pre_str, VG_(getenv)("LD_PRELOAD") );
+ vg_assert( ld_pre_str[ld_pre_len-1] =3D=3D 0);
+ vg_assert( VG_(strlen)( ld_pre_str ) =3D=3D ld_pre_len - 1 );
+ } else {
+ have_ld_pre =3D False;
+ ld_pre_len =3D 0;
+ ld_pre_str =3D NULL;
+ }
+
+ VG_(debugLog)(1, "initimg", "plcore_str =3D '%s'\n", plcore_str );
+ VG_(debugLog)(1, "initimg", "pltool_str =3D '%s'\n", pltool_str );
+ VG_(debugLog)(1, "initimg", "ld_pre_str =3D '%s'\n", ld_pre_str );
+
+ if (0 !=3D VG_(access)(plcore_str, True,False,True))
+ VG_(err_config_error)("Can't find core preload "
+ "(vgpreload_core.so)");
+
+ have_tool_so =3D 0 =3D=3D VG_(access)(pltool_str, True,False,True);
+
+ /* Figure out how much space is needed for an AIX5PreloadInfo
+ followed by the three preload strings. */
+
+ vg_assert((sizeof(AIX5PreloadPage) % 4) =3D=3D 0); /* paranoia */
+
+ szB =3D sizeof(AIX5PreloadPage) + plcore_len=20
+ + (have_tool_so ? pltool_len : 0)
+ + (have_ld_pre ? ld_pre_len : 0)
+ + errmsg_len;
+ szPG =3D VG_PGROUNDUP(szB+1) / VKI_PAGE_SIZE;
+ vg_assert(szB > 0);
+ vg_assert(szB < szPG * VKI_PAGE_SIZE);
+
+ /* We'll need szPG pages of anonymous, rw-, client space (needs w
+ so we can write it here) */
+ sres =3D VG_(am_mmap_anon_float_client)
+ ( szPG * VKI_PAGE_SIZE, VKI_PROT_READ|VKI_PROT_WRITE);
+ if (sres.isError)
+ VG_(err_config_error)("Can't allocate client page(s) "
+ "for preload info");
+ pp =3D (AIX5PreloadPage*)sres.res;
+
+ /* Zero out the initial structure. */
+ VG_(memset)(pp, 0, sizeof(AIX5PreloadPage));
+
+ pc =3D (UChar*)pp;
+ pc +=3D sizeof(AIX5PreloadPage);
+ VG_(memcpy)(pc, plcore_str, plcore_len);
+ pp->off_preloadcorename =3D pc - (UChar*)pp;
+ pc +=3D plcore_len;
+ if (have_tool_so) {
+ VG_(memcpy)(pc, pltool_str, pltool_len);
+ pp->off_preloadtoolname =3D pc - (UChar*)pp;
+ pc +=3D pltool_len;
+ }
+ if (have_ld_pre) {
+ VG_(memcpy)(pc, ld_pre_str, ld_pre_len);
+ pp->off_ld_preloadname =3D pc - (UChar*)pp;
+ pc +=3D ld_pre_len;
+ }
+ VG_(memcpy)(pc, errmsg_str, errmsg_len);
+ pp->off_errmsg =3D pc - (UChar*)pp;
+ pp->len_errmsg =3D errmsg_len - 1; /* -1: skip terminating NUL */
+
+ vg_assert(pc < ((UChar*)pp) + szPG * VKI_PAGE_SIZE);
+
+ VG_(free)(plcore_str);
+ VG_(free)(pltool_str);
+
+ /* Fill in all the other preload page fields that we can right
+ now. */
+# if defined(VGP_ppc32_aix5)
+ vg_assert(__NR_AIX5___loadx !=3D __NR_AIX5_UNKNOWN);
+ pp->nr_load =3D __NR_AIX5___loadx;
+# else /* defined(VGP_ppc64_aix5) */
+ vg_assert(__NR_AIX5_kload !=3D __NR_AIX5_UNKNOWN);
+ pp->nr_load =3D __NR_AIX5_kload;
+# endif
+
+ vg_assert(__NR_AIX5_kwrite !=3D __NR_AIX5_UNKNOWN);
+ pp->nr_kwrite =3D __NR_AIX5_kwrite; /* kwrite */
+
+ vg_assert(__NR_AIX5__exit !=3D __NR_AIX5_UNKNOWN);
+ pp->nr__exit =3D __NR_AIX5__exit; /* _exit */
+
+ pp->p_diagnose_load_failure =3D &diagnose_load_failure;
+
+ ciii.preloadpage =3D pp;
+ ciii.intregs37 =3D 0; /* filled in in m_main.c */
+ return ciii;
+}
+
+
+/* --- Finalise the initial image and register state. --- */
+
+static UChar unz_page[VKI_PAGE_SIZE];
+
+static UInt compute_adler32 ( void* addr, UWord len )
+{
+ UInt s1 =3D 1;
+ UInt s2 =3D 0;
+ UChar* buf =3D (UChar*)addr;
+ while (len > 0) {
+ s1 +=3D buf[0];
+ s2 +=3D s1;
+ s1 %=3D 65521;
+ s2 %=3D 65521;
+ len--;
+ buf++;
+ }
+ return (s2 << 16) + s1;
+}
+
+void VG_(finalise_thread1state)( /*MOD*/ThreadArchState* arch,
+ ClientInitImgInfo ciii )
+{
+ SysRes sres;
+ /* On AIX we get a block of 37 words telling us the initial state
+ for (GPR0 .. GPR31, PC, CR, LR, CTR, XER), and we start with all
+ the other registers zeroed. */
+
+# if defined(VGP_ppc32_aix5)
+
+ vg_assert(0 =3D=3D sizeof(VexGuestPPC32State) % 8);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestPPC32_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestPPC32State));
+
+# else /* defined(VGP_ppc64_aix5) */
+
+ vg_assert(0 =3D=3D sizeof(VexGuestPPC64State) % 8);
+
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestPPC64_initialise(&arch->vex);
+
+ /* Zero out the shadow area. */
+ VG_(memset)(&arch->vex_shadow, 0, sizeof(VexGuestPPC64State));
+
+# endif
+
+ /* ciii.intregs37 contains the integer register state as it needs
+ to be at client startup. These values are supplied by the
+ launcher. The 37 regs are:initial values from launcher for:
+ GPR0 .. GPR31, PC, CR, LR, CTR, XER. */
+
+ /* Put essential stuff into the new state. */
+ arch->vex.guest_GPR0 =3D (UWord)ciii.intregs37[0];
+ arch->vex.guest_GPR1 =3D (UWord)ciii.intregs37[1];
+ arch->vex.guest_GPR2 =3D (UWord)ciii.intregs37[2];
+ arch->vex.guest_GPR3 =3D (UWord)ciii.intregs37[3];
+ arch->vex.guest_GPR4 =3D (UWord)ciii.intregs37[4];
+ arch->vex.guest_GPR5 =3D (UWord)ciii.intregs37[5];
+ arch->vex.guest_GPR6 =3D (UWord)ciii.intregs37[6];
+ arch->vex.guest_GPR7 =3D (UWord)ciii.intregs37[7];
+ arch->vex.guest_GPR8 =3D (UWord)ciii.intregs37[8];
+ arch->vex.guest_GPR9 =3D (UWord)ciii.intregs37[9];
+ arch->vex.guest_GPR10 =3D (UWord)ciii.intregs37[10];
+ arch->vex.guest_GPR11 =3D (UWord)ciii.intregs37[11];
+ arch->vex.guest_GPR12 =3D (UWord)ciii.intregs37[12];
+ arch->vex.guest_GPR13 =3D (UWord)ciii.intregs37[13];
+ arch->vex.guest_GPR14 =3D (UWord)ciii.intregs37[14];
+ arch->vex.guest_GPR15 =3D (UWord)ciii.intregs37[15];
+ arch->vex.guest_GPR16 =3D (UWord)ciii.intregs37[16];
+ arch->vex.guest_GPR17 =3D (UWord)ciii.intregs37[17];
+ arch->vex.guest_GPR18 =3D (UWord)ciii.intregs37[18];
+ arch->vex.guest_GPR19 =3D (UWord)ciii.intregs37[19];
+ arch->vex.guest_GPR20 =3D (UWord)ciii.intregs37[20];
+ arch->vex.guest_GPR21 =3D (UWord)ciii.intregs37[21];
+ arch->vex.guest_GPR22 =3D (UWord)ciii.intregs37[22];
+ arch->vex.guest_GPR23 =3D (UWord)ciii.intregs37[23];
+ arch->vex.guest_GPR24 =3D (UWord)ciii.intregs37[24];
+ arch->vex.guest_GPR25 =3D (UWord)ciii.intregs37[25];
+ arch->vex.guest_GPR26 =3D (UWord)ciii.intregs37[26];
+ arch->vex.guest_GPR27 =3D (UWord)ciii.intregs37[27];
+ arch->vex.guest_GPR28 =3D (UWord)ciii.intregs37[28];
+ arch->vex.guest_GPR29 =3D (UWord)ciii.intregs37[29];
+ arch->vex.guest_GPR30 =3D (UWord)ciii.intregs37[30];
+ arch->vex.guest_GPR31 =3D (UWord)ciii.intregs37[31];
+
+ arch->vex.guest_CIA =3D (UWord)ciii.intregs37[32+0];
+ arch->vex.guest_LR =3D (UWord)ciii.intregs37[32+2];
+ arch->vex.guest_CTR =3D (UWord)ciii.intregs37[32+3];
+
+# if defined(VGP_ppc32_aix5)
+
+ LibVEX_GuestPPC32_put_CR( (UWord)ciii.intregs37[32+1], &arch->vex );
+ LibVEX_GuestPPC32_put_XER( (UWord)ciii.intregs37[32+4], &arch->vex );
+
+ /* Set the cache line size (KLUDGE) */
+ VG_(machine_ppc32_set_clszB)( 128 );
+
+# else /* defined(VGP_ppc64_aix5) */
+
+ LibVEX_GuestPPC64_put_CR( (UWord)ciii.intregs37[32+1], &arch->vex );
+ LibVEX_GuestPPC64_put_XER( (UWord)ciii.intregs37[32+4], &arch->vex );
+
+ /* Set the cache line size (KLUDGE) */
+ VG_(machine_ppc64_set_clszB)( 128 );
+
+# endif
+
+ /* Fix up the client's command line. Its argc/v/envp is in r3/4/5
+ (32-bit AIX) or r14/15/16 (64-bit AIX). but that is for the
+ Valgrind invokation as a whole. Hence we need to decrement argc
+ and advance argv to step over the args for Valgrind, and the
+ name of the Valgrind tool exe bogusly inserted by the launcher
+ (hence the "+1"). */
+
+# if defined(VGP_ppc32_aix5)
+
+ vg_assert(arch->vex.guest_GPR3 >=3D 1 + VG_(args_for_valgrind).used);
+ arch->vex.guest_GPR3 -=3D (1 + VG_(args_for_valgrind).used);
+ arch->vex.guest_GPR4 +=3D sizeof(UWord) * (1 + VG_(args_for_valgrind)=
.used);
+
+# else /* defined(VGP_ppc64_aix5) */
+
+ vg_assert(arch->vex.guest_GPR14 >=3D 1 + VG_(args_for_valgrind).used)=
;
+ arch->vex.guest_GPR14 -=3D (1 + VG_(args_for_valgrind).used);
+ arch->vex.guest_GPR15 +=3D sizeof(UWord) * (1 + VG_(args_for_valgrind=
).used);
+
+# endif
+
+ /* At this point the guest register state is correct for client
+ startup. However, that's not where we want to start; in fact we
+ want to start at VG_(ppc{3,64}2_aix5_do_preloads_then_start_client=
),
+ passing it ciii.preloadpage in r3. This will load the core/tool
+ preload .so's, then restore r2-r10 from what's stashed in the
+ preloadpage, and then start the client really. Hence: */
+
+ /* Save r2-r10 and the client start point in preloadpage */
+ ciii.preloadpage->r2 =3D (ULong)arch->vex.guest_GPR2;
+ ciii.preloadpage->r3 =3D (ULong)arch->vex.guest_GPR3;
+ ciii.preloadpage->r4 =3D (ULong)arch->vex.guest_GPR4;
+ ciii.preloadpage->r5 =3D (ULong)arch->vex.guest_GPR5;
+ ciii.preloadpage->r6 =3D (ULong)arch->vex.guest_GPR6;
+ ciii.preloadpage->r7 =3D (ULong)arch->vex.guest_GPR7;
+ ciii.preloadpage->r8 =3D (ULong)arch->vex.guest_GPR8;
+ ciii.preloadpage->r9 =3D (ULong)arch->vex.guest_GPR9;
+ ciii.preloadpage->r10 =3D (ULong)arch->vex.guest_GPR10;
+ ciii.preloadpage->client_start =3D (ULong)arch->vex.guest_CIA;
+
+
+# if defined(VGP_ppc32_aix5)
+
+ /* Set up to start at VG_(ppc32_aix5_do_preloads_then_start_client) *=
/
+ arch->vex.guest_CIA =3D (UWord)&VG_(ppc32_aix5_do_preloads_then_start=
_client);
+
+# else /* defined(VGP_ppc64_aix5) */
+
+ /* Set up to start at VG_(ppc64_aix5_do_preloads_then_start_client) *=
/
+ arch->vex.guest_CIA =3D (UWord)&VG_(ppc64_aix5_do_preloads_then_start=
_client);
+
+# endif
+
+ arch->vex.guest_GPR3 =3D (UWord)ciii.preloadpage;
+
+ /* The rest of the preloadpage fields will already have been filled
+ in by VG_(setup_client_initial_image). So we're done. */
+
+ /* Finally, decompress the page compressed by the launcher. We
+ can't do this any earlier, because the page is (effectively)
+ decompressed in place, which trashes ciii.intregs37. So we have
+ to wait till this point, at which we're done with ciii.intregs37
+ (to be precise, with what it points at). */
+ VG_(debugLog)(1, "initimg", "decompressing page at %p\n",=20
+ (void*)ciii.compressed_page);
+ vg_assert(VG_IS_PAGE_ALIGNED(ciii.compressed_page));
+
+ Huffman_Uncompress( (void*)ciii.compressed_page, unz_page,
+ VKI_PAGE_SIZE, VKI_PAGE_SIZE );
+ UInt adler32_act =3D compute_adler32(unz_page, VKI_PAGE_SIZE);
+
+ VG_(debugLog)(1, "initimg",=20
+ "decompress done, adler32s: act 0x%x, exp 0x%x\n",
+ adler32_act, ciii.adler32_exp );
+
+ VG_(memcpy)((void*)ciii.compressed_page, unz_page, VKI_PAGE_SIZE);
+
+ VG_(debugLog)(1, "initimg", "copy back done\n");
+
+ /* Tell the tool that we just wrote to the registers. */
+ VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
+ sizeof(VexGuestArchState));
+
+ /* Determine the brk limit. */
+ VG_(debugLog)(1, "initimg", "establishing current brk ..\n");
+ vg_assert(__NR_AIX5_sbrk !=3D __NR_AIX5_UNKNOWN);
+ sres =3D VG_(do_syscall1)(__NR_AIX5_sbrk, 0);
+ vg_assert(sres.err =3D=3D 0); /* assert no error */
+ VG_(brk_base) =3D VG_(brk_limit) =3D sres.res;
+ VG_(debugLog)(1, "initimg", ".. brk =3D %p\n", (void*)VG_(brk_base));
+}
+
+
+/* --- Diagnose preload failures. --- */
+
+/* This is a nasty but effective kludge. The address of the following
+ function is put into the preload page. So, if a preload failure
+ happens, we call here to get helpful info printed out (the call
+ site is in m_trampoline.S). This is a dirty hack (1) because
+ diagnose_load_failure runs on the simulated CPU, not the real one
+ and (2) because it induces a libc dependency. Oh well. */
+
+/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
+#include <stdlib.h>
+#include <sys/ldr.h>
+/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
+
+static void diagnose_load_failure ( void )
+{
+# define NBUF 1024
+ UChar buf[NBUF];
+ VG_(debugLog)(0, "initimg", "Diagnosing load failure\n");
+ if (sizeof(void*) =3D=3D 8) {
+ VG_(debugLog)(0, "initimg", "Can't safely do loadquery() "
+ "in 64-bit mode. Sorry.\n");
+ /* because this requires dynamic linking to be working (IIRC)
+ and it isn't; the tool file's dynamic linking was never done,
+ because it was loaded by the bootstrap stub, which simply did
+ sys_kload() but didn't make usla do the relevant
+ relocations. */
+ } else {
+ Int r =3D loadquery(L_GETMESSAGES, buf, NBUF);
+ VG_(debugLog)(0, "initimg", "loadquery returned %d (0 =3D success)=
\n", r);
+ UChar** p =3D (UChar**)(&buf[0]);
+ for (; *p; p++)
+ VG_(debugLog)(0, "initimg", "\"%s\"\n", *p);
+ VG_(debugLog)(0, "initimg", "Use /usr/sbin/execerror to make "
+ "sense of above string(s)\n");
+ VG_(debugLog)(0, "initimg", "See also comments at the bottom of\n"=
);
+ VG_(debugLog)(0, "initimg", "coregrind/m_initimg/"
+ "initimg-aix5.c (in Valgrind sources)\=
n");
+ }
+# undef NBUF
+}
+
+/* Take the strings that this prints out and feed them
+ to /usr/sbin/execerror. For example, it might print
+
+ (ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so
+
+ in which case=20
+
+ $ execerror xyzzy \
+ "(ld 3 1 __libc_freeres /foo/bar/ppc32-aix5/vgpreload_core.so"
+
+ gets you
+
+ Could not load program xyzzy:
+ rtld: 0712-001 Symbol __libc_freeres was referenced
+ from module /foo/bar/ppc32-aix5/vgpreload_core.so(),=20
+ but a runtime definition
+ of the symbol was not found.
+*/
+
+/*--------------------------------------------------------------------*/
+/*--- initimg-aix5.c ---*/
+/*--------------------------------------------------------------------*/
Added: branches/AIX5/coregrind/m_initimg/simple_huffman.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
--- branches/AIX5/coregrind/m_initimg/simple_huffman.c =
(rev 0)
+++ branches/AIX5/coregrind/m_initimg/simple_huffman.c 2006-10-01 11:20:3=
6 UTC (rev 6103)
@@ -0,0 +1,513 @@
+/***********************************************************************=
**
+* Name: huffman.c
+* Author: Marcus Geelnard
+* Description: Huffman coder/decoder implementation.
+* Reentrant: Yes
+* $Id: huffman.c,v 1.6 2004/12/14 18:59:40 marcus256 Exp $
+*
+* This is a very straight forward implementation of a Huffman coder and
+* decoder.
+*
+* Primary flaws with this primitive implementation are:
+* - Slow bit stream implementation
+* - Fairly slow decoding (slower than encoding)
+* - Maximum tree depth of 32 (the coder aborts if any code exceeds a
+* size of 32 bits). If I'm not mistaking, this should not be possible
+* unless the input buffer is larger than 2^32 bytes, which is not
+* supported by the coder anyway (max 2^32-1 bytes can be specified wi=
th
+* an unsigned 32-bit integer).
+*
+* On the other hand, there are a few advantages of this implementation:
+* - The Huffman tree is stored in a very compact form, requiring only
+* 12 bits per symbol (for 8 bit symbols), meaning a maximum of 384
+* bytes overhead.
+* - The Huffman coder does quite well in situations where the data is
+* noisy, in which case most dictionary based coders run into problems=
.
+*
+* Possible improvements (probably not worth it):
+* - Partition the input data stream into blocks, where each block has
+* its own Huffman tree. With variable block sizes, it should be
+* possible to find locally optimal Huffman trees, which in turn could
+* reduce the total size.
+* - Allow for a few different predefined Huffman trees, which could
+* reduce the size of a block even further.
+*-----------------------------------------------------------------------=
--
+* Copyright (c) 2003-2004 Marcus Geelnard
+*
+* This software is provided 'as-is', without any express or implied
+* warranty. In no event will the authors be held liable for any damages
+* arising from the use of this software.
+*
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+*
+* 1. The origin of this software must not be misrepresented; you must no=
t
+* claim that you wrote the original software. If you use this softwar=
e
+* in a product, an acknowledgment in the product documentation would
+* be appreciated but is not required.
+*
+* 2. Altered source versions must be plainly marked as such, and must no=
t
+* be misrepresented as being the original software.
+*
+* 3. This notice may not be removed or altered from any source
+* distribution.
+*
+* Marcus Geelnard
+* marcus.geelnard at home.se
+************************************************************************=
*/
+
+/* Modified May 06 by Julian Seward for use in Valgrind.
+ - changed integral types to V's versions (UInt, UChar etc)
+ - added initialisation in _Huffman_WriteBits, as described in
+ comment in that function.
+*/
+
+/***********************************************************************=
**
+* Types used for Huffman coding
+************************************************************************=
*/
+
+typedef struct {
+ UInt Symbol;
+ UInt Count;
+ UInt Code;
+ UInt Bits;
+} huff_sym_t;
+
+typedef struct {
+ UChar *BytePtr;
+ UInt BitPos;
+} huff_bitstream_t;
+
+
+
+/***********************************************************************=
**
+* INTERNAL FUNCTIONS =
*
+************************************************************************=
*/
+
+
+/***********************************************************************=
**
+* _Huffman_InitBitstream() - Initialize a bitstream.
+************************************************************************=
*/
+
+static void _Huffman_InitBitstream( huff_bitstream_t *stream,
+ UChar *buf )
+{
+ stream->BytePtr =3D buf;
+ stream->BitPos =3D 0;
+}
+
+
+/***********************************************************************=
**
+* _Huffman_ReadBits() - Read bits from a bitstream.
+************************************************************************=
*/
+
+static UInt _Huffman_ReadBits( huff_bitstream_t *stream,
+ UInt bits )
+{
+ UInt x, bit, count;
+ UChar *buf;
+
+ /* Get current stream state */
+ buf =3D stream->BytePtr;
+ bit =3D stream->BitPos;
+
+ /* Extract bits */
+ x =3D 0;
+ for( count =3D 0; count < bits; ++ count )
+ {
+ x =3D (x<<1) + (*buf & (1<<(7-bit)) ? 1 : 0);
+ bit =3D (bit+1) & 7;
+ if( !bit )
+ {
+ ++ buf;
+ }
+ }
+
+ /* Store new stream state */
+ stream->BytePtr =3D buf;
+ stream->BitPos =3D bit;
+
+ return x;
+}
+
+
+/***********************************************************************=
**
+* _Huffman_WriteBits() - Write bits to a bitstream.
+************************************************************************=
*/
+
+static void _Huffman_WriteBits( huff_bitstream_t *stream, UInt x,
+ UInt bits )
+{
+ UInt bit, count;
+ UChar *buf;
+ UInt mask;
+
+ /* Get current stream state */
+ buf =3D stream->BytePtr;
+ bit =3D stream->BitPos;
+
+ /* Append bits */
+ mask =3D 1 << (bits-1);
+ for( count =3D 0; count < bits; ++ count )
+ {
+ /* If we're starting a new byte, zero it out, so that the
+ resulting byte sequence looks completely defined from
+ Valgrind's point of view. If this doesn't happen then the
+ last byte in the stream may look partially undefined. */
+ if (bit =3D=3D 0)
+ *buf =3D 0;
+ *buf =3D (*buf & (0xff^(1<<(7-bit)))) +
+ ((x & mask ? 1 : 0) << (7-bit));
+ x <<=3D 1;
+ bit =3D (bit+1) & 7;
+ if( !bit )
+ {
+ ++ buf;
+ }
+ }
+
+ /* Store new stream state */
+ stream->BytePtr =3D buf;
+ stream->BitPos =3D bit;
+}
+
+
+/***********************************************************************=
**
+* _Huffman_Hist() - Calculate (sorted) histogram for a block of data.
+************************************************************************=
*/
+
+static void _Huffman_Hist( UChar *in, huff_sym_t *sym,
+ UInt size )
+{
+ Int k, swaps;
+ huff_sym_t tmp;
+
+ /* Clear/init histogram */
+ for( k =3D 0; k < 256; ++ k )
+ {
+ sym[k].Symbol =3D k;
+ sym[k].Count =3D 0;
+ sym[k].Code =3D 0;
+ sym[k].Bits =3D 0;
+ }
+
+ /* Build histogram */
+ for( k =3D size; k; -- k )
+ {
+ sym[ *in ++ ].Count ++;
+ }
+
+ /* Sort histogram - most frequent symbol first (bubble sort) */
+ do
+ {
+ swaps =3D 0;
+ for( k =3D 0; k < 255; ++ k )
+ {
+ if( sym[k].Count < sym[k+1].Count )
+ {
+ tmp =3D sym[k];
+ sym[k] =3D sym[k+1];
+ sym[k+1] =3D tmp;
+ swaps =3D 1;
+ }
+ }
+ }
+ while( swaps );
+}
+
+
+/***********************************************************************=
**
+* _Huffman_MakeTree() - Generate a Huffman tree.
+************************************************************************=
*/
+
+static void _Huffman_MakeTree( huff_sym_t *sym, huff_bitstream_t *stream=
,
+ UInt code, UInt bits, UInt first,
+ UInt last )
+{
+ UInt k, size, size_a, size_b, last_a, first_b;
+
+ /* Is this a leaf node? */
+ if( first =3D=3D last )
+ {
+ /* Append symbol to tree description */
+ _Huffman_WriteBits( stream, 1, 1 );
+ _Huffman_WriteBits( stream, sym[first].Symbol, 8 );
+
+ /* Store code info in symbol array */
+ sym[first].Code =3D code;
+ sym[first].Bits =3D bits;
+ return;
+ }
+ else
+ {
+ /* This was not a leaf node */
+ _Huffman_WriteBits( stream, 0, 1 );
+ }
+
+ /* Total size of interval */
+ size =3D 0;
+ for( k =3D first; k <=3D last; ++ k )
+ {
+ size +=3D sym[k].Count;
+ }
+
+ /* Find size of branch a */
+ size_a =3D 0;
+ for( k =3D first; size_a < ((size+1)>>1) && k < last; ++ k )
+ {
+ size_a +=3D sym[k].Count;
+ }
+
+ /* Non-empty branch? */
+ if( size_a > 0 )
+ {
+ /* Continue branching */
+ _Huffman_WriteBits( stream, 1, 1 );
+
+ /* Branch a cut in histogram */
+ last_a =3D k-1;
+
+ /* Create branch a */
+ _Huffman_MakeTree( sym, stream, (code<<1)+0, bits+1,
+ first, last_a );
+ }
+ else
+ {
+ /* This was an empty branch */
+ _Huffman_WriteBits( stream, 0, 1 );
+ }
+
+ /* Size of branch b */
+ size_b =3D size - size_a;
+
+ /* Non-empty branch? */
+ if( size_b > 0 )
+ {
+ /* Continue branching */
+ _Huffman_WriteBits( stream, 1, 1 );
+
+ /* Branch b cut in histogram */
+ first_b =3D k;
+
+ /* Create branch b */
+ _Huffman_MakeTree( sym, stream, (code<<1)+1, bits+1,
+ first_b, last );
+ }
+ else
+ {
+ /* This was an empty branch */
+ _Huffman_WriteBits( stream, 0, 1 );
+ }
+}
+
+
+/***********************************************************************=
**
+* _Huffman_RecoverTree() - Recover a Huffman tree from a bitstream.
+************************************************************************=
*/
+
+static void _Huffman_RecoverTree( huff_sym_t *sym,
+ huff_bitstream_t *stream, UInt code, UInt bits,
+ UInt *symnum )
+{
+ UInt symbol;
+
+ /* Is this a leaf node? */
+ if( _Huffman_ReadBits( stream, 1 ) )
+ {
+ /* Get symbol from tree description */
+ symbol =3D _Huffman_ReadBits( stream, 8 );
+
+ /* Store code info in symbol array */
+ sym[*symnum].Symbol =3D symbol;
+ sym[*symnum].Code =3D code;
+ sym[*symnum].Bits =3D bits;
+
+ /* Increase symbol counter */
+ *symnum =3D *symnum + 1;
+
+ return;
+ }
+
+ /* Non-empty branch? */
+ if( _Huffman_ReadBits( stream, 1 ) )
+ {
+ /* Create branch a */
+ _Huffman_RecoverTree( sym, stream, (code<<1)+0, bits+1,
+ symnum );
+ }
+
+ /* Non-empty branch? */
+ if( _Huffman_ReadBits( stream, 1 ) )
+ {
+ /* Create branch b */
+ _Huffman_RecoverTree( sym, stream, (code<<1)+1, bits+1,
+ symnum );
+ }
+}
+
+
+
+
+/***********************************************************************=
**
+* PUBLIC FUNCTIONS =
*
+************************************************************************=
*/
+
+
+/***********************************************************************=
**
+* Huffman_Compress() - Compress a block of data using a Huffman coder.
+* in - Input (uncompressed) buffer.
+* out - Output (compressed) buffer. This buffer must be 384 bytes
+* larger than the input buffer.
+* insize - Number of input bytes.
+* The function returns the size of the compressed data.
+************************************************************************=
*/
+static
+Int Huffman_Compress( UChar *in, UChar *out,
+ UInt insize )
+{
+ huff_sym_t sym[ 256 ], tmp;
+ huff_bitstream_t stream;
+ UInt k, total_bytes, swaps, symbol, last_symbol;
+
+ /* Do we have anything to compress? */
+ if( insize < 1 ) return 0;
+
+ /* Initialize bitstream */
+ _Huffman_InitBitstream( &stream, out );
+
+ /* Calculate and sort histogram for input data */
+ _Huffman_Hist( in, sym, insize );
+
+ /* Find number of used symbols */
+ for( last_symbol =3D 255; sym[last_symbol].Count =3D=3D 0; -- last_s=
ymbol );
+
+ /* Special case: In order to build a correct tree, we need at least
+ two symbols (otherwise we get zero-bit representations). */
+ if( last_symbol =3D=3D 0 ) ++ last_symbol;
+
+ /* Build Huffman tree */
+ _Huffman_MakeTree( sym, &stream, 0, 0, 0, last_symbol );
+
+ /* Was any code > 32 bits? (we do not handle that at present) */
+ for( k =3D 0; k < 255; ++ k )
+ {
+ if( sym[k].Bits > 32 )
+ {
+ return 0;
+ }
+ }
+
+ /* Sort histogram - first symbol first (bubble sort) */
+ do
+ {
+ swaps =3D 0;
+ for( k =3D 0; k < 255; ++ k )
+ {
+ if( sym[k].Symbol > sym[k+1].Symbol )
+ {
+ tmp =3D sym[k];
+ sym[k] =3D sym[k+1];
+ sym[k+1] =3D tmp;
+ swaps =3D 1;
+ }
+ }
+ }
+ while( swaps );
+
+ /* Encode input stream */
+ for( k =3D 0; k < insize; ++ k )
+ {
+ symbol =3D in[ k ];
+ _Huffman_WriteBits( &stream, sym[symbol].Code,
+ sym[symbol].Bits );
+ }
+
+ /* Calculate size of output data */
+ total_bytes =3D (Int)(stream.BytePtr - out);
+ if( stream.BitPos > 0 )
+ {
+ ++ total_bytes;
+ }
+
+ return total_bytes;
+}
+
+
+
+/***********************************************************************=
**
+* Huffman_Uncompress() - Uncompress a block of data using a Huffman
+* decoder.
+* in - Input (compressed) buffer.
+* out - Output (uncompressed) buffer. This buffer must be large
+* enough to hold the uncompressed data.
+* insize - Number of input bytes.
+* outsize - Number of output bytes.
+************************************************************************=
*/
+static
+void Huffman_Uncompress( UChar *in, UChar *out,
+ UInt insize, UInt outsize )
+{
+ huff_sym_t sym[ 256 ], tmp;
+ huff_bitstream_t stream;
+ UInt k, m, symbol_count, swaps;
+ UChar *buf;
+ UInt bits, delta_bits, new_bits, code;
+
+ /* Do we have anything to decompress? */
+ if( insize < 1 ) return;
+
+ /* Initialize bitstream */
+ _Huffman_InitBitstream( &stream, in );
+
+ /* Clear tree/histogram */
+ for( k =3D 0; k < 256; ++ k )
+ {
+ sym[k].Bits =3D 0x7fffffff;
+ }
+
+ /* Recover Huffman tree */
+ symbol_count =3D 0;
+ _Huffman_RecoverTree( sym, &stream, 0, 0, &symbol_count );
+
+ /* Sort histogram - shortest code first (bubble sort) */
+ do
+ {
+ swaps =3D 0;
+ for( k =3D 0; k < symbol_count-1; ++ k )
+ {
+ if( sym[k].Bits > sym[k+1].Bits )
+ {
+ tmp =3D sym[k];
+ sym[k] =3D sym[k+1];
+ sym[k+1] =3D tmp;
+ swaps =3D 1;
+ }
+ }
+ }
+ while( swaps );
+
+ /* Decode input stream */
+ buf =3D out;
+ for( k =3D 0; k < outsize; ++ k )
+ {
+ /* Search tree for matching code */
+ bits =3D 0;
+ code =3D 0;
+ for( m =3D 0; m < symbol_count; ++ m )
+ {
+ delta_bits =3D sym[m].Bits - bits;
+ if( delta_bits )
+ {
+ new_bits =3D _Huffman_ReadBits( &stream, delta_bits );
+ code =3D code | (new_bits << (32-bits-delta_bits));
+ bits =3D sym[m].Bits;
+ }
+ if( code =3D=3D (sym[m].Code << (32-sym[m].Bits)) )
+ {
+ *buf ++ =3D (UChar) sym[m].Symbol;
+ break;
+ }
+ }
+ }
+}
Added: branches/AIX5/coregrind/pub_core_initimg.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
--- branches/AIX5/coregrind/pub_core_initimg.h (r=
ev 0)
+++ branches/AIX5/coregrind/pub_core_initimg.h 2006-10-01 11:20:36 UTC (r=
ev 6103)
@@ -0,0 +1,139 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Create initial process image on for the client ---*/
+/*--- pub_core_initimg.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ 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_INITIMG_H
+#define __PUB_CORE_INITIMG_H
+
+//--------------------------------------------------------------------
+// PURPOSE: Map the client executable into memory, then set up its
+// stack, environment and data section, ready for execution. Quite a
+// lot of work on Linux (ELF) but nearly a no-op on AIX (XCOFF) since
+// the AIX kernel does most of the work for us.
+//--------------------------------------------------------------------
+
+#if defined(VGO_linux)
+typedef
+ struct {
+ Addr initial_client_SP;
+ Addr initial_client_IP;
+ Addr initial_client_TOC;
+ UInt* client_auxv;
+ }
+ ClientInitImgInfo;
+
+#elif defined(VGO_aix5)
+typedef
+ struct {
+ /* NOTE: VG_(ppc32/64_aix5_do_preloads_then_start_client) has
+ these offsets hardwired in. Do not change them without
+ changing it too. */
+ /* system call numbers */
+ /* 0 */ UInt nr_load; /* is __NR___loadx for 32-bit,=20
+ __NR_kload for 64 */
+ /* 4 */ UInt nr_kwrite;
+ /* 8 */ UInt nr__exit;
+ /* offset/length of error message, if the preloads fail */
+ /* 12 */ UInt off_errmsg;
+ /* 16 */ UInt len_errmsg;
+ /* offsets from start of this struct to the the preload file
+ names */
+ /* 20 */ UInt off_preloadcorename;
+ /* 24 */ UInt off_preloadtoolname;
+ /* 28 */ UInt off_ld_preloadname;
+ /* Once the preloading is done, we'll need to restore the guest
+ state to what it needs to be at client startup. Here's the
+ relevant info. Are ULongs; for 32-bit the data is at the
+ lsb (high addressed) end. */
+ /* 32 */ ULong client_start;
+ /* 40 */ ULong r2;
+ /* 48 */ ULong r3;
+ /* 56 */ ULong r4;
+ /* 64 */ ULong r5;
+ /* 72 */ ULong r6;
+ /* 80 */ ULong r7;
+ /* 88 */ ULong r8;
+ /* 96 */ ULong r9;
+ /* 104 */ ULong r10;
+ /* If the loading fails, we'll want to call a diagnostic
+ function in C to figure out what happened. Here's it's
+ function descriptor. Note, this runs on the simd cpu
+ (another nasty AIX kludge) */
+ /* 112 */ void* p_diagnose_load_failure;
+ }
+ AIX5PreloadPage;
+
+typedef
+ struct {
+ /* Pointer to the preload page. This is set up by
+ VG_(setup_client_initial_image). */
+ AIX5PreloadPage* preloadpage;
+ /* Initial values for guest int registers (GPR0 .. GPR31, PC,
+ CR, LR, CTR, XER). Passed to us from the launcher. */
+ ULong* intregs37;
+ /* Initial value for SP (which is merely a copy of r1's value,
+ intregs37[1]). */
+ Addr initial_client_SP;
+ /* Address of the page compressed by the launcher. */
+ Addr compressed_page;
+ /* Adler32 checksum of uncompressed data of said page. */
+ UInt adler32_exp;
+ }
+ ClientInitImgInfo;
+
+#else
+# error Unknown OS
+#endif
+
+/* Load the client, create the initial image (stack, etc), and
+ return a bundle of info in a ClientInitImgInfo. */
+extern ClientInitImgInfo
+ VG_(setup_client_initial_image)(
+ /*IN*/ HChar** argv,
+ /*IN*/ HChar** envp,
+ /*IN*/ HChar* toolname,
+ /*IN*/ Addr clstack_top,
+ /*IN*/ SizeT clstack_max_size
+ );
+
+/* Make final adjustments to the initial image. Also, initialise the
+ VEX guest state for thread 1 (the root thread) and copy in
+ essential starting values. Is handed the ClientInitImgInfo created
+ by VG_(setup_client_initial_image). Upon return, the client's
+ memory and register state should be ready to start the JIT. */
+extern=20
+void VG_(finalise_thread1state)( /*MOD*/ThreadArchState* arch,
+ ClientInitImgInfo ciii );
+
+#endif // __PUB_CORE_INITIMG_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2006-10-01 11:02:32
|
Author: sewardj
Date: 2006-10-01 12:02:28 +0100 (Sun, 01 Oct 2006)
New Revision: 6102
Log:
A new module ("Initial Image"), whose purpose is to set up the
client's initial memory and register state before running it. On
Linux this does all the stack/auxv/envp stuff which was previously
done in m_main. On AIX5 the kernel prepares the process' initial
image, so there's nothing to be done there. But LD_PRELOAD doesn't
work on AIX5, so m_initimg sets up the client so as to start by
running a short bit of code which gets the kernel to load in the core
and tool preloads and then start the client.
As a result of this, m_main gets a lot shorter and cleaner.
Added:
branches/AIX5/coregrind/m_initimg/
|
|
From: <sv...@va...> - 2006-10-01 10:55:39
|
Author: sewardj Date: 2006-10-01 11:55:34 +0100 (Sun, 01 Oct 2006) New Revision: 6101 Log: Syscall wrappers for AIX5. Unfortunately they duplicate some of the stuff in syswrap-generic.c since making that compile on AIX is just too difficult. Added: branches/AIX5/coregrind/m_syswrap/priv_syswrap-aix5.h branches/AIX5/coregrind/m_syswrap/syscall-ppc32-aix5.S branches/AIX5/coregrind/m_syswrap/syscall-ppc64-aix5.S branches/AIX5/coregrind/m_syswrap/syswrap-aix5.c branches/AIX5/coregrind/m_syswrap/syswrap-ppc32-aix5.c branches/AIX5/coregrind/m_syswrap/syswrap-ppc64-aix5.c [... diff too large to include ...] |
|
From: <js...@ac...> - 2006-10-01 04:07:01
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-10-01 04:30:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 238 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <to...@co...> - 2006-10-01 02:45:40
|
Nightly build on dunsmere ( athlon, Fedora Core 5 ) started at 2006-10-01 03:30:07 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 240 tests, 4 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2006-10-01 02:25:39
|
Nightly build on dellow ( x86_64, Fedora Core 5 ) started at 2006-10-01 03:10:03 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 268 tests, 14 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/fdleak_cmsg (stderr) none/tests/fdleak_creat (stderr) none/tests/fdleak_dup (stderr) none/tests/fdleak_dup2 (stderr) none/tests/fdleak_fcntl (stderr) none/tests/fdleak_ipv4 (stderr) none/tests/fdleak_open (stderr) none/tests/fdleak_pipe (stderr) none/tests/fdleak_socketpair (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/rlimit_nofile (stderr) |
|
From: Tom H. <th...@cy...> - 2006-10-01 02:24:59
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2006-10-01 03:15:02 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo /tmp/cc2nFWTk.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc2nFWTk.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.4579/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.4579/valgrind' make: *** [check] Error 2 ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo /tmp/cc4WZ5ZY.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc4WZ5ZY.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.4579/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.4579/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.4579/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sun Oct 1 03:19:54 2006 --- new.short Sun Oct 1 03:24:55 2006 *************** *** 7,16 **** Last 20 lines of verbose log follow echo ! /tmp/cc4WZ5ZY.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc4WZ5ZY.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 --- 7,16 ---- Last 20 lines of verbose log follow echo ! /tmp/cc2nFWTk.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc2nFWTk.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 |
|
From: Tom H. <th...@cy...> - 2006-10-01 02:20:15
|
Nightly build on lloyd ( x86_64, Fedora Core 3 ) started at 2006-10-01 03:05:07 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 268 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2006-10-01 02:13:53
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2006-10-01 03:00:02 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 270 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |