ClrDebug 0.3.3 contains a variety of improvements, bug fixes and breaking changes, split across the following feature areas:
ICorDebug
- Add
RaiseOnAnyEvent
method toCorDebugManagedCallback
to allow invokingOnAnyEvent
from an overriddenHandleEvent
method, without needing to call the baseHandleEvent
implementation - Fix
bufsize
being a required parameter onCorDebugProcess.SetUnmanagedBreakpoint
- Fix
memberRef
not being anmdMemberRef
onCorDebugObjectValue.GetVirtualMethod
/GetVirtualMethodAndType
- Fix
UnsignedValueHelpers
crashing when trying to compare ClrDebug's custom numeric types - Fix various
ICorDebugType
/ICorDebugValue
parameters inICorDebugClass
/ICorDebugEval
not being marshalled correctly (Fix #13) - Fix
CorDebugStringValue.GetString
requiring a manual array (Fix #14)
DbgEng
- Add DbgEng's new model/service interface types
- Add missing DebugClient related interface types
- Implement comprehensive
Dispose
method on DebugClient. Disposes and clears all sub-RCW members to prepare for unloading DbgEng - Remove
DEBUG_BREAKPOINT_ACCESS_TYPE
, which is redundant withDEBUG_BREAK
- Add missing DbgEng struct types
- Fix DbgEng interface wrappers failing (
RPC_E_INVALIDMETHOD
) when using proxy interfaces returned fromDebugConnect
- Fix
IDebugClient.OutputServers
incorrectly being calledOutputServer
- Add
DebugSymbols GetScope<T>
,SetScope<T>
,GetScopeEx<T>
andSetScopeEx<T>
extension methods - Add
CorDebugProcess.WriteMemory
extension methods
DIA
- Fix
DiaEnumStackFrames
not being an enumerator - Fix
DiaStringMarshaller
not properly creating a fake BSTR properly, and failing to marshal strings when a DIA method is being intercepted in a detour hook - Change
DiaAddressMap.SetImageHeaders
to take anIntPtr
rather than abyte[]
forpbData
- Add an extension method for
DiaAddressMap
that takes anIMAGE_SECTION_HEADER[]
- Add
IDiaDataSource2
/IDiaDataSource3
- Fix
DiaStackWalkFrame.GetRegisterValue
/PutRegisterValue
not usingCV_HREG_e
- Fix
DiaSymbol.Function
not returning abool
- Fix
DiaSymbol.Value
crashing when aVARIANT
contains a fake BSTR, as the CLR doesn't understand the custom free logic that is required - Add
DiaSession.As<T>()
extension method - Show F
ileName
asToString()
ofDiaInjectedSource
,DiaInputAssemblyFile
andDiaSourceFile
- Remove
DiaStackWalkFrame
andDiaStackWalkHelper
wrappers, as these type is expected to be implemented by user code
Misc
- Clear
Current
when enumerator types can no longerMoveNext
- Add extension methods for CLR macros that perform common checks on enum values (e.g.
IsTdPublic
) - Work around a bug in the the CLR's implementation of
ICLRDataProcess.GetRuntimeNameByAddress
- Fix
CorpubPublishClass
not being decorated withMethodImplOptions.InternalCall
- Add missing values from
CorAssemblyFlags
,CorMethodImpl
- Use
X86_CONTEXT_FLAGS
enum type in X86/AMD64 CONTEXT types - Add CLR related PE header types
- Add Ready2Run PE header types
- Add
DllGetClassObject
extension method - Don't free strings owned by the CLR emitted from various
IMetaDataTables
methods in .NET 8 - Fix
ISOSDacInterface.GetJitHelperFunctionName
incorrectly using anUnmanagedType.U2
instead of aUnmanagedType.U1
for the function name - Rename enum
MEM_FLAGS
toMEM_TYPE_FLAGS