Merge pull request #799 from kebby/master
[mono.git] / mono / mini / debug-mini.h
1 #ifndef __DEBUG_MINI_H__
2 #define __DEBUG_MINI_H__
3
4 #include <mono/metadata/class-internals.h>
5 #include <mono/metadata/mono-debug-debugger.h>
6
7 #include "mini.h"
8
9 typedef struct _MonoDebuggerThreadInfo MonoDebuggerThreadInfo;
10 extern MonoDebuggerThreadInfo *mono_debugger_thread_table;
11
12 MONO_API void
13 mono_debugger_thread_created (gsize tid, MonoThread *thread, MonoJitTlsData *jit_tls, gpointer func);
14
15 MONO_API void
16 mono_debugger_thread_cleanup (MonoJitTlsData *jit_tls);
17
18 MONO_API void
19 mono_debugger_extended_notification (MonoDebuggerEvent event, guint64 data, guint64 arg);
20
21 MONO_API void
22 mono_debugger_trampoline_compiled (const guint8 *trampoline, MonoMethod *method, const guint8 *code);
23
24 MONO_API void
25 mono_debugger_call_exception_handler (gpointer addr, gpointer stack, MonoObject *exc);
26
27 MONO_API gboolean
28 mono_debugger_handle_exception (MonoContext *ctx, MonoObject *obj);
29
30 MONO_API MonoObject *
31 mono_debugger_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc);
32
33 MONO_API gboolean
34 mono_debugger_abort_runtime_invoke (void);
35
36 /*
37  * Internal exception API.
38  */
39
40 typedef enum {
41         MONO_DEBUGGER_EXCEPTION_ACTION_NONE             = 0,
42         MONO_DEBUGGER_EXCEPTION_ACTION_STOP             = 1,
43         MONO_DEBUGGER_EXCEPTION_ACTION_STOP_UNHANDLED   = 2
44 } MonoDebuggerExceptionAction;
45
46 MonoDebuggerExceptionAction
47 _mono_debugger_throw_exception (gpointer addr, gpointer stack, MonoObject *exc);
48
49 gboolean
50 _mono_debugger_unhandled_exception (gpointer addr, gpointer stack, MonoObject *exc);
51
52 /*
53  * This is the old breakpoint interface.
54  * It isn't used by the debugger anymore, but still when using the `--break' command
55  * line argument.
56  */
57
58 int             mono_debugger_insert_breakpoint_full      (MonoMethodDesc *desc);
59 int             mono_debugger_remove_breakpoint           (int breakpoint_id);
60 void            mono_debugger_breakpoint_callback         (MonoMethod *method, guint32 idx);
61
62 #endif