delve/_fixtures/amend_breakpoint.star
Alessandro Arzilli 698f838616
terminal/starbind: allow modification of structs returned by API (#3872)
Structs returned to starlark scripts by API calls were immutable, this
made amend_breakpoint nearly impossible to use since its argument must
be a api.Breakpoint struct which the caller has received from
get_breakpoint and modified.
2024-12-04 19:09:59 -08:00

7 lines
166 B
Plaintext

bp = get_breakpoint(0, "afuncbreak").Breakpoint
bp.Stacktrace = 2
bp.HitCond = "== 2"
amend_breakpoint(bp)
bp2 = get_breakpoint(0, "afuncbreak").Breakpoint
print(bp)