Skip to content

Commit

Permalink
Fix createdump arg parsing for signal-based exceptions (#85423)
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Sebastian Hoyos Ayala <juan.s.hoyos@outlook.com>
  • Loading branch information
github-actions[bot] and hoyosjs committed Apr 28, 2023
1 parent 3a80b29 commit 12aaae4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 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 @@ -100,7 +100,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
4 changes: 1 addition & 3 deletions src/coreclr/debug/createdump/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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 @@ -161,7 +161,6 @@ int __cdecl main(const int argc, const char* argv[])
{
g_checkForSingleFile = true;
}
#ifndef HOST_OSX
else if (strcmp(*argv, "--code") == 0)
{
options.SignalCode = atoi(*++argv);
Expand All @@ -174,7 +173,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

0 comments on commit 12aaae4

Please sign in to comment.