From fe995d9142bda3347aece3404d6b59e5515c921d Mon Sep 17 00:00:00 2001 From: Juan Sebastian Hoyos Ayala Date: Wed, 26 Apr 2023 15:23:50 -0700 Subject: [PATCH] Fix createdump arg parsing for signal-based exceptions --- src/coreclr/debug/createdump/createdump.h | 2 +- src/coreclr/debug/createdump/main.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/coreclr/debug/createdump/createdump.h b/src/coreclr/debug/createdump/createdump.h index 314533a9ed0387..930e48b9166541 100644 --- a/src/coreclr/debug/createdump/createdump.h +++ b/src/coreclr/debug/createdump/createdump.h @@ -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; diff --git a/src/coreclr/debug/createdump/main.cpp b/src/coreclr/debug/createdump/main.cpp index bddc3f6ea0a22d..6dd116a7a3c338 100644 --- a/src/coreclr/debug/createdump/main.cpp +++ b/src/coreclr/debug/createdump/main.cpp @@ -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; @@ -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); @@ -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)) { @@ -264,5 +262,3 @@ trace_verbose_printf(const char* format, ...) va_end(args); } } - -