New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 837572 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 893069


Participants' hotlists:
Wasm-Debugging


Sign in to add a comment

Breakpoints in WASM code cannot be removed

Project Member Reported by herhut@chromium.org, Apr 27 2018

Issue description

Chrome Version: 68.0.3411.0 (Developer Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) load any page that contains wasm code
(2) set a couple breakpoints in the wasm code and remove some again 
(3) reload the page

What is the expected result?

The debugger should only stop at breakpoints that are still visible in the UI.

What happens instead?

The debugger will also stop at breakpoints that have already been removed.

 
Labels: -Pri-3 Pri-2
Status: Available (was: Untriaged)

Comment 2 by kozy@chromium.org, Jun 11 2018

Owner: kozy@chromium.org
Status: Assigned (was: Available)
Owner: clemensh@chromium.org
Unfortunately, RemoveBreakpoint is not implemented on WASM side. Clemens, could you take a look?
Cc: kozy@chromium.org
Cc: aseemgarg@chromium.org
Cc: kainino@chromium.org
This issue was reported separately to me too. Steps to reproduce:

- Open https://yurydelendik.github.io/wasm-source-map-emscripten/pi.html
- Place a breakpoint on pi.cpp:16: buf[i] = '0' + pi.digits[i - 1];
- Reload page, wait for break on pi.cpp:16. (BTW, it takes a long time to reach this point.)
- Remove the breakpoint
- Click "Resume"

Observe that dev tools keeps breaking on pi.cpp:16 repeatedly (for each loop iteration, I think). It should finish execution instead.

Works as expected in Firefox Developer Edition 63.0b9.

v8::internal::Debug::RemoveBreakpoint [1] should be able to remove breakpoint from wasm modules, currently it can remove them only from scripts.
Something opposite to WasmModuleObject::SetBreakpoint [2] should be implemented.


[1] https://cs.chromium.org/chromium/src/v8/src/debug/debug.cc?rcl=573561bf18181e6a08b8db00576dcb8adc969800&l=759
[2] https://cs.chromium.org/chromium/src/v8/src/debug/debug.cc?rcl=573561bf18181e6a08b8db00576dcb8adc969800&l=623
Yeah, I remember that back when I implemented this (~2 years back) it was not necessary to remove them because somewhere in a breakpoint-wrapper-js-object it was remembered that this breakpoint was removed, so any subsequent hit was just ignored. I think it was implemented similarly for JavaScript.

Since this obviously changed since then, I will have another look and add a new inspector test for that.
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 10

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/7074113d7e0538172d11a0ba3eba53e0a68d6521

commit 7074113d7e0538172d11a0ba3eba53e0a68d6521
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Wed Oct 10 10:24:32 2018

[wasm][test] Refactor breakpoint inspector test

Before adding another test for removing breakpoint, this CL modernizes
the existing test for setting breakpoints.

R=kozy@chromium.org
CC=ahaas@chromium.org

Bug: chromium:837572
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I642f9673f327f4ec569a4f67a61b5e264cf25b8f
Reviewed-on: https://chromium-review.googlesource.com/c/1264636
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56514}
[modify] https://crrev.com/7074113d7e0538172d11a0ba3eba53e0a68d6521/test/inspector/debugger/wasm-set-breakpoint-expected.txt
[modify] https://crrev.com/7074113d7e0538172d11a0ba3eba53e0a68d6521/test/inspector/debugger/wasm-set-breakpoint.js

Clemens, can you give an update on this issue?
Blockedon: 893069
Cc: clemensh@chromium.org
Owner: ----
Status: Available (was: Assigned)
This is blocked on a reorganization of how and where we store breakpoint information. It is currently per instance, which is wrong and makes it impossible to find them later from the breakpoint id alone.
Components: -Platform>DevTools>JavaScript

Sign in to add a comment