Skip to content

ClrDebug 0.3.3

Latest
Compare
Choose a tag to compare
@lordmilko lordmilko released this 22 Apr 05:43

ClrDebug 0.3.3 contains a variety of improvements, bug fixes and breaking changes, split across the following feature areas:

ICorDebug

  • Add RaiseOnAnyEvent method to CorDebugManagedCallback to allow invoking OnAnyEvent from an overridden HandleEvent method, without needing to call the base HandleEvent implementation
  • Fix bufsize being a required parameter on CorDebugProcess.SetUnmanagedBreakpoint
  • Fix memberRef not being an mdMemberRef on CorDebugObjectValue.GetVirtualMethod/GetVirtualMethodAndType
  • Fix UnsignedValueHelpers crashing when trying to compare ClrDebug's custom numeric types
  • Fix various ICorDebugType/ICorDebugValue parameters in ICorDebugClass/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 with DEBUG_BREAK
  • Add missing DbgEng struct types
  • Fix DbgEng interface wrappers failing (RPC_E_INVALIDMETHOD) when using proxy interfaces returned from DebugConnect
  • Fix IDebugClient.OutputServers incorrectly being called OutputServer
  • Add DebugSymbols GetScope<T>, SetScope<T>, GetScopeEx<T> and SetScopeEx<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 an IntPtr rather than a byte[] for pbData
  • Add an extension method for DiaAddressMap that takes an IMAGE_SECTION_HEADER[]
  • Add IDiaDataSource2/IDiaDataSource3
  • Fix DiaStackWalkFrame.GetRegisterValue/PutRegisterValue not using CV_HREG_e
  • Fix DiaSymbol.Function not returning a bool
  • Fix DiaSymbol.Value crashing when a VARIANT contains a fake BSTR, as the CLR doesn't understand the custom free logic that is required
  • Add DiaSession.As<T>() extension method
  • Show FileName as ToString() of DiaInjectedSource, DiaInputAssemblyFile and DiaSourceFile
  • Remove DiaStackWalkFrame and DiaStackWalkHelper wrappers, as these type is expected to be implemented by user code

Misc

  • Clear Current when enumerator types can no longer MoveNext
  • 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 with MethodImplOptions.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 an UnmanagedType.U2 instead of a UnmanagedType.U1 for the function name
  • Rename enum MEM_FLAGS to MEM_TYPE_FLAGS