[netcore] Implement missing Bmi1/Bmi2 intrinsics (#16919)
[mono-project.git] / mono / mini / debugger-state-machine.h
blob6e8bc55e80d23a9e56db53236537fbbb904ce6d3
1 /**
2 * \file
3 * Types for the debugger state machine and wire protocol
5 * Author:
6 * Alexander Kyte (alkyte@microsoft.com)
8 * (C) 2018 Microsoft, Inc.
11 #ifndef __MONO_DEBUGGER_STATE_MACHINE__
12 #define __MONO_DEBUGGER_STATE_MACHINE__
15 #include <glib.h>
16 #include <mono/metadata/metadata.h>
17 #include <mono/utils/mono-threads-debug.h>
18 #include <mono/utils/json.h>
19 #include "debugger-agent.h"
21 typedef enum {
22 MONO_DEBUGGER_STARTED = 0,
23 MONO_DEBUGGER_RESUMED = 1,
24 MONO_DEBUGGER_SUSPENDED = 2,
25 MONO_DEBUGGER_TERMINATED = 3,
26 } MonoDebuggerThreadState;
28 void
29 mono_debugger_log_init (void);
31 void
32 mono_debugger_log_free (void);
34 void
35 mono_debugger_log_exit (int exit_code);
37 void
38 mono_debugger_log_add_bp (gpointer key, MonoMethod *method, long il_offset);
40 void
41 mono_debugger_log_remove_bp (gpointer key, MonoMethod *method, long il_offset);
43 void
44 mono_debugger_log_command (const char *command_set, const char *command, guint8 *buf, int len);
46 void
47 mono_debugger_log_event (DebuggerTlsData *tls, const char *event, guint8 *buf, int len);
49 void
50 mono_debugger_log_bp_hit (DebuggerTlsData *tls, MonoMethod *method, long il_offset);
52 void
53 mono_debugger_log_resume (DebuggerTlsData *tls);
55 void
56 mono_debugger_log_suspend (DebuggerTlsData *tls);
58 #if 0
59 #define DEBUGGER_STATE_MACHINE_DEBUG(level, ...)
60 #else
61 #define DEBUGGER_STATE_MACHINE_DEBUG(level, ...) g_async_safe_printf(__VA_ARGS__)
62 #endif
64 void
65 mono_debugger_state (JsonWriter *writer);
67 char *
68 mono_debugger_state_str (void);
70 #endif // __MONO_DEBUGGER_STATE_MACHINE__