Commit 1d02af4
Adjust interpreter debugger IL mapping (#127469)
When the debugger walks the stack, interpreter frames sometimes report
incorrect source line due to IL -> native mapping differences compared
to how the JIT generates mappings. To better align interpreter debug
output with how the debugger maps line numbers:
1. The current model generates more mapping IL->native data than we
need. Only emit sequence points on IL stack empty points and `nop`
instructions.
2. When stackwalking, the return address points to the instruction after
the 'call' instruction. The interpreter eliminates certain IL
instructions from the input stream, sometimes causing the next IL
instruction to be mapped to the next line number. To address this, 1)
when the IL code is built in debug mode, and 2) if an IL instruction is
eliminated immediately after a call instruction, we will insert a `nop`
IL instruction in its place.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0b6bb45 commit 1d02af4
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1058 | 1060 | | |
1059 | 1061 | | |
1060 | 1062 | | |
| |||
1076 | 1078 | | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | | - | |
| 1081 | + | |
1080 | 1082 | | |
1081 | 1083 | | |
1082 | 1084 | | |
| |||
1120 | 1122 | | |
1121 | 1123 | | |
1122 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1123 | 1133 | | |
1124 | 1134 | | |
1125 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2104 | 2104 | | |
2105 | 2105 | | |
2106 | 2106 | | |
| 2107 | + | |
2107 | 2108 | | |
2108 | 2109 | | |
2109 | 2110 | | |
| |||
0 commit comments