Skip to content

Commit 1d16fd1

Browse files
authored
Skip calling not implemented PEAssembly::GetDisplayName in DAC (#104326)
1 parent 22ea3e8 commit 1d16fd1

File tree

2 files changed

+4
-43
lines changed

2 files changed

+4
-43
lines changed

src/coreclr/debug/daccess/request.cpp

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,32 +2142,7 @@ ClrDataAccess::GetPEFileName(CLRDATA_ADDRESS moduleAddr, unsigned int count, _In
21422142
}
21432143
else if (!pPEAssembly->IsReflectionEmit())
21442144
{
2145-
StackSString displayName;
2146-
pPEAssembly->GetDisplayName(displayName, 0);
2147-
2148-
if (displayName.IsEmpty())
2149-
{
2150-
if (fileName)
2151-
fileName[0] = 0;
2152-
2153-
if (pNeeded)
2154-
*pNeeded = 1;
2155-
}
2156-
else
2157-
{
2158-
unsigned int len = displayName.GetCount()+1;
2159-
2160-
if (fileName)
2161-
{
2162-
wcsncpy_s(fileName, count, displayName.GetUnicode(), _TRUNCATE);
2163-
2164-
if (count < len)
2165-
len = count;
2166-
}
2167-
2168-
if (pNeeded)
2169-
*pNeeded = len;
2170-
}
2145+
hr = E_NOTIMPL;
21712146
}
21722147
else
21732148
{
@@ -2711,19 +2686,7 @@ ClrDataAccess::GetAssemblyName(CLRDATA_ADDRESS assembly, unsigned int count, _In
27112686
}
27122687
else if (!pAssembly->GetPEAssembly()->IsReflectionEmit())
27132688
{
2714-
StackSString displayName;
2715-
pAssembly->GetPEAssembly()->GetDisplayName(displayName, 0);
2716-
2717-
const WCHAR *val = displayName.GetUnicode();
2718-
2719-
if (pNeeded)
2720-
*pNeeded = displayName.GetCount() + 1;
2721-
2722-
if (name && count)
2723-
{
2724-
wcsncpy_s(name, count, val, _TRUNCATE);
2725-
name[count-1] = 0;
2726-
}
2689+
hr = E_NOTIMPL;
27272690
}
27282691
else
27292692
{

src/coreclr/vm/peassembly.inl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ inline BOOL PEAssembly::IsPtrInPEImage(PTR_CVOID data)
715715
// ------------------------------------------------------------
716716
// Descriptive strings
717717
// ------------------------------------------------------------
718+
#ifndef DACCESS_COMPILE
718719
inline void PEAssembly::GetDisplayName(SString &result, DWORD flags)
719720
{
720721
CONTRACTL
@@ -726,14 +727,11 @@ inline void PEAssembly::GetDisplayName(SString &result, DWORD flags)
726727
}
727728
CONTRACTL_END;
728729

729-
#ifndef DACCESS_COMPILE
730730
AssemblySpec spec;
731731
spec.InitializeSpec(this);
732732
spec.GetDisplayName(flags, result);
733-
#else
734-
DacNotImpl();
735-
#endif //DACCESS_COMPILE
736733
}
734+
#endif //DACCESS_COMPILE
737735

738736
// ------------------------------------------------------------
739737
// Metadata access

0 commit comments

Comments
 (0)