Dumping address pointer for 32bit system needs adjusting for current implementation
while it assumes %p argument is 64bit. This patch changes (ULONG64) casting to SOS_PTR()
so that it will be safe for both 64 and 32bit.
This will fix DumpStack and EEStack segmentation fault problem.
Related issue: #4672
{
bOutput = TRUE;
if (!bSymbolOnly)
- DMLOut("%p %s ", (ULONG64)vEBP, DMLIP(IP));
+ DMLOut("%p %s ", SOS_PTR(vEBP), DMLIP(IP));
DMLOut("(MethodDesc %s ", DMLMethodDesc(methodDesc));
// TODO: Microsoft, more checks to make sure method is not eeimpl, etc. Add this field to MethodDesc
bOutput = TRUE;
const char *name;
if (!bSymbolOnly)
- DMLOut("%p %s ", (ULONG64)vEBP, DMLIP(IP));
+ DMLOut("%p %s ", SOS_PTR(vEBP), DMLIP(IP));
// if AMD64 ever becomes a cross platform target this must be resolved through
// virtual dispatch rather than conditional compilation
ExtOut(" ====> Exception ");
if (exrAddr)
ExtOut("Code %x ", exr.ExceptionCode);
- ExtOut ("cxr@%p", (ULONG64)cxrAddr);
+ ExtOut ("cxr@%p", SOS_PTR(cxrAddr));
if (exrAddr)
- ExtOut(" exr@%p", (ULONG64)exrAddr);
+ ExtOut(" exr@%p", SOS_PTR(exrAddr));
ExtOut("\n");
}
}
if (MethodDescData.Request(g_sos, TO_CDADDR(methodDesc)) == S_OK)
{
NameForMD_s(methodDesc, g_mdName,mdNameLen);
- ExtOut(" (%S, mdToken: %p)", g_mdName, (UINT64)MethodDescData.MDToken);
+ ExtOut(" (%S, mdToken: %p)", g_mdName, SOS_PTR(MethodDescData.MDToken));
return;
}
}
if (MethodDescData.Request(g_sos, md) == S_OK)
{
NameForMD_s(md, g_mdName,mdNameLen);
- ExtOut(" (%S, mdToken: %p)", g_mdName, (UINT64)MethodDescData.MDToken);
+ ExtOut(" (%S, mdToken: %p)", g_mdName, SOS_PTR(MethodDescData.MDToken));
return;
}
}
if (FAILED(g_ExtData->ReadVirtual(ProcessPeb+Offset_Ldr, &peb.Ldr,
sizeof(peb.Ldr), NULL)))
{
- ExtOut ( " Unable to read PEB_LDR_DATA address at %p\n", (ULONG64)(ProcessPeb+Offset_Ldr));
+ ExtOut ( " Unable to read PEB_LDR_DATA address at %p\n", SOS_PTR(ProcessPeb+Offset_Ldr));
return;
}
sizeof(Ldr.InMemoryOrderModuleList),
NULL)))
{
- ExtOut ( " Unable to read InMemoryOrderModuleList address at %p\n", OrderModuleListStart);
+ ExtOut ( " Unable to read InMemoryOrderModuleList address at %p\n", SOS_PTR(OrderModuleListStart));
return;
}
Next = (ULONG64)Ldr.InMemoryOrderModuleList.Flink;
{
#if 0
ExtOut ( " Unable to read FullDllName.Buffer address at %p\n",
- (ULONG64)FullDllName.Buffer);
+ SOS_PTR(FullDllName.Buffer));
#endif
ZeroMemory( dllName, MAX_LONGPATH * sizeof (WCHAR) );
}
if (IsInterrupt())
return;
ExtOut("generation %d starts at 0x%p\n",
- n, (ULONG64)heap.generation_table[n].allocation_start);
+ n, SOS_PTR(heap.generation_table[n].allocation_start));
}
// We also need to look at the gen0 alloc context.
if (heap.generation_table[0].allocContextPtr)
{
ExtOut("(0x%p, 0x%p)\n",
- (ULONG64) heap.generation_table[0].allocContextPtr,
- (ULONG64) (heap.generation_table[0].allocContextLimit + Align(min_obj_size)));
+ SOS_PTR(heap.generation_table[0].allocContextPtr),
+ SOS_PTR(heap.generation_table[0].allocContextLimit + Align(min_obj_size)));
}
else
{
return;
if (segment.Request(g_sos, dwAddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)dwAddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddrSeg));
return;
}
- ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", (ULONG64)dwAddrSeg,
- (ULONG64)segment.mem, (ULONG64)segment.allocated,
+ ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", SOS_PTR(dwAddrSeg),
+ SOS_PTR(segment.mem), SOS_PTR(segment.allocated),
(ULONG_PTR)(segment.allocated - segment.mem),
(ULONG_PTR)(segment.allocated - segment.mem));
total_size += (DWORD_PTR) (segment.allocated - segment.mem);
if (segment.Request(g_sos, dwAddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n",(ULONG64)dwAddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddrSeg));
return;
}
DWORD_PTR end = (DWORD_PTR)heap.alloc_allocated;
- ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", (ULONG64)dwAddrSeg,
- (ULONG64)segment.mem, (ULONG64)end,
+ ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", SOS_PTR(dwAddrSeg),
+ SOS_PTR(segment.mem), SOS_PTR(end),
(ULONG_PTR)(end - (DWORD_PTR)segment.mem),
(ULONG_PTR)(end - (DWORD_PTR)segment.mem));
return;
if (segment.Request(g_sos, dwAddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)dwAddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddrSeg));
return;
}
- ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", (ULONG64)dwAddrSeg,
- (ULONG64)segment.mem, (ULONG64)segment.allocated,
+ ExtOut("%p %p %p 0x%" POINTERSIZE_TYPE "x(%" POINTERSIZE_TYPE "d)\n", SOS_PTR(dwAddrSeg),
+ SOS_PTR(segment.mem), SOS_PTR(segment.allocated),
(ULONG_PTR)(segment.allocated - segment.mem),
segment.allocated - segment.mem);
total_size += (DWORD_PTR) (segment.allocated - segment.mem);
ExtOut("%" POINTERSIZE "s %" POINTERSIZE "s %" POINTERSIZE "s %" POINTERSIZE "s\n", "segment", "begin", "allocated", "size");
GCPrintSegmentInfo(heap, total_size);
ExtOut("Large object heap starts at 0x%p\n",
- (ULONG64)heap.generation_table[GetMaxGeneration()+1].allocation_start);
+ SOS_PTR(heap.generation_table[GetMaxGeneration()+1].allocation_start));
ExtOut("%" POINTERSIZE "s %" POINTERSIZE "s %" POINTERSIZE "s %" POINTERSIZE "s\n", "segment", "begin", "allocated", "size");
GCPrintLargeHeapSegmentInfo(heap,total_size);
}
return FALSE;
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)taddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj < TO_TADDR(dacpSeg.allocated))
// the ephemeral segment
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)taddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
return FALSE;
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n",(ULONG64)taddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj && taddrObj < TO_TADDR(dacpSeg.allocated))
if (taddrObj == (TADDR)pAllocInfo->array[i].alloc_ptr)
{
ExtDbgOut("Skipping allocation context: [%#p-%#p)\n",
- (ULONG64)pAllocInfo->array[i].alloc_ptr, (ULONG64)pAllocInfo->array[i].alloc_limit);
+ SOS_PTR(pAllocInfo->array[i].alloc_ptr), SOS_PTR(pAllocInfo->array[i].alloc_limit));
taddrObj =
(TADDR)pAllocInfo->array[i].alloc_limit + Align(min_obj_size);
break;
BOOL bMTOk = GetSizeEfficient(taddrObj, taddrMT, bLarge, objSize, bContainsPointers);
if (!bMTOk)
{
- ExtErr("bad object: %#p - bad MT %#p\n", (ULONG64) taddrObj, (ULONG64) taddrMT);
+ ExtErr("bad object: %#p - bad MT %#p\n", SOS_PTR(taddrObj), SOS_PTR(taddrMT));
// set objSize to size_t to look for the next valid MT
objSize = sizeof(TADDR);
continue;
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtErr("Error requesting heap segment %p\n", (ULONG64)taddrSeg);
+ ExtErr("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
GCGenUsageStats((TADDR)dacpSeg.mem, (TADDR)dacpSeg.allocated, liveObjs, heap, FALSE, &allocInfo, &hpUsage->genUsage[2]);
// 1b. now handle the ephemeral segment
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtErr("Error requesting heap segment %p\n", (ULONG64)taddrSeg);
+ ExtErr("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (dacpSeg.Request(g_sos, taddrSeg, heap) != S_OK)
{
- ExtErr("Error requesting heap segment %p\n",(ULONG64)taddrSeg);
+ ExtErr("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
(SegQueueLimit(heapDetails,gen_segment(m)) - SegQueue(heapDetails,gen_segment(m))) / sizeof(size_t));
ExtOut ("(%p->%p)\n",
- (ULONG64) SegQueue(heapDetails,gen_segment(m)),
- (ULONG64) SegQueueLimit(heapDetails,gen_segment(m)));
+ SOS_PTR(SegQueue(heapDetails,gen_segment(m))),
+ SOS_PTR(SegQueueLimit(heapDetails,gen_segment(m))));
}
}
#ifndef FEATURE_PAL
{
ExtOut ("Ready for finalization %d objects ",
(SegQueueLimit(heapDetails,FinalizerListSeg)-SegQueue(heapDetails,CriticalFinalizerListSeg)) / sizeof(size_t));
- ExtOut ("(%p->%p)\n",
- (ULONG64) SegQueue(heapDetails,CriticalFinalizerListSeg),
- (ULONG64) SegQueueLimit(heapDetails,FinalizerListSeg));
+ ExtOut ("(%p->%p)\n",
+ SOS_PTR(SegQueue(heapDetails,CriticalFinalizerListSeg)),
+ SOS_PTR(SegQueueLimit(heapDetails,FinalizerListSeg)));
}
// if bAllReady we only count objects that are ready for finalization,
if (segment.Request(g_sos, dwAddr, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)dwAddr);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddr));
return FALSE;
}
if (dwAddrCurrObj > (DWORD_PTR)end_of_segment)
{
ExtOut ("curr_object: %p > heap_segment_allocated (seg: %p)\n",
- (ULONG64)dwAddrCurrObj, (ULONG64)dwAddrSeg);
+ SOS_PTR(dwAddrCurrObj), SOS_PTR(dwAddrSeg));
if (dwAddrPrevObj) {
- ExtOut ("Last good object: %p\n", (ULONG64)dwAddrPrevObj);
+ ExtOut ("Last good object: %p\n", SOS_PTR(dwAddrPrevObj));
}
return FALSE;
}
dwAddr = dwAddrSeg;
if (segment.Request(g_sos, dwAddr, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)dwAddr);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddr));
return FALSE;
}
dwAddrCurrObj = (DWORD_PTR)segment.mem;
{
// prev_object length is too long
ExtOut("curr_object: %p > end_youngest: %p\n",
- (ULONG64)dwAddrCurrObj, (ULONG64)end_youngest);
+ SOS_PTR(dwAddrCurrObj), SOS_PTR(end_youngest));
if (dwAddrPrevObj) {
DMLOut("Last good object: %s\n", DMLObject(dwAddrPrevObj));
}
if (segment.Request(g_sos, dwAddr, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n",(ULONG64)dwAddr);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddr));
return FALSE;
}
if (dwAddrCurrObj > (DWORD_PTR)end_of_segment)
{
ExtOut("curr_object: %p > heap_segment_allocated (seg: %p)\n",
- (ULONG64)dwAddrCurrObj, (ULONG64)dwAddrSeg);
+ SOS_PTR(dwAddrCurrObj), SOS_PTR(dwAddrSeg));
if (dwAddrPrevObj) {
- ExtOut("Last good object: %p\n", (ULONG64)dwAddrPrevObj);
+ ExtOut("Last good object: %p\n", SOS_PTR(dwAddrPrevObj));
}
return FALSE;
}
dwAddr = dwAddrSeg;
if (segment.Request(g_sos, dwAddr, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)dwAddr);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(dwAddr));
return FALSE;
}
dwAddrCurrObj = (DWORD_PTR)segment.mem;
// See code:ClrDataAccess::RequestGCHeapSegment for details.
if (segment.Request(g_sos, AddrSeg, details) != S_OK)
{
- ExtOut("Error requesting heap segment %p\n", (ULONG64)AddrSeg);
+ ExtOut("Error requesting heap segment %p\n", SOS_PTR(AddrSeg));
return FALSE;
}
if (n++ > nMaxHeapSegmentCount) // that would be insane
DacpGcHeapDetails *pDetails = GetHeap(objectPointer);
if (pDetails == NULL)
{
- ExtOut("Object %p has no generation\n", (ULONG64)objectPointer);
+ ExtOut("Object %p has no generation\n", SOS_PTR(objectPointer));
return 0;
}
}
g_trav_totalSize += curSize;
- ExtOut("%p(%x:%x) ", (ULONG64)blockData, blockSize, curSize);
+ ExtOut("%p(%x:%x) ", SOS_PTR(blockData), blockSize, curSize);
}
/**********************************************************************\
else if (codeHeapInfo[iHeaps].codeHeapType == CODEHEAP_HOST)
{
ExtOut("HostCodeHeap: ");
- ExtOut("%p ", (ULONG64)codeHeapInfo[iHeaps].HostData.baseAddr);
+ ExtOut("%p ", SOS_PTR(codeHeapInfo[iHeaps].HostData.baseAddr));
DWORD dwSize = (DWORD)(codeHeapInfo[iHeaps].HostData.currentAddr - codeHeapInfo[iHeaps].HostData.baseAddr);
PrintHeapSize(dwSize, 0);
totalSize += dwSize;
DacpModuleData dmd;
if (dmd.Request(g_sos, addr) != S_OK)
{
- ExtOut("Unable to read module %p\n", (ULONG64)addr);
+ ExtOut("Unable to read module %p\n", SOS_PTR(addr));
}
else
{
{
if (Iter->Root == innerIter->Root)
{
- ExtOut ("Root %p promoted multiple times in gc %d\n",
- (ULONG64) Iter->Root,
+ ExtOut ("Root %p promoted multiple times in gc %d\n",
+ SOS_PTR(Iter->Root),
GCCount);
bErrorFound = TRUE;
}
{
if (Iter->Root == innerIter->Root)
{
- ExtOut ("Root %p relocated multiple times in gc %d\n",
- (ULONG64) Iter->Root,
+ ExtOut ("Root %p relocated multiple times in gc %d\n",
+ SOS_PTR(Iter->Root),
GCCount);
bErrorFound = TRUE;
}
bBoringPeople = false;
ExtOut ("%8d %p %p %9s ", GCCount,
- (ULONG64) pRelocRec->NewValue,
- (ULONG64) pRelocRec->methodTable,
+ SOS_PTR(pRelocRec->NewValue),
+ SOS_PTR(pRelocRec->methodTable),
pPromoteRec ? "yes" : "no");
if (pPromoteRec != NULL)
{
if (pPtr->Value == curAddress)
{
bBoringPeople = false;
- ExtOut ("%8d %p ", GCCount, (ULONG64) curAddress);
- ExtOut ("Promotion for root %p (MT = %p)\n",
- (ULONG64) pPtr->Root,
- (ULONG64) pPtr->methodTable);
+ ExtOut ("%8d %p ", GCCount, SOS_PTR(curAddress));
+ ExtOut ("Promotion for root %p (MT = %p)\n",
+ SOS_PTR(pPtr->Root),
+ SOS_PTR(pPtr->methodTable));
}
pPtr = pPtr->next;
}
{
if (pReloc->NewValue == curAddress ||
pReloc->PrevValue == curAddress)
- {
+ {
bBoringPeople = false;
- ExtOut ("%8d %p ", GCCount, (ULONG64) curAddress);
- ExtOut ("Relocation %s for root %p\n",
+ ExtOut ("%8d %p ", GCCount, SOS_PTR(curAddress));
+ ExtOut ("Relocation %s for root %p\n",
(pReloc->NewValue == curAddress) ? "NEWVALUE" : "PREVVALUE",
- (ULONG64) pReloc->Root);
+ SOS_PTR(pReloc->Root));
}
pReloc = pReloc->next;
}
UINT GCCount = (UINT) g_records[i].GCCount;
- ExtOut ("%8d %p ", GCCount, (ULONG64) curAddress);
+ ExtOut ("%8d %p ", GCCount, SOS_PTR(curAddress));
RelocRecord *pReloc = g_records[i].RelocList;
size_t candidateCurAddress = curAddress;
{
if (pReloc->NewValue == curAddress)
{
- ExtOut ("%p, ", (ULONG64) pReloc->Root);
+ ExtOut ("%p, ", SOS_PTR(pReloc->Root));
if (bFirstReloc)
{
candidateCurAddress = pReloc->PrevValue;
if (stackRef.SourceType == SOS_StackSourceIP)
{
WString methodName = MethodNameFromIP(stackRef.Source);
- ExtOut(" %p %p %S\n", stackRef.StackPointer, stackRef.Source, methodName.c_str());
+ ExtOut(" %p %p %S\n", SOS_PTR(stackRef.StackPointer), SOS_PTR(stackRef.Source), methodName.c_str());
}
else
{
WString frameName = GetFrameFromAddress(TO_TADDR(stackRef.Source));
- ExtOut(" %p %S\n", stackRef.Source, frameName.c_str());
+ ExtOut(" %p %S\n", SOS_PTR(stackRef.Source), frameName.c_str());
}
}
return 0;
}
- ExtDbgOut("internal_root_array = %#p\n", analyzeData.internal_root_array);
- ExtDbgOut("internal_root_array_index = %#p\n", analyzeData.internal_root_array_index);
+ ExtDbgOut("internal_root_array = %#p\n", SOS_PTR(analyzeData.internal_root_array));
+ ExtDbgOut("internal_root_array_index = %#p\n", SOS_PTR(analyzeData.internal_root_array_index));
TADDR start = TO_TADDR(analyzeData.internal_root_array);
TADDR stop = TO_TADDR(analyzeData.internal_root_array + sizeof(TADDR) * (size_t)analyzeData.internal_root_array_index);
continue;
}
- ExtDbgOut("internal_root_array = %#p\n", analyzeData.internal_root_array);
- ExtDbgOut("internal_root_array_index = %#p\n", analyzeData.internal_root_array_index);
+ ExtDbgOut("internal_root_array = %#p\n", SOS_PTR(analyzeData.internal_root_array));
+ ExtDbgOut("internal_root_array_index = %#p\n", SOS_PTR(analyzeData.internal_root_array_index));
TADDR start = TO_TADDR(analyzeData.internal_root_array);
TADDR stop = TO_TADDR(analyzeData.internal_root_array + sizeof(TADDR) * (size_t)analyzeData.internal_root_array_index);
// Request the inital segment.
if (seg.Request(g_sos, dwAddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p.\n", (ULONG64)dwAddrSeg);
+ ExtOut("Error requesting heap segment %p.\n", SOS_PTR(dwAddrSeg));
return FALSE;
}
if (seg.Request(g_sos, dwAddrSeg, heap) != S_OK)
{
- ExtOut("Error requesting heap segment %p.\n", (ULONG64)dwAddrSeg);
+ ExtOut("Error requesting heap segment %p.\n", SOS_PTR(dwAddrSeg));
return FALSE;
}
}
(GetSizeEfficient(dwAddr1, dwAddrMethTable, FALSE, s, bPointers) == FALSE))
{
BuildError(reason, count, "object %s: bad member %p at %p", DMLObject(objAddr),
- (size_t)dwAddr1, (size_t)(objAddr+(size_t)parm-objAddr));
+ SOS_PTR(dwAddr1), SOS_PTR(objAddr+(size_t)parm-objAddr));
return false;
}
if (IsMTForFreeObj(dwAddrMethTable))
{
sos::Throw<HeapCorruption>("object %s contains free object %p at %p", DMLObject(objAddr),
- (ULONG64)dwAddr1, (ULONG64)(objAddr+(size_t)parm-objAddr));
+ SOS_PTR(dwAddr1), SOS_PTR(objAddr+(size_t)parm-objAddr));
}
// verify card table
{
BuildError(reason, count, "Object %s: %s missing card_table entry for %p",
DMLObject(objAddr), (dwChild == dwAddr1)? "" : " maybe",
- (size_t)(objAddr+(size_t)parm-objAddr));
+ SOS_PTR(objAddr+(size_t)parm-objAddr));
return false;
}
if (FAILED(GetMTOfObject(dwAddr1, &dwAddrMethTable)) ||
(GetSizeEfficient(dwAddr1, dwAddrMethTable, FALSE, s, bPointers) == FALSE))
{
- BuildError(reason, count, "Object %s: Bad member %p at %p.\n", DMLObject(objAddr),
- (size_t)dwAddr1, (size_t)(objAddr+(size_t)parm-objAddr));
+ BuildError(reason, count, "Object %s: Bad member %p at %p.\n", DMLObject(objAddr),
+ SOS_PTR(dwAddr1), SOS_PTR(objAddr+(size_t)parm-objAddr));
return false;
}
if (IsMTForFreeObj(dwAddrMethTable))
{
BuildError(reason, count, "Object %s contains free object %p at %p.", DMLObject(objAddr),
- (size_t)dwAddr1, (size_t)(objAddr+(size_t)parm-objAddr));
+ SOS_PTR(dwAddr1), SOS_PTR(objAddr+(size_t)parm-objAddr));
return false;
}
{
BuildError(reason, count, "Object %s:%s missing card_table entry for %p",
DMLObject(objAddr), (dwChild == dwAddr1) ? "" : " maybe",
- (size_t)(objAddr+(size_t)parm-objAddr));
+ SOS_PTR(objAddr+(size_t)parm-objAddr));
return false;
}
return Status;
}
- ExtOut("ilAddr = %p\n", (ULONG64) ilAddr);
+ ExtOut("ilAddr = %p\n", SOS_PTR(ilAddr));
// Read the memory into a local buffer
ArrayHolder<BYTE> pArray = new BYTE[Size];
case mdtSignature:
case mdtTypeRef:
{
- printf ("%x (%p)", token, (ULONG64) GetObj(tokenArray, RidFromToken(token)));
+ printf ("%x (%p)", token, SOS_PTR(GetObj(tokenArray, RidFromToken(token))));
}
break;
case mdtFieldDef:
{
- printf ("%x (%p)", token, (ULONG64) GetObj(tokenArray, RidFromToken(token)));
+ printf ("%x (%p)", token, SOS_PTR(GetObj(tokenArray, RidFromToken(token))));
}
break;
case mdtMemberRef:
{
- printf ("%x (%p)", token, (ULONG64) GetObj(tokenArray, RidFromToken(token)));
+ printf ("%x (%p)", token, SOS_PTR(GetObj(tokenArray, RidFromToken(token))));
}
break;
case mdtString:
DacpMethodDescData MethodDescData;
if (MethodDescData.Request(g_sos, TO_CDADDR(dwStartAddr)) != S_OK)
{
- ExtOut("%p is not a MethodDesc\n", (ULONG64)dwStartAddr);
+ ExtOut("%p is not a MethodDesc\n", SOS_PTR(dwStartAddr));
return Status;
}
dwDynamicMethodObj = TO_TADDR(MethodDescData.managedDynamicMethodObject);
if (dwDynamicMethodObj == NULL)
{
- ExtOut("Unable to print IL for DynamicMethodDesc %p\n", (ULONG64) dwDynamicMethodObj);
+ ExtOut("Unable to print IL for DynamicMethodDesc %p\n", SOS_PTR(dwDynamicMethodObj));
return Status;
}
}
return S_FALSE;
}
- ExtOut("PermissionSet object: %p\n", (ULONG64)p_PermSet);
+ ExtOut("PermissionSet object: %p\n", SOS_PTR(p_PermSet));
// Print basic info
if (Status != S_OK)
{
- ExtOut("Error retrieving nested exception info %p\n", (ULONG64)currentNested);
+ ExtOut("Error retrieving nested exception info %p\n", SOS_PTR(currentNested));
return Status;
}
return Status;
}
ExtOut("------------------------------\n");
- ExtOut("Heap %d (%p)\n", n, (ULONG64)heapAddrs[n]);
+ ExtOut("Heap %d (%p)\n", n, SOS_PTR(heapAddrs[n]));
DWORD_PTR heapSize = 0;
GCHeapInfo (heapDetails, heapSize);
totalSize += heapSize;
{
DMLOut("%s %s %8d", DMLObject(itr->GetAddress()), DMLDumpHeapMT(itr->GetMT()), itr->GetSize());
ExtOut(" ThinLock owner %x (%p) Recursive %x\n", lockInfo.ThreadId,
- (ULONG64)lockInfo.ThreadPtr, lockInfo.Recursion);
+ SOS_PTR(lockInfo.ThreadPtr), lockInfo.Recursion);
count++;
}
if (FAILED(GetMTOfObject(taddrObj, &taddrMT)) ||
!GetSizeEfficient(taddrObj, taddrMT, FALSE, objSize, bContainsPointers))
{
- ExtOut("object %#p does not have valid method table\n", (ULONG64)taddrObj);
+ ExtOut("object %#p does not have valid method table\n", SOS_PTR(taddrObj));
goto Exit;
}
Exit:
if (bValid)
{
- ExtOut("object %#p is a valid object\n", (ULONG64) taddrObj);
+ ExtOut("object %#p is a valid object\n", SOS_PTR(taddrObj));
}
return Status;
DacpGcHeapDetails *heap = g_snapshot.GetHeap(taddrArg);
if (heap == NULL)
{
- ExtOut("Address %p does not lie in the managed heap\n", (ULONG64) taddrObj);
+ ExtOut("Address %p does not lie in the managed heap\n", SOS_PTR(taddrObj));
return Status;
}
if (!GCObjInHeap(taddrObj, *heap, trngSeg, gen, allocCtx, bLarge))
{
ExtOut("Failed to find the segment of the managed heap where the object %p resides\n",
- (ULONG64) taddrObj);
+ SOS_PTR(taddrObj));
return Status;
}
if (bCur)
LNODisplayOutput(W("Before: "), curMT, taddrCur, curSize);
else
- ExtOut("Before: couldn't find any object between %#p and %#p\n",
- (ULONG64)trngSeg.start, (ULONG64)taddrArg);
+ ExtOut("Before: couldn't find any object between %#p and %#p\n",
+ SOS_PTR(trngSeg.start), SOS_PTR(taddrArg));
if (bObj)
LNODisplayOutput(W("Current:"), objMT, taddrObj, objSize);
if (bNxt)
LNODisplayOutput(W("After: "), nxtMT, taddrNxt, nxtSize);
else
- ExtOut("After: couldn't find any object between %#p and %#p\n",
- (ULONG64)taddrArg, (ULONG64)trngSeg.end);
+ ExtOut("After: couldn't find any object between %#p and %#p\n",
+ SOS_PTR(taddrArg), SOS_PTR(trngSeg.end));
if (bCur && bNxt &&
(((taddrCur+curSize == taddrObj) && (taddrObj+objSize == taddrNxt)) || (taddrCur+curSize == taddrNxt)))
DacpModuleData module;
if ((Status=module.Request(g_sos, TO_CDADDR(p_ModuleAddr)))!=S_OK)
{
- ExtOut("Fail to fill Module %p\n", (ULONG64) p_ModuleAddr);
+ ExtOut("Fail to fill Module %p\n", SOS_PTR(p_ModuleAddr));
return Status;
}
DMLOut("Assembly: %s\n", DMLAssembly(module.Assembly));
- ExtOut("LoaderHeap: %p\n", (ULONG64)module.pLookupTableHeap);
- ExtOut("TypeDefToMethodTableMap: %p\n", (ULONG64)module.TypeDefToMethodTableMap);
- ExtOut("TypeRefToMethodTableMap: %p\n", (ULONG64)module.TypeRefToMethodTableMap);
- ExtOut("MethodDefToDescMap: %p\n", (ULONG64)module.MethodDefToDescMap);
- ExtOut("FieldDefToDescMap: %p\n", (ULONG64)module.FieldDefToDescMap);
- ExtOut("MemberRefToDescMap: %p\n", (ULONG64)module.MemberRefToDescMap);
- ExtOut("FileReferencesMap: %p\n", (ULONG64)module.FileReferencesMap);
- ExtOut("AssemblyReferencesMap: %p\n", (ULONG64)module.ManifestModuleReferencesMap);
+ ExtOut("LoaderHeap: %p\n", SOS_PTR(module.pLookupTableHeap));
+ ExtOut("TypeDefToMethodTableMap: %p\n", SOS_PTR(module.TypeDefToMethodTableMap));
+ ExtOut("TypeRefToMethodTableMap: %p\n", SOS_PTR(module.TypeRefToMethodTableMap));
+ ExtOut("MethodDefToDescMap: %p\n", SOS_PTR(module.MethodDefToDescMap));
+ ExtOut("FieldDefToDescMap: %p\n", SOS_PTR(module.FieldDefToDescMap));
+ ExtOut("MemberRefToDescMap: %p\n", SOS_PTR(module.MemberRefToDescMap));
+ ExtOut("FileReferencesMap: %p\n", SOS_PTR(module.FileReferencesMap));
+ ExtOut("AssemblyReferencesMap: %p\n", SOS_PTR(module.ManifestModuleReferencesMap));
if (module.ilBase && module.metadataStart)
- ExtOut("MetaData start address: %p (%d bytes)\n", (ULONG64)module.metadataStart, module.metadataSize);
+ ExtOut("MetaData start address: %p (%d bytes)\n", SOS_PTR(module.metadataStart), module.metadataSize);
if (bMethodTables)
{
if ((Status=appDomain.Request(g_sos, pArray[n])) != S_OK)
{
- ExtOut("Failed to get appdomain %p, error %lx\n", (ULONG64)pArray[n], Status);
+ ExtOut("Failed to get appdomain %p, error %lx\n", SOS_PTR(pArray[n]), Status);
return Status;
}
{
continue;
}
- ExtOut("MethodDesc = %p\n", (ULONG64) pMDs[i]);
+ ExtOut("MethodDesc = %p\n", SOS_PTR(pMDs[i]));
}
}
INIT_API_DAC();
DacpMethodDescData MethodDescData;
- ExtOut("MethodDesc = %p\n", (ULONG64) pMD);
+ ExtOut("MethodDesc = %p\n", SOS_PTR(pMD));
if (MethodDescData.Request(g_sos, TO_CDADDR(pMD)) != S_OK)
{
- ExtOut("%p is not a valid MethodDesc\n", (ULONG64)pMD);
+ ExtOut("%p is not a valid MethodDesc\n", SOS_PTR(pMD));
return Status;
}
// Must issue a pending breakpoint.
if (g_sos->GetMethodDescName(pMD, mdNameLen, FunctionName, NULL) != S_OK)
{
- ExtOut("Unable to get method name for MethodDesc %p\n", (ULONG64)pMD);
+ ExtOut("Unable to get method name for MethodDesc %p\n", SOS_PTR(pMD));
return Status;
}
}
if (workRequestData.Function == threadpool.AsyncTimerCallbackCompletionFPtr)
- ExtOut (" AsyncTimerCallbackCompletion TimerInfo@%p\n", (ULONG64)workRequestData.Context);
+ ExtOut (" AsyncTimerCallbackCompletion TimerInfo@%p\n", SOS_PTR(workRequestData.Context));
else
- ExtOut (" Unknown Function: %p Context: %p\n", (ULONG64)workRequestData.Function,
- (ULONG64)workRequestData.Context);
+ ExtOut (" Unknown Function: %p Context: %p\n", SOS_PTR(workRequestData.Function),
+ SOS_PTR(workRequestData.Context));
workRequestPtr = workRequestData.NextWorkRequest;
}
if ((p_Object == 0) || !sos::IsObject(p_Object))
{
- ExtOut("%p is not a valid object\n", (ULONG64) p_Object);
+ ExtOut("%p is not a valid object\n", SOS_PTR(p_Object));
return Status;
}
if ((domain.Request(g_sos, appDomain) != S_OK) ||
(g_sos->GetAppDomainName(appDomain,mdNameLen,g_mdName, NULL)!=S_OK))
{
- ExtOut("Error getting AppDomain %p.\n", (ULONG64) appDomain);
+ ExtOut("Error getting AppDomain %p.\n", SOS_PTR(appDomain));
return Status;
}
g_ExtSystem->SetCurrentThreadId(ids[i]);
CLRDATA_ADDRESS cdaTeb;
g_ExtSystem->GetCurrentThreadTeb(&cdaTeb);
- ExtOut("%3d %4x %p", ids[i], sysIds[i], CDA_TO_UL64(cdaTeb));
+ ExtOut("%3d %4x %p", ids[i], sysIds[i], SOS_PTR(CDA_TO_UL64(cdaTeb)));
// Apartment state
TADDR OleTlsDataAddr;
if (SafeReadMemory(TO_TADDR(cdaTeb) + offsetof(TEB,ReservedForOle),
if (SafeReadMemory(OleTlsDataAddr+offsetof(SOleTlsData,pCurrentCtx),
&Context,
sizeof(Context), NULL)) {
- ExtOut(" %p", (ULONG64)Context);
+ ExtOut(" %p", SOS_PTR(Context));
}
else
- ExtOut(" %p", (ULONG64)0);
+ ExtOut(" %p", SOS_PTR(0));
}
else
DacpMethodDescData MD;
if ((tmpAddr == 0) || (MD.Request(g_sos, TO_CDADDR(tmpAddr)) != S_OK))
{
- ExtOut("%p is not a MethodDesc\n", (ULONG64)tmpAddr);
+ ExtOut("%p is not a MethodDesc\n", SOS_PTR(tmpAddr));
return Status;
}
DacpMethodDescData MD;
if ((tmpAddr == 0) || (MD.Request(g_sos, TO_CDADDR(tmpAddr)) != S_OK))
{
- ExtOut("%p is not a valid MethodDesc\n", (ULONG64)taStartAddr);
+ ExtOut("%p is not a valid MethodDesc\n", SOS_PTR(taStartAddr));
return Status;
}
taGCInfoAddr = TO_TADDR(codeHeaderData.GCInfo);
- ExtOut("GC info %p\n", (ULONG64)taGCInfoAddr);
+ ExtOut("GC info %p\n", SOS_PTR(taGCInfoAddr));
// assume that GC encoding table is never more than
// 40 + methodSize * 2
// We avoid using move here, because we do not want to return
if (!SafeReadMemory(taGCInfoAddr, table, tableSize, NULL))
{
- ExtOut("Could not read memory %p\n", (ULONG64)taGCInfoAddr);
+ ExtOut("Could not read memory %p\n", SOS_PTR(taGCInfoAddr));
return Status;
}
if (codeHeaderData.ColdRegionStart != NULL)
{
ExtOut("Begin %p, size %x. Cold region begin %p, size %x\n",
- (ULONG64)codeHeaderData.MethodStart, codeHeaderData.HotRegionSize,
- (ULONG64)codeHeaderData.ColdRegionStart, codeHeaderData.ColdRegionSize);
+ SOS_PTR(codeHeaderData.MethodStart), codeHeaderData.HotRegionSize,
+ SOS_PTR(codeHeaderData.ColdRegionStart), codeHeaderData.ColdRegionSize);
}
else
{
- ExtOut("Begin %p, size %x\n", (ULONG64)codeHeaderData.MethodStart, codeHeaderData.MethodSize);
+ ExtOut("Begin %p, size %x\n", SOS_PTR(codeHeaderData.MethodStart), codeHeaderData.MethodSize);
}
#if !defined(FEATURE_PAL)
// We avoid using move here, because we do not want to return
if (!SafeReadMemory(TO_TADDR(codeHeaderData.GCInfo), gcEncodingInfo.table, tableSize, NULL))
{
- ExtOut("Could not read memory %p\n", (ULONG64)codeHeaderData.GCInfo);
+ ExtOut("Could not read memory %p\n", SOS_PTR(codeHeaderData.GCInfo));
return Status;
}
if(FAILED(GetMTOfObject(taddrObj, &taddrMT)) ||
!GetSizeEfficient(taddrObj, taddrMT, FALSE, size, bContainsPointers))
{
- ExtWarn("Couldn't get size for object %#p: possible heap corruption.\n",
- taddrObj);
+ ExtWarn("Couldn't get size for object %#p: possible heap corruption.\n",
+ SOS_PTR(taddrObj));
}
}
{
ExtOut("Address " WIN64_8SPACES " Gen Heap segment " WIN64_8SPACES " begin " WIN64_8SPACES " allocated " WIN64_8SPACES " size\n");
ExtOut("%p %d %2d %p %p %p 0x%x(%d)\n",
- (ULONG64)taddrObj, gen, 0, (ULONG64)trngSeg.segAddr, (ULONG64)trngSeg.start, (ULONG64)trngSeg.end, size, size);
+ SOS_PTR(taddrObj), gen, 0, SOS_PTR(trngSeg.segAddr), SOS_PTR(trngSeg.start), SOS_PTR(trngSeg.end), size, size);
bFound = TRUE;
}
}
{
ExtOut("Address " WIN64_8SPACES " Gen Heap segment " WIN64_8SPACES " begin " WIN64_8SPACES " allocated" WIN64_8SPACES " size\n");
ExtOut("%p %d %2d %p %p %p 0x%x(%d)\n",
- (ULONG64)taddrObj, gen, n, (ULONG64)trngSeg.segAddr, (ULONG64)trngSeg.start, (ULONG64)trngSeg.end, size, size);
+ SOS_PTR(taddrObj), gen, n, SOS_PTR(trngSeg.segAddr), SOS_PTR(trngSeg.start), SOS_PTR(trngSeg.end), size, size);
bFound = TRUE;
break;
}
if (!bFound)
{
- ExtOut("Address %#p not found in the managed heap.\n", (ULONG64)taddrObj);
+ ExtOut("Address %#p not found in the managed heap.\n", SOS_PTR(taddrObj));
}
return Status;
if (g_snapshot.GetHeap(taObj) == NULL)
{
- ExtOut("Address %#p is not in the managed heap.\n", (ULONG64) taObj);
+ ExtOut("Address %#p is not in the managed heap.\n", SOS_PTR(taObj));
return Status;
}
if (ogen > CNotification::GetCondemnedGen())
{
DMLOut("Object %s will survive this collection:\n\tgen(%#p) = %d > %d = condemned generation.\n",
- DMLObject(taObj), (ULONG64)taObj, ogen, CNotification::GetCondemnedGen());
+ DMLObject(taObj), SOS_PTR(taObj), ogen, CNotification::GetCondemnedGen());
return Status;
}
ExtOut("Found %d handles:\n",iFinal);
for (i=1;i<=iFinal;i++)
{
- ExtOut("%p\t",(ULONG64)array[i-1]);
+ ExtOut("%p\t", SOS_PTR(array[i-1]));
if ((i % 4) == 0)
ExtOut("\n");
}
{
if (IsInterrupt())
{
- ExtOut("Quitting at %p due to user abort\n",(ULONG64)memIter);
+ ExtOut("Quitting at %p due to user abort\n", SOS_PTR(memIter));
bAbort = TRUE;
break;
}
if ((memIter % 0x10000000)==0x0)
{
- ExtOut("Searching %p...\n",(ULONG64)memIter);
+ ExtOut("Searching %p...\n", SOS_PTR(memIter));
}
ULONG size = 0;
{
if (stressLog.IsInStressLog (addrInDebugee))
{
- ExtOut("Found %p in stress log at location %p, reference not counted\n", (ULONG64)value, addrInDebugee);
+ ExtOut("Found %p in stress log at location %p, reference not counted\n", SOS_PTR(value), addrInDebugee);
}
else
{
- ExtOut("Found %p at location %p\n",(ULONG64)value, addrInDebugee);
+ ExtOut("Found %p at location %p\n", SOS_PTR(value), addrInDebugee);
array[i] |= 0x1;
}
}
{
if (size > 0)
{
- ExtOut("only read %x bytes at %p\n",size,(ULONG64)memIter);
+ ExtOut("only read %x bytes at %p\n", size, SOS_PTR(memIter));
}
}
}
if ((array[i] & 0x1) == 0)
{
numNotFound++;
- // ExtOut("WARNING: %p not found\n",(ULONG64)array[i]);
+ // ExtOut("WARNING: %p not found\n", SOS_PTR(array[i]));
}
}
for (i=0;i<iFinal;i++)
{
if ((array[i] & 0x1) == 0)
- {
+ {
numPrinted++;
- ExtOut("%p\t",(ULONG64)array[i]);
+ ExtOut("%p\t", SOS_PTR(array[i]));
if ((numPrinted % 4) == 0)
- ExtOut("\n");
+ ExtOut("\n");
}
}
ExtOut("\n");
}
else
{
- ExtOut("(0x%p) ", CDA_TO_UL64(addr));
+ ExtOut("(0x%p) ", SOS_PTR(CDA_TO_UL64(addr)));
}
fPrintedLocation = TRUE;
}
if (outVar)
DMLOut("0x%s\n", DMLObject(outVar));
else
- ExtOut("0x%p\n", (ULONG64)outVar);
+ ExtOut("0x%p\n", SOS_PTR(outVar));
}
}
}
else
{
- ExtOut("0x%p ", CDA_TO_UL64(addr));
+ ExtOut("0x%p ", SOS_PTR(CDA_TO_UL64(addr)));
}
}
if (outVar)
DMLOut("0x%s\n", DMLObject(outVar));
else
- ExtOut("0x%p\n", (ULONG64)outVar);
+ ExtOut("0x%p\n", SOS_PTR(outVar));
}
}
else
}
else
{
- ExtOut ("%p is not a Module or base address\n", (ULONG64)moduleAddr);
+ ExtOut ("%p is not a Module or base address\n", SOS_PTR(moduleAddr));
return Status;
}
MEMORY_BASIC_INFORMATION64 mbi;
if (FAILED(g_ExtData2->QueryVirtual(TO_CDADDR(dllBase), &mbi)))
{
- ExtOut("Failed to retrieve information about segment %p", (ULONG64)dllBase);
+ ExtOut("Failed to retrieve information about segment %p", SOS_PTR(dllBase));
return Status;
}
return Status;
}
- ExtOut("_EFN_GetManagedExcepStack(%P, wszStr, sizeof(wszStr)) returned:\n", (ULONG64) taExc);
+ ExtOut("_EFN_GetManagedExcepStack(%P, wszStr, sizeof(wszStr)) returned:\n", SOS_PTR(taExc));
ExtOut("%S\n", wszStr);
if (ImplementEFNGetManagedExcepStack((ULONG64)NULL, wszStr, cchStr) != S_OK)
}
for (size_t j=0; j < contextLength; j++)
{
- ExtOut("%p %p %p\n", (ULONG64) pSimple[j].FrameOffset,
- (ULONG64) pSimple[j].StackOffset,
- (ULONG64) pSimple[j].InstructionOffset);
+ ExtOut("%p %p %p\n", SOS_PTR(pSimple[j].FrameOffset),
+ SOS_PTR(pSimple[j].StackOffset),
+ SOS_PTR(pSimple[j].InstructionOffset));
}
delete [] pSimple;
delete[] wszBuffer;
#define INITGUID
#include "guiddef.h"
+#ifdef FEATURE_PAL
+#define SOS_PTR(x) (size_t)(x)
+#else // FEATURE_PAL
+#define SOS_PTR(x) (unsigned __int64)(x)
+#endif // FEATURE_PAL else
+
#include "exts.h"
//Alignment constant for allocation
#define plug_skew SIZEOF_OBJHEADER
#define min_obj_size (sizeof(BYTE*)+plug_skew+sizeof(size_t))
-#ifdef FEATURE_PAL
-#define SOS_PTR(x) (size_t)(x)
-#else // FEATURE_PAL
-#define SOS_PTR(x) (unsigned __int64)(x)
-#endif // FEATURE_PAL else
-
extern BOOL CallStatus;
void AssemblyInfo(DacpAssemblyData *pAssembly)
{
- ExtOut("ClassLoader: %p\n", (ULONG64)pAssembly->ClassLoader);
+ ExtOut("ClassLoader: %p\n", SOS_PTR(pAssembly->ClassLoader));
if ((ULONG64)pAssembly->AssemblySecDesc != NULL)
- ExtOut("SecurityDescriptor: %p\n", (ULONG64)pAssembly->AssemblySecDesc);
+ ExtOut("SecurityDescriptor: %p\n", SOS_PTR(pAssembly->AssemblySecDesc));
ExtOut(" Module Name\n");
ArrayHolder<CLRDATA_ADDRESS> Modules = new CLRDATA_ADDRESS[pAssembly->ModuleCount];
\**********************************************************************/
void DomainInfo (DacpAppDomainData *pDomain)
{
- ExtOut("LowFrequencyHeap: %p\n", (ULONG64)pDomain->pLowFrequencyHeap);
- ExtOut("HighFrequencyHeap: %p\n", (ULONG64)pDomain->pHighFrequencyHeap);
- ExtOut("StubHeap: %p\n", (ULONG64)pDomain->pStubHeap);
+ ExtOut("LowFrequencyHeap: %p\n", SOS_PTR(pDomain->pLowFrequencyHeap));
+ ExtOut("HighFrequencyHeap: %p\n", SOS_PTR(pDomain->pHighFrequencyHeap));
+ ExtOut("StubHeap: %p\n", SOS_PTR(pDomain->pStubHeap));
ExtOut("Stage: %s\n", GetStageText(pDomain->appDomainStage));
if ((ULONG64)pDomain->AppSecDesc != NULL)
- ExtOut("SecurityDescriptor: %p\n", (ULONG64)pDomain->AppSecDesc);
+ ExtOut("SecurityDescriptor: %p\n", SOS_PTR(pDomain->AppSecDesc));
ExtOut("Name: ");
if (g_sos->GetAppDomainName(pDomain->AppDomainPtr, mdNameLen, g_mdName, NULL)!=S_OK)
//
if (!IsMiniDumpFile() && MethodDescData.Request(g_sos,StartAddr) != S_OK)
{
- ExtOut("%p is not a MethodDesc\n", (ULONG64)StartAddr);
+ ExtOut("%p is not a MethodDesc\n", SOS_PTR(StartAddr));
return FALSE;
}
{
if (mFormat == Formats::Default || mFormat == Formats::Pointer)
{
- ExtOut("%p", (__int64)mValue);
+ ExtOut("%p", SOS_PTR(mValue));
}
else
{
ExtOut(
"%p-%p %p %-13s %-13s %-8s %-8s\n",
- (ULONG64) memInfo.BaseAddress,
- (ULONG64)((ULONG_PTR)memInfo.BaseAddress + memInfo.RegionSize - 1),
- (ULONG64)memInfo.RegionSize,
+ SOS_PTR(memInfo.BaseAddress),
+ SOS_PTR(((ULONG_PTR)memInfo.BaseAddress + memInfo.RegionSize - 1)),
+ SOS_PTR(memInfo.RegionSize),
VmProtectToString( memInfo.AllocationProtect, aprotectStr, _countof(aprotectStr) ),
VmProtectToString( memInfo.Protect, protectStr, _countof(protectStr) ),
VmStateToString( memInfo.State, stateStr, _countof(stateStr) ),