Commit d41eea4
[interp] Report async-suspension locals to the debugger via GetAsyncLocals
When a managed async method is suspended at an await, the right-side debugger asks the runtime for the live values of the user's locals and arguments at that suspension point so they can be displayed on the call stack. The JIT path supplies this through ICorJitInfo::reportAsyncDebugInfo, which the runtime stores in the standard DebugInfoStore and DacDbiInterfaceImpl::GetAsyncLocals reads back on the right side. The interpreter compiler never participated in this pipeline, so ICorDebugAsyncFrame::GetArgument and GetLocalVariableEx returned CORDBG_E_IL_VAR_NOT_AVAILABLE for every IL variable on every interpreted async frame.
This adds a small parallel pipeline for the interpreter. InterpAsyncSuspendData now carries a per-suspension-point table of {ilVarNum, dataOffset} entries, populated from EmitAsyncSuspensionPoint as it lays out which IL vars are kept live across the suspension. On the DAC side, GetAsyncLocals detects an interpreter method via pMethodDesc->GetInterpreterCode(), treats the incoming state as a byte offset from InterpByteCodeStart (the existing interpreter encoding for INTOP_HANDLE_CONTINUATION_RESUME), decodes the bytecode at startIp + state, expects INTOP_HANDLE_CONTINUATION_RESUME, and surfaces the matching InterpAsyncSuspendData::asyncDebugVars table. The JIT DebugInfoStore path is unchanged.
This fixes the following interpreter debugger test failures:
- Async.AsyncSimple
- Async.AsyncBreakpoint
- Async.AsyncBreakpointJmc
- Async.AsyncGeneric
- Async.AsyncRecursive
- Async.AsyncSharedGeneric
- Async.AsyncV2CallingAsyncV1Iterator
- Async.AsyncGenericStepInto
Three sibling tests (Async.AsyncStepIntoThunk, Async.AsyncStepIntoSync, Async.AsyncGenericStepIntoThunk) still fail. They need interp-aware async-thunk-skip support in DebuggerStepper / InterpreterStepHelper::SetupStep, which is independent of the async debug info plumbing addressed here.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 40365cd commit d41eea4
3 files changed
Lines changed: 106 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
7771 | 7775 | | |
7772 | 7776 | | |
7773 | 7777 | | |
| 7778 | + | |
| 7779 | + | |
| 7780 | + | |
| 7781 | + | |
| 7782 | + | |
| 7783 | + | |
| 7784 | + | |
| 7785 | + | |
| 7786 | + | |
| 7787 | + | |
| 7788 | + | |
| 7789 | + | |
| 7790 | + | |
| 7791 | + | |
| 7792 | + | |
| 7793 | + | |
| 7794 | + | |
| 7795 | + | |
| 7796 | + | |
| 7797 | + | |
| 7798 | + | |
| 7799 | + | |
| 7800 | + | |
| 7801 | + | |
| 7802 | + | |
| 7803 | + | |
| 7804 | + | |
| 7805 | + | |
| 7806 | + | |
| 7807 | + | |
| 7808 | + | |
| 7809 | + | |
| 7810 | + | |
| 7811 | + | |
| 7812 | + | |
| 7813 | + | |
| 7814 | + | |
| 7815 | + | |
| 7816 | + | |
| 7817 | + | |
| 7818 | + | |
| 7819 | + | |
| 7820 | + | |
| 7821 | + | |
7774 | 7822 | | |
7775 | 7823 | | |
7776 | 7824 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1909 | 1909 | | |
1910 | 1910 | | |
1911 | 1911 | | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1912 | 1923 | | |
1913 | 1924 | | |
1914 | 1925 | | |
| |||
2028 | 2039 | | |
2029 | 2040 | | |
2030 | 2041 | | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
2031 | 2059 | | |
2032 | 2060 | | |
2033 | 2061 | | |
| |||
5783 | 5811 | | |
5784 | 5812 | | |
5785 | 5813 | | |
| 5814 | + | |
5786 | 5815 | | |
5787 | 5816 | | |
5788 | 5817 | | |
| |||
5935 | 5964 | | |
5936 | 5965 | | |
5937 | 5966 | | |
| 5967 | + | |
| 5968 | + | |
| 5969 | + | |
| 5970 | + | |
| 5971 | + | |
| 5972 | + | |
| 5973 | + | |
| 5974 | + | |
5938 | 5975 | | |
5939 | 5976 | | |
5940 | 5977 | | |
| |||
6015 | 6052 | | |
6016 | 6053 | | |
6017 | 6054 | | |
| 6055 | + | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
| 6064 | + | |
| 6065 | + | |
| 6066 | + | |
6018 | 6067 | | |
6019 | 6068 | | |
6020 | 6069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
0 commit comments