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] [wasm][debugger] Protecting send message to debugger if it's disabled #62210

Merged
merged 1 commit into from
Dec 15, 2021
Merged
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
12 changes: 12 additions & 0 deletions src/mono/mono/component/mini-wasm-debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ mono_wasm_set_is_debugger_attached (gboolean is_attached)
EMSCRIPTEN_KEEPALIVE gboolean
mono_wasm_send_dbg_command_with_parms (int id, MdbgProtCommandSet command_set, int command, guint8* data, unsigned int size, int valtype, char* newvalue)
{
if (!debugger_enabled) {
EM_ASM ({
MONO.mono_wasm_add_dbg_command_received ($0, $1, $2, $3);
}, 0, id, 0, 0);
return TRUE;
}
MdbgProtBuffer bufWithParms;
buffer_init (&bufWithParms, 128);
m_dbgprot_buffer_add_data (&bufWithParms, data, size);
Expand All @@ -387,6 +393,12 @@ mono_wasm_send_dbg_command_with_parms (int id, MdbgProtCommandSet command_set, i
EMSCRIPTEN_KEEPALIVE gboolean
mono_wasm_send_dbg_command (int id, MdbgProtCommandSet command_set, int command, guint8* data, unsigned int size)
{
if (!debugger_enabled) {
EM_ASM ({
MONO.mono_wasm_add_dbg_command_received ($0, $1, $2, $3);
}, 0, id, 0, 0);
return TRUE;
}
ss_calculate_framecount (NULL, NULL, TRUE, NULL, NULL);
MdbgProtBuffer buf;
buffer_init (&buf, 128);
Expand Down