{
return E_FAIL;
}
- HRESULT hr = GetExpression(frame, exp, result);
+ // To be compatible with windbg/dbgeng, we need to emulate the default
+ // hex radix (because sos prints addresses and other hex values without
+ // the 0x) by first prepending 0x and if that fails use the actual
+ // undecorated expression.
+ std::string str;
+ str.append("0x");
+ str.append(exp);
+ HRESULT hr = GetExpression(frame, str.c_str(), result);
if (hr != S_OK)
{
- std::string str;
- str.append("0x");
- str.append(exp);
- hr = GetExpression(frame, str.c_str(), result);
+ hr = GetExpression(frame, exp, result);
}
return hr;
- }
+ }