Commit 2db45f1
authored
Implement out-of-process SetThreadContext support for debugger detach (#118849)
* Implement out-of-process detach support
* Fix build break
* Handle early process termination during detach in out-of-process debugging
* Track active controller ref count for detach through DebuggerController creation and desctruction and DispatchPatchOrSingleStep
* Continuously track active dispatched exceptions and flares sent
* Revert "Continuously track active dispatched exceptions and flares sent"
This reverts commit dd6d28c.
* Revert "Track active controller ref count for detach through DebuggerController creation and desctruction and DispatchPatchOrSingleStep"
This reverts commit 367c638.
* Revert "Fix build break"
This reverts commit 240b372.
* Revert "Implement out-of-process detach support"
This reverts commit d80b6c4.
* Out-of-process detach support for CET
Debugger events are tracked out of process to determine which threads have outstanding SetThreadContextNeeded flares
* Remove unused enum
* Break out of detach if timed out or process exited
* Add ClearSetIP to SetThreadContextNeeded event,
Refactor HandleSetThreadContextNeeded for improved readability
* Handle case when out of process setthreadcontext is oped-out but available on the platform
* PR feedback on code comment1 parent 532169b commit 2db45f1
File tree
8 files changed
+579
-192
lines changed- src/coreclr
- debug
- di
- ee
- vm
8 files changed
+579
-192
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2920 | 2920 | | |
2921 | 2921 | | |
2922 | 2922 | | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
2927 | 2931 | | |
2928 | 2932 | | |
2929 | 2933 | | |
| |||
2937 | 2941 | | |
2938 | 2942 | | |
2939 | 2943 | | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
2940 | 2952 | | |
2941 | 2953 | | |
2942 | 2954 | | |
| |||
3316 | 3328 | | |
3317 | 3329 | | |
3318 | 3330 | | |
3319 | | - | |
| 3331 | + | |
3320 | 3332 | | |
| 3333 | + | |
3321 | 3334 | | |
3322 | 3335 | | |
3323 | 3336 | | |
| |||
4151 | 4164 | | |
4152 | 4165 | | |
4153 | 4166 | | |
| 4167 | + | |
| 4168 | + | |
4154 | 4169 | | |
4155 | 4170 | | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
| 4174 | + | |
| 4175 | + | |
4156 | 4176 | | |
4157 | 4177 | | |
4158 | 4178 | | |
| |||
10160 | 10180 | | |
10161 | 10181 | | |
10162 | 10182 | | |
| 10183 | + | |
| 10184 | + | |
| 10185 | + | |
| 10186 | + | |
10163 | 10187 | | |
10164 | 10188 | | |
10165 | 10189 | | |
| |||
10211 | 10235 | | |
10212 | 10236 | | |
10213 | 10237 | | |
| 10238 | + | |
| 10239 | + | |
| 10240 | + | |
| 10241 | + | |
10214 | 10242 | | |
10215 | 10243 | | |
10216 | 10244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
1157 | | - | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1158 | 1160 | | |
1159 | 1161 | | |
1160 | 1162 | | |
| |||
1216 | 1218 | | |
1217 | 1219 | | |
1218 | 1220 | | |
1219 | | - | |
| 1221 | + | |
1220 | 1222 | | |
1221 | 1223 | | |
| 1224 | + | |
1222 | 1225 | | |
1223 | 1226 | | |
1224 | 1227 | | |
| |||
4466 | 4469 | | |
4467 | 4470 | | |
4468 | 4471 | | |
4469 | | - | |
| 4472 | + | |
4470 | 4473 | | |
4471 | | - | |
| 4474 | + | |
4472 | 4475 | | |
4473 | 4476 | | |
4474 | 4477 | | |
| |||
4574 | 4577 | | |
4575 | 4578 | | |
4576 | 4579 | | |
| 4580 | + | |
4577 | 4581 | | |
4578 | 4582 | | |
4579 | 4583 | | |
4580 | 4584 | | |
4581 | 4585 | | |
4582 | 4586 | | |
| 4587 | + | |
4583 | 4588 | | |
4584 | 4589 | | |
4585 | 4590 | | |
| |||
4773 | 4778 | | |
4774 | 4779 | | |
4775 | 4780 | | |
4776 | | - | |
| 4781 | + | |
4777 | 4782 | | |
4778 | 4783 | | |
4779 | 4784 | | |
| |||
4792 | 4797 | | |
4793 | 4798 | | |
4794 | 4799 | | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
4795 | 4809 | | |
4796 | 4810 | | |
4797 | 4811 | | |
| |||
4806 | 4820 | | |
4807 | 4821 | | |
4808 | 4822 | | |
| 4823 | + | |
| 4824 | + | |
4809 | 4825 | | |
4810 | 4826 | | |
4811 | 4827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
| |||
1525 | 1525 | | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | | - | |
| 1528 | + | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | 1531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5451 | 5451 | | |
5452 | 5452 | | |
5453 | 5453 | | |
| 5454 | + | |
| 5455 | + | |
| 5456 | + | |
| 5457 | + | |
| 5458 | + | |
| 5459 | + | |
| 5460 | + | |
| 5461 | + | |
5454 | 5462 | | |
5455 | 5463 | | |
5456 | 5464 | | |
| |||
5473 | 5481 | | |
5474 | 5482 | | |
5475 | 5483 | | |
5476 | | - | |
| 5484 | + | |
| 5485 | + | |
| 5486 | + | |
| 5487 | + | |
| 5488 | + | |
5477 | 5489 | | |
5478 | | - | |
5479 | | - | |
5480 | | - | |
| 5490 | + | |
| 5491 | + | |
| 5492 | + | |
5481 | 5493 | | |
5482 | 5494 | | |
5483 | 5495 | | |
| |||
16168 | 16180 | | |
16169 | 16181 | | |
16170 | 16182 | | |
16171 | | - | |
| 16183 | + | |
16172 | 16184 | | |
16173 | 16185 | | |
16174 | 16186 | | |
| |||
16223 | 16235 | | |
16224 | 16236 | | |
16225 | 16237 | | |
16226 | | - | |
| 16238 | + | |
16227 | 16239 | | |
16228 | 16240 | | |
16229 | | - | |
| 16241 | + | |
| 16242 | + | |
| 16243 | + | |
| 16244 | + | |
| 16245 | + | |
| 16246 | + | |
| 16247 | + | |
| 16248 | + | |
| 16249 | + | |
| 16250 | + | |
| 16251 | + | |
16230 | 16252 | | |
16231 | 16253 | | |
16232 | 16254 | | |
| |||
16237 | 16259 | | |
16238 | 16260 | | |
16239 | 16261 | | |
16240 | | - | |
| 16262 | + | |
16241 | 16263 | | |
16242 | 16264 | | |
16243 | 16265 | | |
16244 | 16266 | | |
16245 | 16267 | | |
16246 | 16268 | | |
16247 | 16269 | | |
16248 | | - | |
| 16270 | + | |
16249 | 16271 | | |
16250 | 16272 | | |
16251 | 16273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
| 1867 | + | |
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
| |||
3025 | 3025 | | |
3026 | 3026 | | |
3027 | 3027 | | |
3028 | | - | |
| 3028 | + | |
3029 | 3029 | | |
3030 | 3030 | | |
3031 | 3031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3561 | 3561 | | |
3562 | 3562 | | |
3563 | 3563 | | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
3564 | 3570 | | |
3565 | 3571 | | |
3566 | 3572 | | |
| |||
0 commit comments