You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using opaque IStackWalkHandle and IStackFrameHandle to hold state about the stack walk. These are passed back to the contract to be operated on.
// Each Contract version implements its own opaque handle StackWalkFrameHandle_1 for IStackFrameHandle and IStackWalkHandle etc..// These are checked when passed in to verify that it is from the write contract version, otherwise an invalid argument exception is thrown// This allows for flexibility in the handle implementation// // if (uncheckedHandle is not StackWalkHandle_1 stackWalkHandle)// {// throw new InvalidArgumentException();// }internalinterfaceIStackFrameHandle{}internalinterfaceIStackWalkHandle{}// IStackContext is implemented by each architectures thread context object. internalinterfaceIStackContext{intGetContextSize();intGetContextFlags();TargetPointerGetIP();TargetPointerGetSP();boolWriteToBuffer(Span<byte>buffer);}internalinterfaceIStackWalk:IContract{// Creates a StackWalk publicIStackWalkHandleCreateStackWalk(ThreadDatathreadData);// Moves stackWalkHandle to the next managed frame// returns true if successful, false otherwisepublicboolNext(IStackWalkHandlestackWalkHandle);publicIStackFrameHandleGetFrame(IStackWalkHandlestackWalkHandle);publicIStackFrameContextGetContext(IStackWalkHandlestackWalkHandle);publicintGetNumArgs(IStackFrameHandlestackFrameHandle);// ... other functions implemented on IXCLRDataFrame}
Proposal 2
Same as proposal 1, except that instead of passing the opaque handles back to the contract, these can be operated on themselves.
internalinterfaceIStackFrameHandle{// frame specific methods currently implemented on IXCLRDataFramepublicintGetNumArgs();//...}internalinterfaceIStackWalkHandle{// Moves stackWalkHandle to the next managed frame// returns true if successful, false otherwisepublicboolNext(IStackWalkHandlestackWalkHandle);publicIStackFrameContextGetContext(IStackFrameHandlestackFrameHandle);publicIStackFrameHandleGetFrame(IStackWalkHandlestackWalkHandle);}internalinterfaceIStackWalk:IContract{// Creates a StackWalk publicIStackWalkHandleCreateStackWalk(ThreadDatathreadData);}
The text was updated successfully, but these errors were encountered:
Proposal 1
Using opaque
IStackWalkHandle
andIStackFrameHandle
to hold state about the stack walk. These are passed back to the contract to be operated on.Proposal 2
Same as proposal 1, except that instead of passing the opaque handles back to the contract, these can be operated on themselves.
The text was updated successfully, but these errors were encountered: