summaryrefslogtreecommitdiff
path: root/src/debug/daccess/daccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/daccess/daccess.cpp')
-rw-r--r--src/debug/daccess/daccess.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/debug/daccess/daccess.cpp b/src/debug/daccess/daccess.cpp
index ba3995b1f7..69167ab07e 100644
--- a/src/debug/daccess/daccess.cpp
+++ b/src/debug/daccess/daccess.cpp
@@ -5888,14 +5888,15 @@ ClrDataAccess::RawGetMethodName(
LPCWSTR wszStubManagerName = pStubManager->GetStubManagerName(TO_TADDR(address));
_ASSERTE(wszStubManagerName != NULL);
- HRESULT hr = StringCchPrintfW(
+ int result = _snwprintf_s(
symbolBuf,
bufLen,
+ _TRUNCATE,
s_wszFormatNameWithStubManager,
wszStubManagerName, // Arg 1 = stub name
TO_TADDR(address)); // Arg 2 = stub hex address
- if (hr == S_OK)
+ if (result != -1)
{
// Printf succeeded, so we have an exact char count to return
if (symbolLen)
@@ -5951,13 +5952,14 @@ NameFromMethodDesc:
// XXX Microsoft - Should this case have a more specific name?
static WCHAR s_wszFormatNameAddressOnly[] = W("CLRStub@%I64x");
- HRESULT hr = StringCchPrintfW(
+ int result = _snwprintf_s(
symbolBuf,
bufLen,
+ _TRUNCATE,
s_wszFormatNameAddressOnly,
TO_TADDR(address));
- if (hr == S_OK)
+ if (result != -1)
{
// Printf succeeded, so we have an exact char count to return
if (symbolLen)
@@ -7352,7 +7354,7 @@ Exit:
//----------------------------------------------------------------------------
//
-// IsExceptionFromManagedCode - report if pExceptionRecord points to a exception belonging to the current runtime
+// IsExceptionFromManagedCode - report if pExceptionRecord points to an exception belonging to the current runtime
//
// Arguments:
// pExceptionRecord - the exception record
@@ -7974,7 +7976,7 @@ HRESULT DacHandleWalker::Init(ClrDataAccess *dac, UINT types[], UINT typeCount,
{
SUPPORTS_DAC;
- if (gen < 0 || gen > (int)GCHeap::GetMaxGeneration())
+ if (gen < 0 || gen > (int)GCHeapUtilities::GetMaxGeneration())
return E_INVALIDARG;
mGenerationFilter = gen;
@@ -8033,7 +8035,7 @@ bool DacHandleWalker::FetchMoreHandles(HANDLESCANPROC callback)
int max_slots = 1;
#ifdef FEATURE_SVR_GC
- if (GCHeap::IsServerHeap())
+ if (GCHeapUtilities::IsServerHeap())
max_slots = GCHeapCount();
#endif // FEATURE_SVR_GC
@@ -8089,7 +8091,7 @@ bool DacHandleWalker::FetchMoreHandles(HANDLESCANPROC callback)
HndScanHandlesForGC(hTable, callback,
(LPARAM)&param, 0,
&handleType, 1,
- mGenerationFilter, GCHeap::GetMaxGeneration(), 0);
+ mGenerationFilter, GCHeapUtilities::GetMaxGeneration(), 0);
else
HndEnumHandles(hTable, &handleType, 1, callback, (LPARAM)&param, 0, FALSE);
}