linux-packaging-mono/mono/mini/debugger-state-machine.h
Xamarin Public Jenkins (auto-signing) 2393d5688b Imported Upstream version 5.18.0.248
Former-commit-id: 738e3044ff639637d8fe2511a8b60b065577838e
2019-01-26 08:23:49 +00:00

71 lines
1.5 KiB
C

/**
* \file
* Types for the debugger state machine and wire protocol
*
* Author:
* Alexander Kyte (alkyte@microsoft.com)
*
* (C) 2018 Microsoft, Inc.
*
*/
#ifndef __MONO_DEBUGGER_STATE_MACHINE__
#define __MONO_DEBUGGER_STATE_MACHINE__
#include <glib.h>
#include <mono/metadata/metadata.h>
#include <mono/utils/mono-threads-debug.h>
#include <mono/utils/json.h>
#include "debugger-agent.h"
typedef enum {
MONO_DEBUGGER_STARTED = 0,
MONO_DEBUGGER_RESUMED = 1,
MONO_DEBUGGER_SUSPENDED = 2,
MONO_DEBUGGER_TERMINATED = 3,
} MonoDebuggerThreadState;
void
mono_debugger_log_init (void);
void
mono_debugger_log_free (void);
void
mono_debugger_log_exit (int exit_code);
void
mono_debugger_log_add_bp (gpointer key, MonoMethod *method, long il_offset);
void
mono_debugger_log_remove_bp (gpointer key, MonoMethod *method, long il_offset);
void
mono_debugger_log_command (const char *command_set, const char *command, guint8 *buf, int len);
void
mono_debugger_log_event (DebuggerTlsData *tls, const char *event, guint8 *buf, int len);
void
mono_debugger_log_bp_hit (DebuggerTlsData *tls, MonoMethod *method, long il_offset);
void
mono_debugger_log_resume (DebuggerTlsData *tls);
void
mono_debugger_log_suspend (DebuggerTlsData *tls);
#if 0
#define DEBUGGER_STATE_MACHINE_DEBUG(level, ...)
#else
#define DEBUGGER_STATE_MACHINE_DEBUG(level, ...) g_async_safe_printf(__VA_ARGS__)
#endif
void
mono_debugger_state (JsonWriter *writer);
char *
mono_debugger_state_str (void);
#endif // __MONO_DEBUGGER_STATE_MACHINE__