Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0-preview7] [debugger] Export mono_debugger_agent_unhandled_exception to avoid usage of Debugger.Mono_UnhandledException #56071

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mono/mono/metadata/debug-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ MONO_API char* mono_method_get_reflection_name (MonoMethod *method);

MONO_API char* mono_field_full_name (MonoClassField *field);

MONO_API MONO_RT_EXTERNAL_ONLY void
mono_debugger_agent_unhandled_exception (MonoException *e);

MONO_END_DECLS

#endif /* __MONO_DEBUG_HELPERS_H__ */
Expand Down
9 changes: 9 additions & 0 deletions src/mono/mono/mini/debugger-agent-external.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <glib.h>
#include <mono/metadata/components.h>
#include "debugger-agent-external.h"
#include <mono/metadata/external-only.h>

#ifndef DISABLE_SDB

Expand Down Expand Up @@ -59,4 +60,12 @@ mono_debugger_agent_get_sdb_options (void)
{
return sdb_options;
}

void
mono_debugger_agent_unhandled_exception (MonoException *e)
{
MONO_ENTER_GC_UNSAFE;
MONO_EXTERNAL_ONLY_VOID (mono_component_debugger ()->unhandled_exception (e));
MONO_EXIT_GC_UNSAFE;
}
#endif /* DISABLE_SDB */
5 changes: 0 additions & 5 deletions src/mono/mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -4607,11 +4607,6 @@ register_icalls (void)
mono_add_internal_call_internal ("Mono.Runtime::mono_runtime_install_handlers",
mono_runtime_install_handlers);

#if defined(HOST_ANDROID) || defined(TARGET_ANDROID)
mono_add_internal_call_internal ("System.Diagnostics.Debugger::Mono_UnhandledException_internal",
mono_component_debugger ()->unhandled_exception);
#endif

/*
* It's important that we pass `TRUE` as the last argument here, as
* it causes the JIT to omit a wrapper for these icalls. If the JIT
Expand Down