Commit b6026116 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm][debug] Remove breakpoints from native code

DebugInfo::RemoveBreakpoint was never called. Call it in
WasmScript::ClearBreakPoint to remove the breakpoint from the list and
recompile the function.

R=clemensb@chromium.org

Bug: v8:10147
Change-Id: I0d11bdab102eeacc2a5f9ae9b4a20e8c900b26f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351665Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69355}
parent 9f26032c
...@@ -1075,6 +1075,14 @@ bool WasmScript::ClearBreakPoint(Handle<Script> script, int position, ...@@ -1075,6 +1075,14 @@ bool WasmScript::ClearBreakPoint(Handle<Script> script, int position,
// Make sure last array element is empty as a result. // Make sure last array element is empty as a result.
breakpoint_infos->set_undefined(breakpoint_infos->length() - 1); breakpoint_infos->set_undefined(breakpoint_infos->length() - 1);
} }
// Remove the breakpoint from DebugInfo and recompile.
wasm::NativeModule* native_module = script->wasm_native_module();
const wasm::WasmModule* module = native_module->module();
int func_index = GetContainingWasmFunction(module, position);
native_module->GetDebugInfo()->RemoveBreakpoint(func_index, position,
isolate);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment