Skip to content

Commit

Permalink
Fix createdump arg parsing for signal-based exceptions (dotnet#85425)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyosjs authored Apr 27, 2023
1 parent 4af6023 commit b393a37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/debug/createdump/createdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ typedef struct
int Pid;
int CrashThread;
int Signal;
#if defined(HOST_UNIX) && !defined(HOST_OSX)
#if defined(HOST_UNIX)
int SignalCode;
int SignalErrno;
void* SignalAddress;
Expand Down
6 changes: 1 addition & 5 deletions src/coreclr/debug/createdump/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int __cdecl main(const int argc, const char* argv[])
options.Signal = 0;
options.CrashThread = 0;
options.Pid = 0;
#if defined(HOST_UNIX) && !defined(HOST_OSX)
#if defined(HOST_UNIX)
options.SignalCode = 0;
options.SignalErrno = 0;
options.SignalAddress = nullptr;
Expand Down Expand Up @@ -140,7 +140,6 @@ int __cdecl main(const int argc, const char* argv[])
{
options.Signal = atoi(*++argv);
}
#ifndef HOST_OSX
else if (strcmp(*argv, "--code") == 0)
{
options.SignalCode = atoi(*++argv);
Expand All @@ -153,7 +152,6 @@ int __cdecl main(const int argc, const char* argv[])
{
options.SignalAddress = (void*)atoll(*++argv);
}
#endif
#endif
else if ((strcmp(*argv, "-d") == 0) || (strcmp(*argv, "--diag") == 0))
{
Expand Down Expand Up @@ -264,5 +262,3 @@ trace_verbose_printf(const char* format, ...)
va_end(args);
}
}


0 comments on commit b393a37

Please sign in to comment.