@@ -113,7 +113,7 @@ void CLR_RT_GarbageCollector::ValidateCluster(CLR_RT_HeapCluster *hc)
113113#ifdef _WIN64
114114 CLR_Debug::Printf (" Block exceeds cluster boundary: 0x%016" PRIxPTR " \r\n " , (uintptr_t )ptr);
115115#else
116- CLR_Debug::Printf (" Block exceeds cluster boundary: %08x \r\n " , ptr);
116+ CLR_Debug::Printf (" Block exceeds cluster boundary: 0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) ptr)
117117#endif
118118
119119 NANOCLR_DEBUG_STOP ();
@@ -135,7 +135,9 @@ void CLR_RT_GarbageCollector::ValidateCluster(CLR_RT_HeapCluster *hc)
135135 " Overlapping blocks detected. Next block of 0x%016" PRIxPTR " is overlapping it.\r\n " ,
136136 (uintptr_t )ptr);
137137#else
138- CLR_Debug::Printf (" Overlapping blocks detected: Next block of %08x is overlapping it.\r\n " , ptr);
138+ CLR_Debug::Printf (
139+ " Overlapping blocks detected: Next block of 0x%08" PRIxPTR " is overlapping it.\r\n " ,
140+ (uintptr_t )ptr);
139141#endif
140142 }
141143 }
@@ -157,8 +159,8 @@ void CLR_RT_GarbageCollector::ValidateCluster(CLR_RT_HeapCluster *hc)
157159 (uintptr_t )ptr);
158160#else
159161 CLR_Debug::Printf (
160- " Overlapping blocks detected: Previous block of %08x is overlapping it.\r\n " ,
161- ptr);
162+ " Overlapping blocks detected: Previous block of 0x%08 " PRIxPTR " is overlapping it.\r\n " ,
163+ ( uintptr_t ) ptr);
162164#endif
163165 }
164166 }
@@ -207,7 +209,11 @@ void CLR_RT_GarbageCollector::ValidateBlockNotInFreeList(CLR_RT_DblLinkedList &l
207209 (uintptr_t )ptr,
208210 (uintptr_t )ptrEnd);
209211#else
210- CLR_Debug::Printf (" Pointer into free list!! %08x %08x %08x\r\n " , dst, ptr, ptrEnd);
212+ CLR_Debug::Printf (
213+ " Pointer into free list!! 0x%08" PRIxPTR " 0x%08" PRIxPTR " 0x%08" PRIxPTR " \r\n " ,
214+ (uintptr_t )dst,
215+ (uintptr_t )ptr,
216+ (uintptr_t )ptrEnd);
211217#endif
212218
213219 NANOCLR_DEBUG_STOP ();
@@ -299,7 +305,7 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateOld_Worker(void **ref)
299305#ifdef _WIN64
300306 CLR_Debug::Printf (" Duplicate base OLD: 0x%016" PRIxPTR " \r\n " , (uintptr_t )ref);
301307#else
302- CLR_Debug::Printf (" Duplicate base OLD: %08x \r\n " , ref);
308+ CLR_Debug::Printf (" Duplicate base OLD: 0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) ref);
303309#endif
304310 // need to free the memory allocated for the record
305311 platform_free (ptr);
@@ -314,7 +320,7 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateOld_Worker(void **ref)
314320#ifdef _WIN64
315321 CLR_Debug::Printf (" Some data points into a free list: 0x%016" PRIxPTR " \r\n " , (uintptr_t )dst);
316322#else
317- CLR_Debug::Printf (" Some data points into a free list: %08x \r\n " , dst);
323+ CLR_Debug::Printf (" Some data points into a free list: 0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) dst);
318324#endif
319325
320326 // need to free the memory allocated for the record
@@ -382,7 +388,7 @@ void CLR_RT_GarbageCollector::TestPointers_Remap()
382388#ifdef _WIN64
383389 CLR_Debug::Printf (" Duplicate base NEW: 0x%016" PRIxPTR " \r\n " , (uintptr_t )ref);
384390#else
385- CLR_Debug::Printf (" Duplicate base NEW: %08x \r\n " , ref);
391+ CLR_Debug::Printf (" Duplicate base NEW: 0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) ref);
386392#endif
387393 NANOCLR_DEBUG_STOP ();
388394 }
@@ -417,7 +423,10 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateNew_Worker(void **ref)
417423 (uintptr_t )ptr->newPtr ,
418424 (uintptr_t )dst);
419425#else
420- CLR_Debug::Printf (" Bad pointer: %08x %08x\r\n " , ptr->newPtr , dst);
426+ CLR_Debug::Printf (
427+ " Bad pointer: 0x%08" PRIxPTR " 0x%08" PRIxPTR " \r\n " ,
428+ (uintptr_t )ptr->newPtr ,
429+ (uintptr_t )dst);
421430#endif
422431 NANOCLR_DEBUG_STOP ();
423432 }
@@ -429,7 +438,10 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateNew_Worker(void **ref)
429438 (uintptr_t )ptr->data ,
430439 (uintptr_t )*dst);
431440#else
432- CLR_Debug::Printf (" Bad data: %08x %08x\r\n " , ptr->data , *dst);
441+ CLR_Debug::Printf (
442+ " Bad data: 0x%08" PRIxPTR " 0x%08" PRIxPTR " \r\n " ,
443+ (uintptr_t )ptr->data ,
444+ (uintptr_t )*dst);
433445#endif
434446
435447 NANOCLR_DEBUG_STOP ();
@@ -440,7 +452,7 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateNew_Worker(void **ref)
440452#ifdef _WIN64
441453 CLR_Debug::Printf (" Some data points into a free list: 0x%016" PRIxPTR " \r\n " , (uintptr_t )dst);
442454#else
443- CLR_Debug::Printf (" Some data points into a free list: %08x \r\n " , dst);
455+ CLR_Debug::Printf (" Some data points into a free list: 0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) dst);
444456#endif
445457
446458 NANOCLR_DEBUG_STOP ();
@@ -453,7 +465,7 @@ bool CLR_RT_GarbageCollector::TestPointers_PopulateNew_Worker(void **ref)
453465#ifdef _WIN64
454466 CLR_Debug::Printf (" Bad base: 0x%016" PRIxPTR " \r\n " , (uintptr_t )ref);
455467#else
456- CLR_Debug::Printf (" Bad base: 0x%08x \r\n " , ref);
468+ CLR_Debug::Printf (" Bad base: 0x0x%08 " PRIxPTR " \r\n " , ( uintptr_t ) ref);
457469#endif
458470
459471 NANOCLR_DEBUG_STOP ();
0 commit comments