|
13 | 13 | #endif |
14 | 14 | #include "gcdump.h" |
15 | 15 |
|
16 | | - |
17 | 16 | /*****************************************************************************/ |
18 | 17 |
|
19 | 18 | #define castto(var,typ) (*(typ *)&var) |
@@ -115,6 +114,17 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, |
115 | 114 | header->revPInvokeOffset = count; |
116 | 115 | } |
117 | 116 |
|
| 117 | + if (header->noGCRegionCnt == HAS_NOGCREGIONS) |
| 118 | + { |
| 119 | + hasArgTabOffset = TRUE; |
| 120 | + table += decodeUnsigned(table, &count); |
| 121 | + header->noGCRegionCnt = count; |
| 122 | + } |
| 123 | + else if (header->noGCRegionCnt > 0) |
| 124 | + { |
| 125 | + hasArgTabOffset = TRUE; |
| 126 | + } |
| 127 | + |
118 | 128 | // |
119 | 129 | // First print out all the basic information |
120 | 130 | // |
@@ -157,6 +167,8 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, |
157 | 167 | gcPrintf(" Sync region = [%u,%u] ([0x%x,0x%x])\n", |
158 | 168 | header->syncStartOffset, header->syncEndOffset, |
159 | 169 | header->syncStartOffset, header->syncEndOffset); |
| 170 | + if (header->noGCRegionCnt > 0) |
| 171 | + gcPrintf(" no GC region count = %2u \n", header->noGCRegionCnt); |
160 | 172 |
|
161 | 173 | if (header->epilogCount > 1 || (header->epilogCount != 0 && |
162 | 174 | header->epilogAtEnd == 0)) |
@@ -205,11 +217,6 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, |
205 | 217 | } |
206 | 218 |
|
207 | 219 | /*****************************************************************************/ |
208 | | - |
209 | | -#ifdef _PREFAST_ |
210 | | -#pragma warning(push) |
211 | | -#pragma warning(disable:21000) // Suppress PREFast warning about overly large function |
212 | | -#endif |
213 | 220 | size_t GCDump::DumpGCTable(PTR_CBYTE table, |
214 | 221 | const InfoHdr& header, |
215 | 222 | unsigned methodSize, |
@@ -238,6 +245,23 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, |
238 | 245 | if (header.ebxSaved) calleeSavedRegs++; |
239 | 246 | } |
240 | 247 |
|
| 248 | + /* Dump the no GC region table */ |
| 249 | + |
| 250 | + if (header.noGCRegionCnt > 0) |
| 251 | + { |
| 252 | + count = header.noGCRegionCnt; |
| 253 | + while (count-- > 0) |
| 254 | + { |
| 255 | + unsigned regionOffset; |
| 256 | + unsigned regionSize; |
| 257 | + |
| 258 | + table += decodeUnsigned(table, ®ionOffset); |
| 259 | + table += decodeUnsigned(table, ®ionSize); |
| 260 | + |
| 261 | + gcPrintf("[%04X-%04X) no GC region\n", regionOffset, regionOffset + regionSize); |
| 262 | + } |
| 263 | + } |
| 264 | + |
241 | 265 | /* Dump the untracked frame variable table */ |
242 | 266 |
|
243 | 267 | count = header.untrackedCnt; |
@@ -323,11 +347,7 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, |
323 | 347 |
|
324 | 348 | gcPrintf("%s%s pointer\n", |
325 | 349 | (lowBits & byref_OFFSET_FLAG) ? "byref " : "", |
326 | | -#ifndef FEATURE_EH_FUNCLETS |
327 | | - (lowBits & this_OFFSET_FLAG) ? "this" : "" |
328 | | -#else |
329 | 350 | (lowBits & pinned_OFFSET_FLAG) ? "pinned" : "" |
330 | | -#endif |
331 | 351 | ); |
332 | 352 |
|
333 | 353 | _ASSERTE(endOffs <= methodSize); |
@@ -456,10 +476,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, |
456 | 476 | /* non-ptr arg push */ |
457 | 477 |
|
458 | 478 | curOffs += (val & 0x07); |
459 | | -#ifndef FEATURE_EH_FUNCLETS |
460 | | - // For funclets, non-ptr arg pushes can be reported even for EBP frames |
461 | | - _ASSERTE(!header.ebpFrame); |
462 | | -#endif // FEATURE_EH_FUNCLETS |
463 | 479 | argCnt++; |
464 | 480 |
|
465 | 481 | DumpEncoding(bp, table-bp); bp = table; |
@@ -681,9 +697,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, |
681 | 697 | { |
682 | 698 | argTab += decodeUnsigned(argTab, &val); |
683 | 699 |
|
684 | | -#ifndef FEATURE_EH_FUNCLETS |
685 | | - assert((val & this_OFFSET_FLAG) == 0); |
686 | | -#endif |
687 | 700 | unsigned stkOffs = val & ~byref_OFFSET_FLAG; |
688 | 701 | unsigned lowBit = val & byref_OFFSET_FLAG; |
689 | 702 |
|
@@ -939,10 +952,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, |
939 | 952 |
|
940 | 953 | return (table - tableStart); |
941 | 954 | } |
942 | | -#ifdef _PREFAST_ |
943 | | -#pragma warning(pop) |
944 | | -#endif |
945 | | - |
946 | 955 |
|
947 | 956 | /*****************************************************************************/ |
948 | 957 |
|
@@ -1016,6 +1025,12 @@ void GCDump::DumpPtrsInFrame(PTR_CBYTE gcInfoBlock, |
1016 | 1025 | header.revPInvokeOffset = offset; |
1017 | 1026 | _ASSERTE(offset != INVALID_REV_PINVOKE_OFFSET); |
1018 | 1027 | } |
| 1028 | + if (header.noGCRegionCnt == HAS_NOGCREGIONS) |
| 1029 | + { |
| 1030 | + unsigned count; |
| 1031 | + table += decodeUnsigned(table, &count); |
| 1032 | + header.noGCRegionCnt = count; |
| 1033 | + } |
1019 | 1034 |
|
1020 | 1035 | prologSize = header.prologSize; |
1021 | 1036 | epilogSize = header.epilogSize; |
|
0 commit comments