Follow up to "Introduce RegWord type" change.
Part of the changes required for BZ issue - #345763.
Contributed by:
Tamara Vlahovic and Dimitrije Nikolic.
void* VG_(am_shadow_alloc)(SizeT size)
{
SysRes sres = VG_(am_mmap_anon_float_valgrind)( size );
- return sr_isError(sres) ? NULL : (void*)sr_Res(sres);
+ return sr_isError(sres) ? NULL : (void*)(Addr)sr_Res(sres);
}
/* Map a file at an unconstrained address for V, and update the
goto out;
}
- void* pdbimage = (void*)sr_Res(sres);
+ void* pdbimage = (void*)(Addr)sr_Res(sres);
r = VG_(read)( fd_pdbimage, pdbimage, (Int)n_pdbimage );
if (r < 0 || r != (Int)n_pdbimage) {
VG_(am_munmap_valgrind)( (Addr)pdbimage, n_pdbimage );
static HChar buf[7+1+2+16+1+1]; // large enough
if (sr_isError(sr))
- VG_(sprintf)(buf, "Failure(0x%lx)", sr_Err(sr));
+ VG_(sprintf)(buf, "Failure(0x%" FMT_REGWORD "x)", (RegWord)sr_Err(sr));
else
- VG_(sprintf)(buf, "Success(0x%lx)", sr_Res(sr));
+ VG_(sprintf)(buf, "Success(0x%" FMT_REGWORD "x)", (RegWord)sr_Res(sr));
return buf;
}
VG_(do_atfork_parent)(tid);
if (VG_(clo_trace_syscalls))
- VG_(printf)(" clone(fork): process %d created child %lu\n",
- VG_(getpid)(), sr_Res(res));
+ VG_(printf)(" clone(fork): process %d created child %" FMT_REGWORD "u\n",
+ VG_(getpid)(), (RegWord)sr_Res(res));
/* restore signal mask */
VG_(sigprocmask)(VKI_SIG_SETMASK, &fork_saved_mask, NULL);
if (VG_(clo_trace_signals))
VG_(message)( Vg_DebugMsg,
"interrupted_syscall: tid=%u, ip=%#lx, "
- "restart=%s, sres.isErr=%s, sres.val=%lu\n",
+ "restart=%s, sres.isErr=%s, sres.val=%" FMT_REGWORD "u\n",
tid,
ip,
restart ? "True" : "False",
sr_isError(sres) ? "True" : "False",
- sr_isError(sres) ? sr_Err(sres) : sr_Res(sres));
+ sr_isError(sres) ? (RegWord)sr_Err(sres) :
+ (RegWord)sr_Res(sres));
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(tid >= 1 && tid < VG_N_THREADS);