Skip to content

Commit f170db7

Browse files
author
Mike McLaughlin
authored
Fix SOS/managed debugging failures from PR #36847 (#38689)
Add PAL_GetApplicationGroupId() that returns null for Linux.
1 parent f5691ed commit f170db7

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/coreclr/src/pal/inc/pal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,12 +449,10 @@ BOOL
449449
PALAPI
450450
PAL_NotifyRuntimeStarted();
451451

452-
#ifdef __APPLE__
453452
PALIMPORT
454453
LPCSTR
455454
PALAPI
456455
PAL_GetApplicationGroupId();
457-
#endif
458456

459457
static const unsigned int MAX_DEBUGGER_TRANSPORT_PIPE_NAME_LENGTH = MAX_PATH;
460458

src/coreclr/src/pal/src/thread/process.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,12 +2011,7 @@ PAL_NotifyRuntimeStarted()
20112011
_ASSERTE(ret == TRUE || processIdDisambiguationKey == 0);
20122012

20132013
UnambiguousProcessDescriptor unambiguousProcessDescriptor(gPID, processIdDisambiguationKey);
2014-
LPCSTR applicationGroupId =
2015-
#ifdef __APPLE__
2016-
PAL_GetApplicationGroupId();
2017-
#else
2018-
nullptr;
2019-
#endif
2014+
LPCSTR applicationGroupId = PAL_GetApplicationGroupId();
20202015
CreateSemaphoreName(startupSemName, RuntimeStartupSemaphoreName, unambiguousProcessDescriptor, applicationGroupId);
20212016
CreateSemaphoreName(continueSemName, RuntimeContinueSemaphoreName, unambiguousProcessDescriptor, applicationGroupId);
20222017

@@ -2066,14 +2061,19 @@ PAL_NotifyRuntimeStarted()
20662061
return launched;
20672062
}
20682063

2069-
#ifdef __APPLE__
20702064
LPCSTR
20712065
PALAPI
20722066
PAL_GetApplicationGroupId()
20732067
{
2068+
#ifdef __APPLE__
20742069
return gApplicationGroupId;
2070+
#else
2071+
return nullptr;
2072+
#endif
20752073
}
20762074

2075+
#ifdef __APPLE__
2076+
20772077
// We use 7bits from each byte, so this computes the extra size we need to encode a given byte count
20782078
constexpr int GetExtraEncodedAreaSize(UINT rawByteCount)
20792079
{

0 commit comments

Comments
 (0)