Fix debugger attach to process on OSX
authorGregg Miskelly <greggm@microsoft.com>
Wed, 17 Feb 2016 18:37:26 +0000 (10:37 -0800)
committerGregg Miskelly <greggm@microsoft.com>
Wed, 17 Feb 2016 18:37:26 +0000 (10:37 -0800)
Attaching to processes on OSX was broken with the way the .NET CLI is installing CoreCLR. The issue is that the vmmap executable that dbgshim is using will, by default, truncate paths. This caused it to be unable to find the real path to DBI.

Fix: pass the '-wide' argument to vmmap

src/pal/src/thread/process.cpp

index 78480359f85f189820e039de2b104b31789835a2..a76a1878df13e217e044d406812b74826a26471f 100644 (file)
@@ -2374,7 +2374,7 @@ CreateProcessModules(
     ssize_t read;
 
     char vmmapCommand[100];
-    int chars = snprintf(vmmapCommand, sizeof(vmmapCommand), "/usr/bin/vmmap -interleaved %d", dwProcessId);
+    int chars = snprintf(vmmapCommand, sizeof(vmmapCommand), "/usr/bin/vmmap -interleaved %d -wide", dwProcessId);
     _ASSERTE(chars > 0 && chars <= sizeof(vmmapCommand));
 
     FILE *vmmapFile = popen(vmmapCommand, "r");