File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env expect
2
+ source "common.tcl"
3
+
4
+ expect "Break on * main in ${test_file}:8"
5
+ expect "${test_file}:8 vdbg> "
6
+ send "p st\n"
7
+ expect "st = AStruct{\r\n a: 1\r\n} (main.AStruct)"
8
+ expect "${test_file}:8 vdbg> "
9
+ send "q\n"
10
+ expect eof
Original file line number Diff line number Diff line change
1
+ @[heap]
2
+ struct AStruct {
3
+ a int
4
+ }
5
+
6
+ fn main() {
7
+ st := AStruct{1}
8
+ $dbg;
9
+ dump(st)
10
+ }
Original file line number Diff line number Diff line change @@ -4527,6 +4527,8 @@ fn (mut g Gen) debugger_stmt(node ast.DebuggerStmt) {
4527
4527
'&'
4528
4528
} else if ! str_method_expects_ptr && obj.typ.is_ptr () {
4529
4529
'*' .repeat (obj.typ.nr_muls ())
4530
+ } else if ! str_method_expects_ptr && obj_sym.is_heap () {
4531
+ '*'
4530
4532
} else if obj.is_auto_heap && var_typ.is_ptr () && str_method_expects_ptr {
4531
4533
'*'
4532
4534
} else if ! obj.is_auto_heap && var_typ.is_ptr () && str_method_expects_ptr {
You can’t perform that action at this time.
0 commit comments