From: Julian Seward Date: Wed, 4 Jan 2023 16:12:21 +0000 (+0100) Subject: Fix 64-bit uncleanness in VG_(get_bbs_translated)/VG_(get_bbs_discarded_or_dumped) .. X-Git-Tag: VALGRIND_3_21_0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b8d0cbc813e936e96e76390873fbe9bc2fc4d83;p=thirdparty%2Fvalgrind.git Fix 64-bit uncleanness in VG_(get_bbs_translated)/VG_(get_bbs_discarded_or_dumped) .. .. and some debug printing associated with them. I don't think this affects anything apart from debug printing. Noticed when running a x86 (32-bit) Firefox build. --- diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c index 60d5a05c86..8ae06d2a67 100644 --- a/coregrind/m_translate.c +++ b/coregrind/m_translate.c @@ -1597,7 +1597,7 @@ Bool VG_(translate) ( ThreadId tid, Bool ok = VG_(get_fnname_w_offset)(ep, addr, &fnname); if (!ok) fnname = "UNKNOWN_FUNCTION"; VG_(printf)( - "==== SB %u (evchecks %llu) [tid %u] 0x%lx %s %s%c0x%lx\n", + "==== SB %llu (evchecks %llu) [tid %u] 0x%lx %s %s%c0x%lx\n", VG_(get_bbs_translated)(), bbs_done, tid, addr, fnname, objname, objoff >= 0 ? '+' : '-', (UWord)(objoff >= 0 ? objoff : -objoff) diff --git a/coregrind/m_transtab.c b/coregrind/m_transtab.c index 09a3da02ba..384461289d 100644 --- a/coregrind/m_transtab.c +++ b/coregrind/m_transtab.c @@ -2664,12 +2664,12 @@ static Double safe_idiv( ULong a, ULong b ) return (b == 0 ? 0 : (Double)a / (Double)b); } -UInt VG_(get_bbs_translated) ( void ) +ULong VG_(get_bbs_translated) ( void ) { return n_in_count; } -UInt VG_(get_bbs_discarded_or_dumped) ( void ) +ULong VG_(get_bbs_discarded_or_dumped) ( void ) { return n_disc_count + n_dump_count; } diff --git a/coregrind/pub_core_transtab.h b/coregrind/pub_core_transtab.h index 1470b7afbe..6cc11f6580 100644 --- a/coregrind/pub_core_transtab.h +++ b/coregrind/pub_core_transtab.h @@ -200,8 +200,8 @@ extern void VG_(discard_translations) ( Addr start, ULong range, extern void VG_(print_tt_tc_stats) ( void ); -extern UInt VG_(get_bbs_translated) ( void ); -extern UInt VG_(get_bbs_discarded_or_dumped) ( void ); +extern ULong VG_(get_bbs_translated) ( void ); +extern ULong VG_(get_bbs_discarded_or_dumped) ( void ); /* Add to / search the auxiliary, small, unredirected translation table. */