Open Bug 1505398 Opened 6 years ago Updated 2 years ago

Debugger must show the wasm evaluation stack

Categories

(DevTools :: Debugger, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: lth, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

The wasm that's produced by current compilers and by Binaryen tends to be pretty "stacky", ie, to use the wasm evaluation stack actively and avoid local variables except when necessary; this to generate more compact wasm. Our debugger does a good job of displaying wasm variable state, but half of the action is in the wasm evaluation stack, and that is (so far as I can tell) not available from the debugger. This needs a solution if we expect people to be debugging raw wasm, and I expect that at least two groups will do that: (a) mozilla devs [see bug 1488515 for a reasonable example] and (b) compiler and tool developers.
Priority: -- → P3
Blocks: dbg-wasm
Priority: P3 → P5

I can't really emphasize enough how important wasm evaluation stack inspection will be for (a) outside developers who create programming languages that target wasm, some of whom will be crucial for wasm's eventual success, and (b) Firefox developers who fix bugs in the wasm implementation when wasm content starts showing up on the web in volume.

In my group P5 is a polite WONTFIX. Are we really not going to do anything to provide access to the wasm evaluation stack from the debugging tools?

Flags: needinfo?(jlaster)

I was triaging the debugger component last week and added all of the wasm related bugs I could find to bug 1550784. I'm not sure what the relative priority among the meta should be. I'm hoping Yury will be able to help us in the near future continue to make progress on the wasm related features.

Flags: needinfo?(jlaster)

Note that, for devtools to make progress on this, we'll need to add the raw capability to the Debugger API first. In fact, if we just expose the stack as a synthetic local in the Debugger.Frame/Environment, then I think it'll show up without any devtools changes.

(In reply to Luke Wagner [:luke] from comment #3)

Note that, for devtools to make progress on this, we'll need to add the raw capability to the Debugger API first. In fact, if we just expose the stack as a synthetic local in the Debugger.Frame/Environment, then I think it'll show up without any devtools changes.

What is the amount of work needed for the Debugger API work?

Honza

We'd need to expose the operand stack. Technically, the Debugger API might not need to change, but rather just expose the operand stack as locals (either as one stack local containing an array or one local per operand stack, say, named [0], [1], ...). In both cases, the devtools might not need to change at all to expose the info, but of course there might be a more ideal visualization.

Type: defect → enhancement
  • Recording of stack operands in baseline compiler
  • Add operandStack to frame
  • Add "stack" to environment
Attachment #9076977 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: