summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
index 1c0776862c..9172a3af9a 100644
--- a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
+++ b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp
@@ -30,6 +30,7 @@
#include "CodeWindow.h"
#include "CodeView.h"
+#include "../WxUtils.h"
#include "FileUtil.h"
#include "Core.h"
#include "HW/Memmap.h"
@@ -38,6 +39,7 @@
#include "LogManager.h"
#include "HW/CPU.h"
#include "PowerPC/PowerPC.h"
+#include "PowerPC/JitInterface.h"
#include "Debugger/PPCDebugInterface.h"
#include "Debugger/Debugger_SymbolMap.h"
#include "PowerPC/PPCAnalyst.h"
@@ -45,8 +47,6 @@
#include "PowerPC/PPCSymbolDB.h"
#include "PowerPC/SignatureDB.h"
#include "PowerPC/PPCTables.h"
-#include "PowerPC/JitCommon/JitBase.h"
-#include "PowerPC/JitCommon/JitCache.h" // for ClearCache()
#include "ConfigManager.h"
@@ -211,7 +211,7 @@ void CCodeWindow::OnAddrBoxChange(wxCommandEvent& event)
wxTextCtrl* pAddrCtrl = (wxTextCtrl*)GetToolBar()->FindControl(IDM_ADDRBOX);
wxString txt = pAddrCtrl->GetValue();
- std::string text(txt.mb_str());
+ std::string text(WxStrToStr(txt));
text = StripSpaces(text);
if (text.size() == 8)
{
@@ -260,8 +260,7 @@ void CCodeWindow::SingleStep()
{
if (CCPU::IsStepping())
{
- if (jit)
- jit->GetBlockCache()->InvalidateICache(PC, 4);
+ JitInterface::InvalidateICache(PC, 4);
CCPU::StepOpcode(&sync_event);
wxThread::Sleep(20);
// need a short wait here
@@ -314,7 +313,7 @@ void CCodeWindow::UpdateLists()
Symbol *caller_symbol = g_symbolDB.GetSymbolFromAddr(caller_addr);
if (caller_symbol)
{
- int idx = callers->Append(wxString::FromAscii(StringFromFormat
+ int idx = callers->Append(StrToWxStr(StringFromFormat
("< %s (%08x)", caller_symbol->name.c_str(), caller_addr).c_str()));
callers->SetClientData(idx, (void*)(u64)caller_addr);
}
@@ -327,7 +326,7 @@ void CCodeWindow::UpdateLists()
Symbol *call_symbol = g_symbolDB.GetSymbolFromAddr(call_addr);
if (call_symbol)
{
- int idx = calls->Append(wxString::FromAscii(StringFromFormat
+ int idx = calls->Append(StrToWxStr(StringFromFormat
("> %s (%08x)", call_symbol->name.c_str(), call_addr).c_str()));
calls->SetClientData(idx, (void*)(u64)call_addr);
}
@@ -346,12 +345,12 @@ void CCodeWindow::UpdateCallstack()
for (size_t i = 0; i < stack.size(); i++)
{
- int idx = callstack->Append(wxString::FromAscii(stack[i].Name.c_str()));
+ int idx = callstack->Append(StrToWxStr(stack[i].Name));
callstack->SetClientData(idx, (void*)(u64)stack[i].vAddress);
}
if (!ret)
- callstack->Append(wxString::FromAscii("invalid callstack"));
+ callstack->Append(StrToWxStr("invalid callstack"));
}
// Create CPU Mode menus
@@ -362,7 +361,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
wxMenu* pCoreMenu = new wxMenu;
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"),
- wxString::FromAscii("This is necessary to get break points"
+ StrToWxStr("This is necessary to get break points"
" and stepping to work as explained in the Developer Documentation. But it can be very"
" slow, perhaps slower than 1 fps."),
wxITEM_CHECK);
@@ -430,7 +429,7 @@ void CCodeWindow::CreateMenuOptions(wxMenu* pMenu)
boottopause->Check(bBootToPause);
wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"),
- wxString::FromAscii(
+ StrToWxStr(
"Automatically load the Default ISO when Dolphin starts, or the last game you loaded,"
" if you have not given it an elf file with the --elf command line. [This can be"
" convenient if you are bug-testing with a certain game and want to rebuild"
@@ -492,10 +491,8 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
}
// Clear the JIT cache to enable these changes
- if (jit)
- {
- jit->ClearCache();
- }
+ JitInterface::ClearCache();
+
// Update
UpdateButtonStates();
}
@@ -509,7 +506,7 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
break;
case IDM_CLEARCODECACHE:
- jit->ClearCache();
+ JitInterface::ClearCache();
break;
case IDM_SEARCHINSTRUCTION:
@@ -519,10 +516,10 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4)
{
const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr));
- if (name && !strcmp((const char *)str.mb_str(), name))
+ auto const wx_name = WxStrToStr(str);
+ if (name && (wx_name == name))
{
- std::string mb_str(str.mb_str());
- NOTICE_LOG(POWERPC, "Found %s at %08x", mb_str.c_str(), addr);
+ NOTICE_LOG(POWERPC, "Found %s at %08x", wx_name.c_str(), addr);
}
}
break;