Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/debug/crashreport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CRASHREPORT_SOURCES
signalsafejsonwriter.cpp
inproccrashreporter.cpp
inproccrashreportwatchdog.cpp
)

add_library(inproccrashreport OBJECT ${CRASHREPORT_SOURCES})
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/debug/crashreport/inproccrashreporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
// Streams a createdump-shaped JSON skeleton to a crashreport.json file.

#include "inproccrashreporter.h"
#include "inproccrashreportwatchdog.h"
#include "signalsafejsonwriter.h"

#include "pal.h"

#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
Expand Down Expand Up @@ -233,6 +235,7 @@ InProcCrashReporter::CreateReport(
{
return;
}
CrashReportWatchdogScope watchdogScope;

char reportPath[CRASHREPORT_PATH_BUFFER_SIZE];
reportPath[0] = '\0';
Expand Down Expand Up @@ -345,6 +348,8 @@ InProcCrashReporter::Initialize(
m_enumerateThreadsCallback = settings.enumerateThreadsCallback;
CrashReportHelpers::CopyString(m_reportPath, sizeof(m_reportPath), settings.reportPath);

(void)CrashReportWatchdogTryInitialize(settings.timeoutSeconds);

m_processName[0] = '\0';
#if defined(__ANDROID__)
// On Android every app forks from the Zygote, so /proc/self/exe always
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/debug/crashreport/inproccrashreporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ using InProcCrashReportEnumerateThreadsCallback = void (*)(
struct InProcCrashReporterSettings
{
const char* reportPath;
uint32_t timeoutSeconds;
InProcCrashReportIsManagedThreadCallback isManagedThreadCallback;
InProcCrashReportWalkStackCallback walkStackCallback;
InProcCrashReportEnumerateThreadsCallback enumerateThreadsCallback;
Expand Down
Loading
Loading