wasm-step-after-trap-expected.txt 1.12 KB
Newer Older
1
Test scope inspection and stepping after a trap.
2 3

Running test: test
4 5 6 7
Instantiating.
Calling div function.
Paused at:
--- 0 ---
8
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
9
scope at $div (0:46):
10 11 12 13 14
   $a: 1 (i32)
   $b: 0 (i32)
   $unused: 4711 (i32)
   $local_zero: 0 (i32)
   $local_const_11: 11 (i32)
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
--- 1 ---
  try {
    instance.exports.#div(1, 0, 4711);  // traps (div by zero)
  } catch (e) {

--- 2 ---
#call_div()

-------------
-> stepInto
Paused at:
--- 0 ---
  } catch (e) {
    #e.stack;  // step target of first pause
  }

--- 1 ---
#call_div()

-------------
-> resume
Paused at:
--- 0 ---
38
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
39
scope at $div (0:46):
40 41 42 43 44
   $a: -2147483648 (i32)
   $b: -1 (i32)
   $unused: 4711 (i32)
   $local_zero: 0 (i32)
   $local_const_11: 11 (i32)
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
--- 1 ---
  try {
    instance.exports.#div(0x80000000, -1, 4711);  // traps (unrepresentable)
  } catch (e) {

--- 2 ---
#call_div()

-------------
-> stepInto
Paused at:
--- 0 ---
  } catch (e) {
    #e.stack;  // step target of second pause
  }

--- 1 ---
#call_div()

-------------
-> resume