mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
make all disassembler calls threadsafe .. hopefully.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1462 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -176,8 +176,9 @@ void CCodeView::OnMouseUpL(wxMouseEvent& event)
|
||||
|
||||
u32 CCodeView::AddrToBranch(u32 addr)
|
||||
{
|
||||
const char *temp = debugger->disasm(addr);
|
||||
const char *mojs = strstr(temp, "->0x");
|
||||
char disasm[256];
|
||||
debugger->disasm(addr, disasm, 256);
|
||||
const char *mojs = strstr(disasm, "->0x");
|
||||
if (mojs)
|
||||
{
|
||||
u32 dest;
|
||||
@ -204,8 +205,12 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection)));
|
||||
break;
|
||||
|
||||
case IDM_COPYCODE:
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(debugger->disasm(selection)))); //Have to manually convert from char* to wxString, don't have to in Windows?
|
||||
case IDM_COPYCODE:
|
||||
{
|
||||
char disasm[256];
|
||||
debugger->disasm(selection, disasm, 256);
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(disasm))); //Have to manually convert from char* to wxString, don't have to in Windows?
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_COPYHEX:
|
||||
@ -225,7 +230,9 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
u32 start = symbol->address;
|
||||
u32 end = start + symbol->size;
|
||||
for (u32 addr = start; addr != end; addr += 4) {
|
||||
text = text + StringFromFormat("%08x: ", addr) + debugger->disasm(addr) + "\r\n";
|
||||
char disasm[256];
|
||||
debugger->disasm(addr, disasm, 256);
|
||||
text = text + StringFromFormat("%08x: ", addr) + disasm + "\r\n";
|
||||
}
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(text.c_str())));
|
||||
}
|
||||
@ -423,8 +430,8 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
|
||||
if (debugger->isAlive())
|
||||
{
|
||||
char dis[256] = {0};
|
||||
strcpy(dis, debugger->disasm(address));
|
||||
char dis[256];
|
||||
debugger->disasm(address, dis, 256);
|
||||
char* dis2 = strchr(dis, '\t');
|
||||
char desc[256] = "";
|
||||
|
||||
|
@ -301,25 +301,25 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||
m_RegisterWindow->Show(true);
|
||||
}
|
||||
|
||||
if(bBreakpointWindow)
|
||||
if (bBreakpointWindow)
|
||||
{
|
||||
m_BreakpointWindow = new CBreakPointWindow(this, this);
|
||||
m_BreakpointWindow->Show(true);
|
||||
}
|
||||
|
||||
if(bMemoryWindow)
|
||||
if (bMemoryWindow)
|
||||
{
|
||||
m_MemoryWindow = new CMemoryWindow(this);
|
||||
m_MemoryWindow->Show(true);
|
||||
}
|
||||
|
||||
if(bJitWindow)
|
||||
if (bJitWindow)
|
||||
{
|
||||
m_JitWindow = new CJitWindow(this);
|
||||
m_JitWindow->Show(true);
|
||||
}
|
||||
|
||||
if(bSoundWindow)
|
||||
if (bSoundWindow)
|
||||
{
|
||||
// possible todo: add some kind of if here to? can it fail?
|
||||
CPluginManager::GetInstance().OpenDebug(
|
||||
@ -329,7 +329,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||
);
|
||||
} // don't have any else, just ignore it
|
||||
|
||||
if(bVideoWindow)
|
||||
if (bVideoWindow)
|
||||
{
|
||||
// possible todo: add some kind of if here to? can it fail?
|
||||
CPluginManager::GetInstance().OpenDebug(
|
||||
|
@ -170,9 +170,13 @@ void CMemoryView::OnPopupMenu(wxCommandEvent& event)
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_COPYCODE:
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(debugger->disasm(selection)))); //Have to manually convert from char* to wxString, don't have to in Windows?
|
||||
case IDM_COPYCODE:
|
||||
{
|
||||
char disasm[256];
|
||||
debugger->disasm(selection, disasm, 256);
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(disasm))); //Have to manually convert from char* to wxString, don't have to in Windows?
|
||||
break;
|
||||
}
|
||||
|
||||
case IDM_COPYHEX:
|
||||
{
|
||||
@ -303,8 +307,8 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||
dc.SetBrush(currentBrush);
|
||||
dc.SetTextForeground(_T("#600000"));
|
||||
dc.DrawText(temp, 17, rowY1);
|
||||
char mem[256] = {0};
|
||||
strcpy(mem, debugger->getRawMemoryString(address));
|
||||
char mem[256];
|
||||
debugger->getRawMemoryString(address, mem, 256);
|
||||
dc.SetTextForeground(_T("#000080"));
|
||||
dc.DrawText(wxString::FromAscii(mem), 17+fontSize*(8), rowY1);
|
||||
dc.SetTextForeground(_T("#000000"));
|
||||
@ -312,7 +316,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||
if (debugger->isAlive())
|
||||
{
|
||||
char dis[256] = {0};
|
||||
strcpy(dis, debugger->disasm(address));
|
||||
debugger->disasm(address, dis, 256);
|
||||
char* dis2 = strchr(dis, '\t');
|
||||
char desc[256] = "";
|
||||
|
||||
|
Reference in New Issue
Block a user