5 * Zoltan Varga (vargaz@gmail.com)
7 * Copyright 2009-2010 Novell, Inc.
8 * Copyright 2011 Xamarin Inc.
9 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
14 #include "mini-runtime.h"
15 #include "debugger-agent.h"
18 stub_debugger_agent_parse_options (char *options
)
20 g_error ("This runtime is configured with the debugger agent disabled.");
24 stub_debugger_agent_init (void)
29 stub_debugger_agent_breakpoint_hit (void *sigctx
)
34 stub_debugger_agent_single_step_event (void *sigctx
)
39 stub_debugger_agent_free_domain_info (MonoDomain
*domain
)
44 stub_debugger_agent_handle_exception (MonoException
*exc
, MonoContext
*throw_ctx
,
45 MonoContext
*catch_ctx
, StackFrameInfo
*catch_frame
)
50 stub_debugger_agent_begin_exception_filter (MonoException
*exc
, MonoContext
*ctx
, MonoContext
*orig_ctx
)
55 stub_debugger_agent_end_exception_filter (MonoException
*exc
, MonoContext
*ctx
, MonoContext
*orig_ctx
)
60 stub_debugger_agent_user_break (void)
66 stub_debugger_agent_debug_log (int level
, MonoStringHandle category
, MonoStringHandle message
)
71 stub_debugger_agent_debug_log_is_enabled (void)
77 stub_debugger_agent_unhandled_exception (MonoException
*exc
)
79 g_assert_not_reached ();
83 stub_debugger_agent_single_step_from_context (MonoContext
*ctx
)
85 g_assert_not_reached ();
89 stub_debugger_agent_breakpoint_from_context (MonoContext
*ctx
)
91 g_assert_not_reached ();
95 stub_debugger_agent_send_crash (char *json_dump
, MonoStackHash
*hashes
, int pause
)
100 mono_debugger_agent_stub_init (void)
102 MonoDebuggerCallbacks cbs
;
104 memset (&cbs
, 0, sizeof (MonoDebuggerCallbacks
));
105 cbs
.version
= MONO_DBG_CALLBACKS_VERSION
;
106 cbs
.parse_options
= stub_debugger_agent_parse_options
;
107 cbs
.init
= stub_debugger_agent_init
;
108 cbs
.breakpoint_hit
= stub_debugger_agent_breakpoint_hit
;
109 cbs
.single_step_event
= stub_debugger_agent_single_step_event
;
110 cbs
.single_step_from_context
= stub_debugger_agent_single_step_from_context
;
111 cbs
.breakpoint_from_context
= stub_debugger_agent_breakpoint_from_context
;
112 cbs
.free_domain_info
= stub_debugger_agent_free_domain_info
;
113 cbs
.unhandled_exception
= stub_debugger_agent_unhandled_exception
;
114 cbs
.handle_exception
= stub_debugger_agent_handle_exception
;
115 cbs
.begin_exception_filter
= stub_debugger_agent_begin_exception_filter
;
116 cbs
.end_exception_filter
= stub_debugger_agent_end_exception_filter
;
117 cbs
.user_break
= stub_debugger_agent_user_break
;
118 cbs
.debug_log
= stub_debugger_agent_debug_log
;
119 cbs
.debug_log_is_enabled
= stub_debugger_agent_debug_log_is_enabled
;
120 cbs
.send_crash
= stub_debugger_agent_send_crash
;
122 mini_install_dbg_callbacks (&cbs
);