[wasm][debug] Change stack value order in stack scope
This patch changes the order in which stack values are shown in the stack scope. As a result, changes to the stack show up at the end of the stack. Bug: chromium:1043034 Change-Id: I735fc29d3957b6484589554ce046114e1b7bd9e3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122987 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/master@{#66884}
This commit is contained in:
parent
a1d2e34260
commit
a07dd51079
@ -449,7 +449,7 @@ class InterpreterHandle {
|
||||
Handle<JSObject> stack_scope_obj =
|
||||
isolate_->factory()->NewJSObjectWithNullProto();
|
||||
for (int i = 0; i < stack_count; ++i) {
|
||||
WasmValue value = frame->GetStackValue(stack_count - i - 1);
|
||||
WasmValue value = frame->GetStackValue(i);
|
||||
Handle<Object> value_obj = WasmValueToValueObject(isolate_, value);
|
||||
JSObject::AddDataElement(stack_scope_obj, static_cast<uint32_t>(i),
|
||||
value_obj, NONE);
|
||||
@ -661,13 +661,12 @@ class DebugInfoImpl {
|
||||
// which does not make too much sense here.
|
||||
int num_locals = static_cast<int>(debug_side_table->num_locals());
|
||||
int value_count = debug_side_table_entry->num_values();
|
||||
int stack_count = value_count - num_locals;
|
||||
for (int i = 0; i < stack_count; ++i) {
|
||||
WasmValue value = GetValue(debug_side_table_entry, value_count - i - 1,
|
||||
fp, debug_break_fp);
|
||||
for (int i = num_locals; i < value_count; ++i) {
|
||||
WasmValue value = GetValue(debug_side_table_entry, i, fp, debug_break_fp);
|
||||
Handle<Object> value_obj = WasmValueToValueObject(isolate, value);
|
||||
JSObject::AddDataElement(stack_scope_obj, static_cast<uint32_t>(i),
|
||||
value_obj, NONE);
|
||||
JSObject::AddDataElement(stack_scope_obj,
|
||||
static_cast<uint32_t>(i - num_locals), value_obj,
|
||||
NONE);
|
||||
}
|
||||
return stack_scope_obj;
|
||||
}
|
||||
|
@ -255,8 +255,8 @@ at func (0:108):
|
||||
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
|
||||
stack: "0": 1 (number), "1": 7 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 7 (number)
|
||||
1: 1 (number)
|
||||
0: 1 (number)
|
||||
1: 7 (number)
|
||||
at call_func (0:58):
|
||||
- scope (global):
|
||||
globals: "global0": 0 (number)
|
||||
@ -278,8 +278,8 @@ at func (0:109):
|
||||
locals: "0": 0 (number), "i32Arg": 11 (number), "var1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
|
||||
stack: "0": 1 (number), "1": 7 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 7 (number)
|
||||
1: 1 (number)
|
||||
0: 1 (number)
|
||||
1: 7 (number)
|
||||
at call_func (0:58):
|
||||
- scope (global):
|
||||
globals: "global0": 0 (number)
|
||||
|
@ -26,8 +26,8 @@ at B (liftoff) (0:76):
|
||||
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number)
|
||||
stack: "0": 42 (number), "1": 3 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 3 (number)
|
||||
1: 42 (number)
|
||||
0: 42 (number)
|
||||
1: 3 (number)
|
||||
at A (liftoff) (0:54):
|
||||
- scope (global):
|
||||
globals: "global0": 0 (number)
|
||||
@ -57,8 +57,8 @@ at B (liftoff) (0:76):
|
||||
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number)
|
||||
stack: "0": 42 (number), "1": 3 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 3 (number)
|
||||
1: 42 (number)
|
||||
0: 42 (number)
|
||||
1: 3 (number)
|
||||
at A (liftoff) (0:54):
|
||||
- scope (global):
|
||||
globals: "global0": 0 (number)
|
||||
@ -87,8 +87,8 @@ at B (liftoff) (0:76):
|
||||
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number)
|
||||
stack: "0": 42 (number), "1": 3 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 3 (number)
|
||||
1: 42 (number)
|
||||
0: 42 (number)
|
||||
1: 3 (number)
|
||||
at A (liftoff) (0:54):
|
||||
- scope (global):
|
||||
globals: "global0": 42 (number)
|
||||
@ -118,8 +118,8 @@ at B (liftoff) (0:76):
|
||||
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number)
|
||||
stack: "0": 42 (number), "1": 3 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 3 (number)
|
||||
1: 42 (number)
|
||||
0: 42 (number)
|
||||
1: 3 (number)
|
||||
at A (liftoff) (0:54):
|
||||
- scope (global):
|
||||
globals: "global0": 42 (number)
|
||||
@ -148,8 +148,8 @@ at B (liftoff) (0:76):
|
||||
locals: "0": 0 (number), "i32_arg": 42 (number), "i32_local": 0 (number), "f32_local": 7.199999809265137 (number), "var5": 0 (number)
|
||||
stack: "0": 42 (number), "1": 3 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 3 (number)
|
||||
1: 42 (number)
|
||||
0: 42 (number)
|
||||
1: 3 (number)
|
||||
at A (liftoff) (0:54):
|
||||
- scope (global):
|
||||
globals: "global0": 42 (number)
|
||||
|
@ -99,8 +99,8 @@ at wasm_B (0:53):
|
||||
locals: "var0": 3 (number)
|
||||
stack: "0": 3 (number), "1": 1 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 1 (number)
|
||||
1: 3 (number)
|
||||
0: 3 (number)
|
||||
1: 1 (number)
|
||||
at (anonymous) (0:17):
|
||||
-- skipped
|
||||
Paused:
|
||||
@ -202,8 +202,8 @@ at wasm_B (0:53):
|
||||
locals: "var0": 2 (number)
|
||||
stack: "0": 2 (number), "1": 1 (number)
|
||||
- scope (wasm-expression-stack):
|
||||
0: 1 (number)
|
||||
1: 2 (number)
|
||||
0: 2 (number)
|
||||
1: 1 (number)
|
||||
at (anonymous) (0:17):
|
||||
-- skipped
|
||||
Paused:
|
||||
|
Loading…
Reference in New Issue
Block a user