runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Make sure dbgshim can attach to processes with more than 1000 modules.

Open Djuffin opened this issue 11 years ago • 4 comments

https://github.com/dotnet/coreclr/blob/master/src/dlls/dbgshim/dbgshim.cpp#L583

Djuffin avatar Apr 23 '15 17:04 Djuffin

I should fix this.

mikem8361 avatar Sep 03 '15 18:09 mikem8361

HandleHolder hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, debuggeePID); if (NULL == hProcess) return E_FAIL;

// These shouldn't be freed
HMODULE modules[1000];
DWORD cbNeeded;
if(!EnumProcessModules(hProcess, modules, sizeof(modules), &cbNeeded))
{
    return HRESULT_FROM_WIN32(GetLastError());
}

This limitation has always been there. It only affects Windows unless the legacy EnumerateCLRs api is used on xplat. The new register runtime startup apis do not have this limitation except on when used on Windows.

I don't how important is to fix this.

mikem8361 avatar Apr 28 '16 22:04 mikem8361

Moving this to 1.1 after discussing with @mikem8361. With the new dbgshim APIs, this should only affect Windows, and the code has been like this since the Silverlight days.

tzwlai avatar May 09 '16 21:05 tzwlai

Dup of dotnet/coreclr#19538

mikem8361 avatar Aug 18 '18 17:08 mikem8361