Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/Debugger/DebuggerShared.cpp
3185 views
1
#include "Common/Data/Encoding/Utf8.h"
2
#include "Core/MIPS/MIPSDebugInterface.h"
3
4
#include "DebuggerShared.h"
5
#include "../InputBox.h"
6
7
bool parseExpression(const char* exp, DebugInterface* cpu, u32& dest)
8
{
9
PostfixExpression postfix;
10
if (initExpression(cpu, exp, postfix) == false)
11
return false;
12
return parseExpression(cpu, postfix, dest);
13
}
14
15
void displayExpressionError(HWND hwnd)
16
{
17
MessageBox(hwnd,ConvertUTF8ToWString(getExpressionError()).c_str(),L"Invalid expression",MB_OK);
18
}
19
20
bool executeExpressionWindow(HWND hwnd, DebugInterface* cpu, u32& dest)
21
{
22
std::string expression;
23
if (InputBox_GetString(GetModuleHandle(NULL), hwnd, L"Expression", "", expression) == false)
24
{
25
return false;
26
}
27
28
if (parseExpression(expression.c_str(), cpu, dest) == false)
29
{
30
displayExpressionError(hwnd);
31
return false;
32
}
33
34
return true;
35
}
36
37