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
54
54
- Added ` binary:match/2 ` and ` binary:match/3 `
55
55
- Added ` supervisor:which_children/1 `
56
56
- Added ` monitored_by ` in ` process_info/2 `
57
+ - Added ` AVM_PRINT_PROCESS_CRASH_DUMPS ` option
57
58
58
59
### Changed
59
60
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ option(AVM_RELEASE "Build an AtomVM release" OFF)
37
37
option (AVM_CREATE_STACKTRACES "Create stacktraces" ON )
38
38
option (AVM_BUILD_RUNTIME_ONLY "Only build the AtomVM runtime" OFF )
39
39
option (COVERAGE "Build for code coverage" OFF )
40
+ option (AVM_PRINT_PROCESS_CRASH_DUMPS "Print crash reports when processes die with non-standard reasons" ON )
40
41
41
42
if ((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) OR
42
43
(${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)
166
166
target_compile_definitions (libAtomVM PUBLIC HAVE_PLATFORM_ATOMIC_H)
167
167
endif ()
168
168
169
+ if (AVM_PRINT_PROCESS_CRASH_DUMPS)
170
+ target_compile_definitions (libAtomVM PUBLIC AVM_PRINT_PROCESS_CRASH_DUMPS)
171
+ endif ()
172
+
169
173
# Platforms that run select in a task must set this option
170
174
if (AVM_SELECT_IN_TASK)
171
175
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)
7181
7181
}
7182
7182
}
7183
7183
7184
+ #ifdef AVM_PRINT_PROCESS_CRASH_DUMPS
7184
7185
// Do not print crash dump if reason is normal or shutdown.
7185
7186
if (x_regs [0 ] != LOWERCASE_EXIT_ATOM || (x_regs [1 ] != NORMAL_ATOM && x_regs [1 ] != SHUTDOWN_ATOM )) {
7186
7187
context_dump (ctx );
7187
7188
}
7189
+ #endif
7188
7190
7189
7191
if (x_regs [0 ] == LOWERCASE_EXIT_ATOM ) {
7190
7192
ctx -> exit_reason = x_regs [1 ];
You can’t perform that action at this time.
0 commit comments