HRESULT DereferenceAndUnboxValue(ICorDebugValue * pValue, ICorDebugValue** ppOutputValue, BOOL * pIsNull = NULL);
// Varobj
-HRESULT RunClassConstructor(ICorDebugThread *pThread, ICorDebugILFrame *pILFrame, ICorDebugValue *pValue);
+HRESULT RunClassConstructor(ICorDebugThread *pThread, ICorDebugValue *pValue);
enum FollowMode {
FollowInstance,
for (int i = nextPart; i < (int)parts.size(); i++)
{
ToRelease<ICorDebugValue> pClassValue(std::move(pResultValue));
- RunClassConstructor(pThread, pILFrame, pClassValue);
+ RunClassConstructor(pThread, pClassValue);
IfFailRet(GetFieldOrPropertyWithName(
pThread, pILFrame, pClassValue, parts[i], mode, &pResultValue));
mode = FollowInstance; // we can only follow through instance fields
// Valueprint
HRESULT DereferenceAndUnboxValue(ICorDebugValue * pValue, ICorDebugValue** ppOutputValue, BOOL * pIsNull = NULL);
-HRESULT PrintValue(ICorDebugValue *pInputValue, ICorDebugILFrame * pILFrame, std::string &output, bool escape = true);
+HRESULT PrintValue(ICorDebugValue *pInputValue, std::string &output, bool escape = true);
typedef std::function<HRESULT(mdMethodDef,ICorDebugModule*,ICorDebugType*,ICorDebugValue*,bool,const std::string&)> WalkMembersCallback;
typedef std::function<HRESULT(ICorDebugILFrame*,ICorDebugValue*,const std::string&)> WalkStackVarsCallback;
auto result = f.get();
if (result->GetPtr())
- PrintValue(result->GetPtr(), nullptr, output, escape);
+ PrintValue(result->GetPtr(), output, escape);
}
catch (const std::future_error& e)
{
#include "valuewalk.h"
// Valueprint
-HRESULT PrintValue(ICorDebugValue *pInputValue, ICorDebugILFrame * pILFrame, std::string &output, bool escape = true);
+HRESULT PrintValue(ICorDebugValue *pInputValue, std::string &output, bool escape = true);
HRESULT DereferenceAndUnboxValue(ICorDebugValue * pValue, ICorDebugValue** ppOutputValue, BOOL * pIsNull = NULL);
HRESULT GetNumChild(ICorDebugValue *pValue,
return pModule->GetFunctionFromToken(methodDef, ppFunction);
}
-HRESULT RunClassConstructor(ICorDebugThread *pThread, ICorDebugILFrame *pILFrame, ICorDebugValue *pValue)
+HRESULT RunClassConstructor(ICorDebugThread *pThread, ICorDebugValue *pValue)
{
HRESULT Status;
static void PrintVar(VarObjValue &v,
int print_values,
- ICorDebugILFrame *pILFrame,
std::string &output)
{
std::stringstream ss;
{
std::string strVal;
if (v.value && !v.statics_only)
- PrintValue(v.value, pILFrame, strVal);
+ PrintValue(v.value, strVal);
ss << "value=\"" << strVal << "\",";
}
ss << "attributes=\"" << editable << "\",";
return g_vars.emplace(std::make_pair(varName, std::move(varobj))).first->second;
}
-static void PrintChildren(std::vector<VarObjValue> &members, int print_values, ICorDebugILFrame *pILFrame, bool has_more, std::string &output)
+static void PrintChildren(std::vector<VarObjValue> &members, int print_values, bool has_more, std::string &output)
{
std::stringstream ss;
ss << "numchild=\"" << members.size() << "\"";
for (auto &m : members)
{
std::string varout;
- PrintVar(InsertVar(m), print_values, pILFrame, varout);
+ PrintVar(InsertVar(m), print_values, varout);
ss << sep;
sep = ",";
if (!objValue.statics_only && has_static_members)
{
- RunClassConstructor(pThread, pILFrame, objValue.value);
+ RunClassConstructor(pThread, objValue.value);
objValue.value->AddRef();
members.emplace_back(objValue.threadId, objValue.value);
FixupInheritedFieldNames(members);
}
- PrintChildren(members, print_values, pILFrame, has_more, output);
+ PrintChildren(members, print_values, has_more, output);
return S_OK;
}
ToRelease<ICorDebugValue> pExceptionValue;
if (SUCCEEDED(pThread->GetCurrentException(&pExceptionValue)) && pExceptionValue != nullptr)
{
- ToRelease<ICorDebugILFrame> pILFrame;
- IfFailRet(pFrame->QueryInterface(IID_ICorDebugILFrame, (LPVOID*) &pILFrame));
-
ss << sep;
sep = ",";
if (printValues)
{
std::string strVal;
- if (SUCCEEDED(PrintValue(pExceptionValue, pILFrame, strVal)))
+ if (SUCCEEDED(PrintValue(pExceptionValue, strVal)))
ss << ",value=\"" << strVal << "\"";
}
if (printTypes)
if (printValues)
{
std::string strVal;
- if (SUCCEEDED(PrintValue(pValue, pILFrame, strVal)))
+ if (SUCCEEDED(PrintValue(pValue, strVal)))
ss << ",value=\"" << strVal << "\"";
}
if (printTypes)
DWORD threadId = 0;
pThread->GetID(&threadId);
- ToRelease<ICorDebugILFrame> pILFrame;
- IfFailRet(pFrame->QueryInterface(IID_ICorDebugILFrame, (LPVOID*) &pILFrame));
-
ToRelease<ICorDebugValue> pResultValue;
IfFailRet(EvalExpr(pThread, pFrame, expression, &pResultValue));
VarObjValue tmpobj(threadId, expression, pResultValue.Detach(), "", varobjName);
int print_values = 1;
- PrintVar(InsertVar(tmpobj), print_values, pILFrame, output);
+ PrintVar(InsertVar(tmpobj), print_values, output);
return S_OK;
}