Skip to content

Commit

Permalink
[release/9.0] Update MethodTable::IsDynamicStatics and `DacpMethodT…
Browse files Browse the repository at this point in the history
…ableData::bIsDynamic` to return 0/1 instead of flag value (#106643)

* Update assert in GetMethodTableData for cDAC/DAC bIsDynamic values

* Make DAC return TRUE/FALSE instead of flag value for DacpMethodTableData::bIsDynamic

* Make MethodTable::IsDynamicStatics return 0/1 instead of flag value

---------

Co-authored-by: Elinor Fung <elfung@microsoft.com>
  • Loading branch information
github-actions[bot] and elinor-fung authored Aug 20, 2024
1 parent 42c245e commit 3464960
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/debug/daccess/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ ClrDataAccess::GetMethodTableDataImpl(CLRDATA_ADDRESS mt, struct DacpMethodTable
MTData->dwAttrClass = pMT->GetAttrClass();
MTData->bContainsPointers = pMT->ContainsGCPointers();
MTData->bIsShared = FALSE;
MTData->bIsDynamic = pMT->IsDynamicStatics();
MTData->bIsDynamic = pMT->IsDynamicStatics() ? TRUE : FALSE;
}
return S_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/methodtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2567,10 +2567,10 @@ class MethodTable
inline PTR_BYTE GetNonGCThreadStaticsBasePointer(PTR_Thread pThread);
inline PTR_BYTE GetGCThreadStaticsBasePointer(PTR_Thread pThread);

inline DWORD IsDynamicStatics()
inline BOOL IsDynamicStatics()
{
LIMITED_METHOD_DAC_CONTRACT;
return GetFlag(enum_flag_DynamicStatics);
return GetFlag(enum_flag_DynamicStatics) == enum_flag_DynamicStatics;
}

inline void SetDynamicStatics()
Expand Down

0 comments on commit 3464960

Please sign in to comment.