File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5454- Added ` binary:match/2 ` and ` binary:match/3 `
5555- Added ` supervisor:which_children/1 `
5656- Added ` monitored_by ` in ` process_info/2 `
57+ - Added ` AVM_PRINT_PROCESS_CRASH_DUMPS ` option
5758
5859### Changed
5960
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ option(AVM_RELEASE "Build an AtomVM release" OFF)
3737option (AVM_CREATE_STACKTRACES "Create stacktraces" ON )
3838option (AVM_BUILD_RUNTIME_ONLY "Only build the AtomVM runtime" OFF )
3939option (COVERAGE "Build for code coverage" OFF )
40+ option (AVM_PRINT_PROCESS_CRASH_DUMPS "Print crash reports when processes die with non-standard reasons" ON )
4041
4142if ((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) OR
4243 (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) OR
Original file line number Diff line number Diff line change @@ -166,6 +166,10 @@ if(HAVE_PLATFORM_ATOMIC_H)
166166 target_compile_definitions (libAtomVM PUBLIC HAVE_PLATFORM_ATOMIC_H)
167167endif ()
168168
169+ if (AVM_PRINT_PROCESS_CRASH_DUMPS)
170+ target_compile_definitions (libAtomVM PUBLIC AVM_PRINT_PROCESS_CRASH_DUMPS)
171+ endif ()
172+
169173# Platforms that run select in a task must set this option
170174if (AVM_SELECT_IN_TASK)
171175 target_compile_definitions (libAtomVM PUBLIC AVM_SELECT_IN_TASK)
Original file line number Diff line number Diff line change @@ -7181,10 +7181,12 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
71817181 }
71827182 }
71837183
7184+ #ifdef AVM_PRINT_PROCESS_CRASH_DUMPS
71847185 // Do not print crash dump if reason is normal or shutdown.
71857186 if (x_regs [0 ] != LOWERCASE_EXIT_ATOM || (x_regs [1 ] != NORMAL_ATOM && x_regs [1 ] != SHUTDOWN_ATOM )) {
71867187 context_dump (ctx );
71877188 }
7189+ #endif
71887190
71897191 if (x_regs [0 ] == LOWERCASE_EXIT_ATOM ) {
71907192 ctx -> exit_reason = x_regs [1 ];
You can’t perform that action at this time.
0 commit comments