Open viewizard opened 3 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.
Author: | viewizard |
---|---|
Assignees: | - |
Labels: | `area-Diagnostics-coreclr`, `question`, `untriaged` |
Milestone: | - |
CC @gbalykov
Hello,
I am refactor netcoredbg debugger code and would like ask your help in clarification of
ICorDebugEval2::NewParameterizedObjectNoConstructor
work.I found https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/debugging/icordebugeval2-newparameterizedobjectnoconstructor-method with description provided
Instantiates a new parameterized type object of the specified class without attempting to call a constructor method.
. My test shows, that this method call static constructor, is not this mean that "NoConstructor" really call constructor? I am just confused by this method name, could you please confirm that static constructor are called?I would like use it at static fields evaluation by
ICorDebugType::GetStaticFieldValue
and I found, thatICorDebugType::GetStaticFieldValue
returnS_OK
even if static constructor was not previously called for type. Is the any way I could detect this? If no, is it safe callICorDebugEval2::NewParameterizedObjectNoConstructor
(that I believe call static constructor only once for type) unlimited times?Just to be sure, I am right that
ICorDebugEval2::NewParameterizedObjectNoConstructor
don't execute normal constructor or finalizer by some reason in some case (I see we haveICorDebugEval2::NewParameterizedObject
for this, but I better ask), and will not change debuggee process state in any way except user code execution in static constructor?CC @alpencolt