|
From: <sv...@va...> - 2006-10-17 02:10:49
|
Author: sewardj
Date: 2006-10-17 03:10:42 +0100 (Tue, 17 Oct 2006)
New Revision: 6292
Log:
Final merges from branches/AIX5; mostly tracking of SysRes change.
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2006-10-17 02:08:26 UTC (rev 6291)
+++ trunk/coregrind/m_main.c 2006-10-17 02:10:42 UTC (rev 6292)
@@ -80,6 +80,7 @@
VG_(print_tt_tc_stats)();
VG_(print_scheduler_stats)();
VG_(print_ExeContext_stats)();
+ VG_(print_errormgr_stats)();
=20
// Memory stats
if (VG_(clo_verbosity) > 2) {
@@ -360,6 +361,7 @@
=20
else VG_STR_CLO (arg, "--db-command", VG_(clo_db_command))
else VG_STR_CLO (arg, "--sim-hints", VG_(clo_sim_hints))
+ else VG_BOOL_CLO(arg, "--sym-offsets", VG_(clo_sym_offsets))
=20
else VG_NUM_CLO (arg, "--dump-error", VG_(clo_dump_error))
else VG_NUM_CLO (arg, "--input-fd", VG_(clo_input_fd))
@@ -609,15 +611,15 @@
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_T=
RUNC,=20
VKI_S_IRUSR|VKI_S_IWUSR);
if (!sres.isError) {
- tmp_log_fd =3D sres.val;
+ tmp_log_fd =3D sres.res;
break; /* for (;;) */
} else {
// If the file already existed, we try the next name. If=
it
// was some other file error, we give up.
- if (sres.val !=3D VKI_EEXIST) {
+ if (sres.err !=3D VKI_EEXIST) {
VG_(message)(Vg_UserMsg,=20
"Can't create log file '%s' (%s); giving up!",=20
- logfilename, VG_(strerror)(sres.val));
+ logfilename, VG_(strerror)(sres.err));
VG_(err_bad_option)(
"--log-file=3D<file> (didn't work out for some reason.)");
/*NOTREACHED*/
@@ -635,7 +637,7 @@
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,=20
VKI_S_IRUSR|VKI_S_IWUSR);
if (!sres.isError) {
- tmp_log_fd =3D sres.val;
+ tmp_log_fd =3D sres.res;
} else {
VG_(message)(Vg_UserMsg,=20
"Can't create/open log file '%s'; giving up!",=20
@@ -874,7 +876,7 @@
} else {
# define BUF_LEN 256
Char version_buf[BUF_LEN];
- Int n =3D VG_(read) ( fd.val, version_buf, BUF_LEN );
+ Int n =3D VG_(read) ( fd.res, version_buf, BUF_LEN );
vg_assert(n <=3D BUF_LEN);
if (n > 0) {
version_buf[n-1] =3D '\0';
@@ -882,7 +884,7 @@
} else {
VG_(message)(Vg_DebugMsg, " (empty?)");
}
- VG_(close)(fd.val);
+ VG_(close)(fd.res);
# undef BUF_LEN
}
=20
@@ -1657,7 +1659,7 @@
=20
/* show interesting ones to the tool */
for (i =3D 0; i < n_seg_starts; i++) {
- NSegment const*const seg=20
+ NSegment const* seg=20
=3D VG_(am_find_nsegment)( seg_starts[i] );
vg_assert(seg);
if (seg->kind =3D=3D SkFileC || seg->kind =3D=3D SkAnonC) {
@@ -1675,7 +1677,7 @@
VG_(free)( seg_starts );
=20
/* Also do the initial stack permissions. */
- { NSegment const*const seg=20
+ { NSegment const* seg=20
=3D VG_(am_find_nsegment)( ciii.initial_client_SP );
vg_assert(seg);
vg_assert(seg->kind =3D=3D SkAnonC);
@@ -1717,7 +1719,7 @@
// p: setup_client_stack
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Initialise scheduler\n");
- { NSegment const*const seg=20
+ { NSegment const* seg=20
=3D VG_(am_find_nsegment)( ciii.initial_client_SP );
vg_assert(seg);
vg_assert(seg->kind =3D=3D SkAnonC);
@@ -1837,12 +1839,11 @@
=20
vg_assert(VG_(is_running_thread)(tid));
=20
- // XXXXXXXXX REINSTATE
- //vg_assert(tids_schedretcode =3D=3D VgSrc_ExitThread
- // || tids_schedretcode =3D=3D VgSrc_ExitProcess
- // || tids_schedretcode =3D=3D VgSrc_FatalSig );
+ vg_assert(tids_schedretcode =3D=3D VgSrc_ExitThread
+ || tids_schedretcode =3D=3D VgSrc_ExitProcess
+ || tids_schedretcode =3D=3D VgSrc_FatalSig );
=20
- if (1 /*tids_schedretcode =3D=3D VgSrc_ExitThread*/) {
+ if (tids_schedretcode =3D=3D VgSrc_ExitThread) {
=20
// We are the last surviving thread. Right?
vg_assert( VG_(count_living_threads)() =3D=3D 1 );
@@ -1943,8 +1944,8 @@
"VG_(terminate_NORETURN)(tid=3D%lld)\n", (ULong)tid)=
;
=20
switch (tids_schedretcode) {
- case /*VgSrc_ExitThread*/ VgSrc_ExitSyscall: /* the normal way out (=
Linux) */
- // case VgSrc_ExitProcess: /* the normal way out (AIX) */
+ case VgSrc_ExitThread: /* the normal way out (Linux) */
+ case VgSrc_ExitProcess: /* the normal way out (AIX) */
/* Change the application return code to user's return code,
if an error was found */
if (VG_(clo_error_exitcode) > 0=20
|