Skip to content

Commit b393a37

Browse files
authored
Fix createdump arg parsing for signal-based exceptions (#85425)
1 parent 4af6023 commit b393a37

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/coreclr/debug/createdump/createdump.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ typedef struct
103103
int Pid;
104104
int CrashThread;
105105
int Signal;
106-
#if defined(HOST_UNIX) && !defined(HOST_OSX)
106+
#if defined(HOST_UNIX)
107107
int SignalCode;
108108
int SignalErrno;
109109
void* SignalAddress;

src/coreclr/debug/createdump/main.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int __cdecl main(const int argc, const char* argv[])
5454
options.Signal = 0;
5555
options.CrashThread = 0;
5656
options.Pid = 0;
57-
#if defined(HOST_UNIX) && !defined(HOST_OSX)
57+
#if defined(HOST_UNIX)
5858
options.SignalCode = 0;
5959
options.SignalErrno = 0;
6060
options.SignalAddress = nullptr;
@@ -140,7 +140,6 @@ int __cdecl main(const int argc, const char* argv[])
140140
{
141141
options.Signal = atoi(*++argv);
142142
}
143-
#ifndef HOST_OSX
144143
else if (strcmp(*argv, "--code") == 0)
145144
{
146145
options.SignalCode = atoi(*++argv);
@@ -153,7 +152,6 @@ int __cdecl main(const int argc, const char* argv[])
153152
{
154153
options.SignalAddress = (void*)atoll(*++argv);
155154
}
156-
#endif
157155
#endif
158156
else if ((strcmp(*argv, "-d") == 0) || (strcmp(*argv, "--diag") == 0))
159157
{
@@ -264,5 +262,3 @@ trace_verbose_printf(const char* format, ...)
264262
va_end(args);
265263
}
266264
}
267-
268-

0 commit comments

Comments
 (0)