" ... so simulation results will be missing.");
return;
} else {
- fd = sres.val;
+ fd = sres.res;
}
// "desc:" lines (giving I1/D1/L2 cache configuration). The spaces after
VG_(details_copyright_author)(
"Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote et al.");
VG_(details_bug_reports_to) (VG_BUGS_TO);
- VG_(details_avg_translation_sizeB) ( 245 );
+ VG_(details_avg_translation_sizeB) ( 500 );
VG_(basic_tool_funcs) (cg_post_clo_init,
cg_instrument,
}
}
if (!res.isError)
- fd = (Int) res.val;
+ fd = (Int) res.res;
if (fd>=0) {
Char buf[512];
Int i;
* to not confuse it with our special value -2
*/
if (res.isError) fd = -1;
- else fd = (Int) res.val;
+ else fd = (Int) res.res;
return fd;
}
res = VG_(open)(current_command_file, VKI_O_RDONLY,0);
if (!res.isError) {
- fd = (Int) res.val;
+ fd = (Int) res.res;
bytesRead = VG_(read)(fd,cmdBuffer,500);
cmdBuffer[500] = 0; /* no command overrun please */
VG_(close)(fd);
file_err();
}
}
- fd = (Int) res.val;
+ fd = (Int) res.res;
CLG_DEBUG(2, " new_dumpfile '%s'\n", filename);
p++;
}
-
+
close_dumpfile(print_buf, print_fd, CLG_(current_tid));
if (array) VG_(free)(array);
print_bbccs(trigger, only_current_thread);
-
bbs_done = CLG_(stat).bb_executions++;
if (VG_(clo_verbosity) > 1)
file_err();
}
}
- if (!res.isError) VG_(close)( (Int)res.val );
+ if (!res.isError) VG_(close)( (Int)res.res );
init_cmdbuf();
( NULL == dir ? "" : dir ) );
fd = VG_(open)(filename, 0, VKI_S_IRUSR);
if ( !fd.isError ) {
- size = VG_(fsize)(fd.val);
+ size = VG_(fsize)(fd.res);
if (size > 0) {
f_clo = VG_(malloc)(size+1);
vg_assert(f_clo);
- n = VG_(read)(fd.val, f_clo, size);
+ n = VG_(read)(fd.res, f_clo, size);
if (n == -1) n = 0;
vg_assert(n >= 0 && n <= size+1);
f_clo[n] = '\0';
}
- VG_(close)(fd.val);
+ VG_(close)(fd.res);
}
return f_clo;
}
Char *coreext = "";
Int seq = 0;
Int core_fd;
- NSegment *seg;
+ NSegment const * seg;
ESZ(Ehdr) ehdr;
ESZ(Phdr) *phdrs;
Int num_phdrs;
VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC,
VKI_S_IRUSR|VKI_S_IWUSR);
if (!sres.isError) {
- core_fd = sres.val;
+ core_fd = sres.res;
break;
}
- if (sres.isError && sres.val != VKI_EEXIST)
+ if (sres.isError && sres.err != VKI_EEXIST)
return; /* can't create file */
}
8 * tc_sector_szQ );
/*NOTREACHED*/
}
- sec->tc = (ULong*)sres.val;
+ sec->tc = (ULong*)sres.res;
sres = VG_(am_mmap_anon_float_valgrind)
( N_TTES_PER_SECTOR * sizeof(TTEntry) );
N_TTES_PER_SECTOR * sizeof(TTEntry) );
/*NOTREACHED*/
}
- sec->tt = (TTEntry*)sres.val;
+ sec->tt = (TTEntry*)sres.res;
for (i = 0; i < N_TTES_PER_SECTOR; i++) {
sec->tt[i].status = Empty;
vg_assert(init_done);
vg_assert(vge->n_used >= 1 && vge->n_used <= 3);
- vg_assert(code_len > 0 && code_len < 20000);
+
+ /* 60000: should agree with N_TMPBUF in m_translate.c. */
+ vg_assert(code_len > 0 && code_len < 60000);
if (0)
VG_(printf)("add_to_transtab(entry = 0x%llx, len = %d)\n",
VG_(out_of_memory_NORETURN)("init_unredir_tt_tc", N_UNREDIR_TT * UNREDIR_SZB);
/*NOTREACHED*/
}
- unredir_tc = (ULong *)sres.val;
+ unredir_tc = (ULong *)sres.res;
}
unredir_tc_used = 0;
for (i = 0; i < N_UNREDIR_TT; i++)
/* Ensure the calculated value is not way crazy. */
vg_assert(tc_sector_szQ >= 2 * N_TTES_PER_SECTOR_USABLE);
- vg_assert(tc_sector_szQ <= 50 * N_TTES_PER_SECTOR_USABLE);
+ vg_assert(tc_sector_szQ <= 80 * N_TTES_PER_SECTOR_USABLE);
/* Initialise the sectors */
youngest_sector = 0;
file_err( hp_file );
return;
} else {
- fd = sres.val;
+ fd = sres.res;
}
// File header, including command line
file_err( text_file );
return;
} else {
- fd = sres.val;
+ fd = sres.res;
}
// Header