Commit adba54d
authored
[cdac] Make cDAC delegate to the DAC instead of the other way around (#108772)
- `SOSDacImpl` in cDAC implements all the interfaces implemented by `ClrDataAccess`
- `CLRDataCreateInstance` returns cDAC if it is enabled
- `cdac_reader_get_sos_interface` takes the legacy DAC implementation
- Legacy DAC no longer calls into cDAC for its `ISOSDac*` implementations
- cDAC delegates to legacy DAC (if it has one) for APIs it has not implemented and asserts that the results are the same for APIs it has implemented
Behavioural differences of note:
- Since asserts comparing results are in the cDAC instead of DAC now, they will come through as a fail fast with or without a debugger attached - as opposed to before, when they were silently ignored when a debugger was attached. The assert message will print to the debugger output (if attached) or OutputDebugString/syslog.
- If the cDAC implementation of an API errors, it does not fall back to calling the legacy DAC. I think this is reasonable given that we plan to put the ability to choose cDAC vs legacy DAC at a higher level. If cDAC implementation fails, it should fail and not try to hide it.
- `ClrDataAccess` lifetime is handled by cDAC (when enabled), so actual release is dependent on finalization of the COM object.
I ran the SOS tests in diagnostics repo against this change locally both with and without the cDAC enabled.1 parent 8a7fa48 commit adba54d
File tree
14 files changed
+1503
-947
lines changed- src
- coreclr/debug/daccess
- native/managed/cdacreader
- inc
- src
- Legacy
14 files changed
+1503
-947
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
| 89 | + | |
92 | 90 | | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5501 | 5501 | | |
5502 | 5502 | | |
5503 | 5503 | | |
5504 | | - | |
5505 | | - | |
5506 | | - | |
5507 | | - | |
5508 | | - | |
5509 | | - | |
5510 | | - | |
5511 | | - | |
5512 | | - | |
5513 | | - | |
5514 | | - | |
5515 | | - | |
5516 | | - | |
5517 | | - | |
5518 | | - | |
5519 | | - | |
5520 | | - | |
5521 | | - | |
5522 | | - | |
5523 | | - | |
5524 | | - | |
5525 | | - | |
5526 | | - | |
5527 | | - | |
5528 | | - | |
5529 | 5504 | | |
5530 | 5505 | | |
5531 | 5506 | | |
| |||
7146 | 7121 | | |
7147 | 7122 | | |
7148 | 7123 | | |
7149 | | - | |
7150 | 7124 | | |
7151 | | - | |
| 7125 | + | |
| 7126 | + | |
| 7127 | + | |
| 7128 | + | |
| 7129 | + | |
| 7130 | + | |
| 7131 | + | |
| 7132 | + | |
| 7133 | + | |
| 7134 | + | |
| 7135 | + | |
| 7136 | + | |
| 7137 | + | |
| 7138 | + | |
| 7139 | + | |
| 7140 | + | |
| 7141 | + | |
| 7142 | + | |
| 7143 | + | |
| 7144 | + | |
| 7145 | + | |
| 7146 | + | |
| 7147 | + | |
| 7148 | + | |
| 7149 | + | |
| 7150 | + | |
| 7151 | + | |
| 7152 | + | |
| 7153 | + | |
| 7154 | + | |
| 7155 | + | |
| 7156 | + | |
| 7157 | + | |
| 7158 | + | |
| 7159 | + | |
| 7160 | + | |
| 7161 | + | |
| 7162 | + | |
| 7163 | + | |
| 7164 | + | |
| 7165 | + | |
| 7166 | + | |
| 7167 | + | |
| 7168 | + | |
| 7169 | + | |
| 7170 | + | |
7152 | 7171 | | |
7153 | 7172 | | |
7154 | 7173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | 1234 | | |
1251 | 1235 | | |
1252 | 1236 | | |
| |||
1433 | 1417 | | |
1434 | 1418 | | |
1435 | 1419 | | |
| 1420 | + | |
| 1421 | + | |
1436 | 1422 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | 1423 | | |
1441 | 1424 | | |
1442 | 1425 | | |
| |||
0 commit comments