delve/service/dap
Derek Parker f6681c6090
pkg/proc: Prefer throw instead of fatalthrow (#2616)
* pkg/proc: Prefer throw instead of fatalthrow

Currently there is a breakpoint set at runtime.fatalthrow to catch any
situation where the runtime crashes (e.g. deadlock).
When we do this, we go up a frame in order to parse the crash reason.
The problem is that there is no guarentee the "s" variable we attempt to
parse will still be considered "live".
Since runtime.fatalthrow is never called directly, set a breakpoint on
runtime.throw instead and prevent having
to search up a stack frame in order to
get the throw reason.

Fixes #2602

* service/dap: Fix TestFatalThrowBreakpoint

* Reenable TestFatalThrow DAP test

* service/dap: Don't skip test on < 1.17

* service/dap: Update test constraint for 1.16

* pkg/proc: Reinstate runtime.fatalthrow as switchstack exception
2021-07-27 23:58:02 -07:00
..
daptest service/dap: send continued event before step response (#2594) 2021-07-20 08:51:08 -07:00
error_ids.go dap: handle SetVariable requests (#2440) 2021-05-20 10:05:47 -07:00
handles.go service/dap: implement array, slice, and map paging (#2512) 2021-06-10 09:34:20 -07:00
server_test.go pkg/proc: Prefer throw instead of fatalthrow (#2616) 2021-07-27 23:58:02 -07:00
server.go pkg/proc: Prefer throw instead of fatalthrow (#2616) 2021-07-27 23:58:02 -07:00
utils.go service/dap: Support stackTrace request (#2093) 2020-07-01 11:01:17 -07:00