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:
hrydgard
2008-12-09 21:24:12 +00:00
parent 6bf333c893
commit d01e05b7b5
12 changed files with 297 additions and 277 deletions

View File

@ -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] = "";