"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mono/utils/mono-state.c" between
mono-6.8.0.105.tar.xz and mono-6.8.0.123.tar.xz

About:

mono-state.c  (mono-6.8.0.105.tar.xz):mono-state.c  (mono-6.8.0.123.tar.xz)
skipping to change at line 1004 skipping to change at line 1004
writer->indent--; writer->indent--;
mono_state_writer_printf(writer, "],\n"); mono_state_writer_printf(writer, "],\n");
close (handle); close (handle);
#endif #endif
} }
#endif #endif
static void static void
mono_native_state_add_logged_message (MonoStateWriter *writer, const char *objec
t_key, const char *msg)
{
if (msg != NULL) {
assert_has_space (writer);
mono_state_writer_indent (writer);
mono_state_writer_object_key (writer, object_key);
size_t length;
const char *pos;
if ((pos = strchr (msg, '\n')) != NULL)
length = (size_t)(pos - msg);
else
length = strlen (msg);
length = MIN (length, INT_MAX);
mono_state_writer_printf(writer, "\"%.*s\",\n", (int)length, msg)
;
}
}
static void
mono_native_state_add_prologue (MonoStateWriter *writer) mono_native_state_add_prologue (MonoStateWriter *writer)
{ {
mono_state_writer_printf(writer, "{\n"); mono_state_writer_printf(writer, "{\n");
writer->indent++; writer->indent++;
assert_has_space (writer); assert_has_space (writer);
mono_state_writer_indent (writer); mono_state_writer_indent (writer);
mono_state_writer_object_key (writer, "protocol_version"); mono_state_writer_object_key (writer, "protocol_version");
mono_state_writer_printf(writer, "\"%s\",\n", MONO_NATIVE_STATE_PROTOCOL_ VERSION); mono_state_writer_printf(writer, "\"%s\",\n", MONO_NATIVE_STATE_PROTOCOL_ VERSION);
mono_native_state_add_version (writer); mono_native_state_add_version (writer);
mono_native_state_add_ee_info (writer); mono_native_state_add_ee_info (writer);
mono_native_state_add_memory (writer); mono_native_state_add_memory (writer);
const char *assertion_msg = g_get_assertion_message (); const char *assertion_msg = g_get_assertion_message ();
if (assertion_msg != NULL) { mono_native_state_add_logged_message (writer, "assertion_message", assert
assert_has_space (writer); ion_msg);
mono_state_writer_indent (writer);
mono_state_writer_object_key (writer, "assertion_message");
size_t length; const char *failfast_msg = mono_crash_get_failfast_msg ();
const char *pos; mono_native_state_add_logged_message (writer, "failfast_message", failfas
if ((pos = strchr (assertion_msg, '\n')) != NULL) t_msg);
length = (size_t)(pos - assertion_msg);
else
length = strlen (assertion_msg);
length = MIN (length, INT_MAX);
mono_state_writer_printf(writer, "\"%.*s\",\n", (int)length, asse
rtion_msg);
}
#ifndef MONO_PRIVATE_CRASHES #ifndef MONO_PRIVATE_CRASHES
mono_native_state_add_process_map (writer); mono_native_state_add_process_map (writer);
#endif #endif
// Start threads array // Start threads array
assert_has_space (writer); assert_has_space (writer);
mono_state_writer_indent (writer); mono_state_writer_indent (writer);
mono_state_writer_object_key (writer, "threads"); mono_state_writer_object_key (writer, "threads");
mono_state_writer_printf(writer, "[\n"); mono_state_writer_printf(writer, "[\n");
skipping to change at line 1170 skipping to change at line 1179
mono_dump_start (void) mono_dump_start (void)
{ {
return (mono_atomic_xchg_i32(&dump_status, 1) == 0); // return true if w e started the dump return (mono_atomic_xchg_i32(&dump_status, 1) == 0); // return true if w e started the dump
} }
gboolean gboolean
mono_dump_complete (void) mono_dump_complete (void)
{ {
return (mono_atomic_xchg_i32(&dump_status, 0) == 1); // return true if w e completed the dump return (mono_atomic_xchg_i32(&dump_status, 0) == 1); // return true if w e completed the dump
} }
static char *saved_failfast_msg;
/**
* mono_crash_save_failfast_msg:
* \param msg the message to save. Takes ownership, caller shouldn't free
*
* \returns the previous message - caller is responsible for freeing.
*/
char*
mono_crash_save_failfast_msg (char *msg)
{
return (char*) mono_atomic_xchg_ptr ((gpointer*)&saved_failfast_msg, (voi
d*)msg);
}
const char*
mono_crash_get_failfast_msg (void)
{
return saved_failfast_msg;
}
 End of changes. 4 change blocks. 
15 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)