[netcore] Implement missing Bmi1/Bmi2 intrinsics (#16919)
[mono-project.git] / mono / mini / debugger-agent-stubs.c
blob43173ba4e9963a7d70138bc1774e931b0adfc20f
1 /* \file
2 * Soft Debugger stubs
4 * Author:
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.
12 #include <config.h>
14 #include "mini-runtime.h"
15 #include "debugger-agent.h"
17 static void
18 stub_debugger_agent_parse_options (char *options)
20 g_error ("This runtime is configured with the debugger agent disabled.");
23 static void
24 stub_debugger_agent_init (void)
28 static void
29 stub_debugger_agent_breakpoint_hit (void *sigctx)
33 static void
34 stub_debugger_agent_single_step_event (void *sigctx)
38 static void
39 stub_debugger_agent_free_domain_info (MonoDomain *domain)
43 static void
44 stub_debugger_agent_handle_exception (MonoException *exc, MonoContext *throw_ctx,
45 MonoContext *catch_ctx, StackFrameInfo *catch_frame)
49 static void
50 stub_debugger_agent_begin_exception_filter (MonoException *exc, MonoContext *ctx, MonoContext *orig_ctx)
54 static void
55 stub_debugger_agent_end_exception_filter (MonoException *exc, MonoContext *ctx, MonoContext *orig_ctx)
59 static void
60 stub_debugger_agent_user_break (void)
62 G_BREAKPOINT ();
65 static void
66 stub_debugger_agent_debug_log (int level, MonoStringHandle category, MonoStringHandle message)
70 static gboolean
71 stub_debugger_agent_debug_log_is_enabled (void)
73 return FALSE;
76 static void
77 stub_debugger_agent_unhandled_exception (MonoException *exc)
79 g_assert_not_reached ();
82 static void
83 stub_debugger_agent_single_step_from_context (MonoContext *ctx)
85 g_assert_not_reached ();
88 static void
89 stub_debugger_agent_breakpoint_from_context (MonoContext *ctx)
91 g_assert_not_reached ();
94 static void
95 stub_debugger_agent_send_crash (char *json_dump, MonoStackHash *hashes, int pause)
99 void
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);