mirror of https://github.com/PCSX2/pcsx2.git
Fix string handling in breakpoint list
This commit is contained in:
parent
8d1e294b32
commit
15943eddb1
|
@ -120,19 +120,19 @@ wxString BreakpointList::OnGetItemText(long item, long col) const
|
||||||
if (isMemory) {
|
if (isMemory) {
|
||||||
switch ((int)displayedMemChecks_[index].cond) {
|
switch ((int)displayedMemChecks_[index].cond) {
|
||||||
case MEMCHECK_READ:
|
case MEMCHECK_READ:
|
||||||
dest.Write(L"Read");
|
dest.Write("Read");
|
||||||
break;
|
break;
|
||||||
case MEMCHECK_WRITE:
|
case MEMCHECK_WRITE:
|
||||||
dest.Write(L"Write");
|
dest.Write("Write");
|
||||||
break;
|
break;
|
||||||
case MEMCHECK_READWRITE:
|
case MEMCHECK_READWRITE:
|
||||||
dest.Write(L"Read/Write");
|
dest.Write("Read/Write");
|
||||||
break;
|
break;
|
||||||
case MEMCHECK_WRITE | MEMCHECK_WRITE_ONCHANGE:
|
case MEMCHECK_WRITE | MEMCHECK_WRITE_ONCHANGE:
|
||||||
dest.Write(L"Write Change");
|
dest.Write("Write Change");
|
||||||
break;
|
break;
|
||||||
case MEMCHECK_READWRITE | MEMCHECK_WRITE_ONCHANGE:
|
case MEMCHECK_READWRITE | MEMCHECK_WRITE_ONCHANGE:
|
||||||
dest.Write(L"Read/Write Change");
|
dest.Write("Read/Write Change");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -143,9 +143,9 @@ wxString BreakpointList::OnGetItemText(long item, long col) const
|
||||||
case BPL_OFFSET:
|
case BPL_OFFSET:
|
||||||
{
|
{
|
||||||
if (isMemory) {
|
if (isMemory) {
|
||||||
dest.Write(L"0x%08X",displayedMemChecks_[index].start);
|
dest.Write("0x%08X",displayedMemChecks_[index].start);
|
||||||
} else {
|
} else {
|
||||||
dest.Write(L"0x%08X",displayedBreakPoints_[index].addr);
|
dest.Write("0x%08X",displayedBreakPoints_[index].addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -154,16 +154,16 @@ wxString BreakpointList::OnGetItemText(long item, long col) const
|
||||||
if (isMemory) {
|
if (isMemory) {
|
||||||
auto mc = displayedMemChecks_[index];
|
auto mc = displayedMemChecks_[index];
|
||||||
if (mc.end == 0)
|
if (mc.end == 0)
|
||||||
dest.Write(L"0x%08X",1);
|
dest.Write("0x%08X",1);
|
||||||
else
|
else
|
||||||
dest.Write(L"0x%08X",mc.end-mc.start);
|
dest.Write("0x%08X",mc.end-mc.start);
|
||||||
} else {
|
} else {
|
||||||
const std::string sym = symbolMap.GetLabelString(displayedBreakPoints_[index].addr);
|
const std::string sym = symbolMap.GetLabelString(displayedBreakPoints_[index].addr);
|
||||||
if (!sym.empty())
|
if (!sym.empty())
|
||||||
{
|
{
|
||||||
dest.Write(L"%s",sym.c_str());
|
dest.Write("%s",sym.c_str());
|
||||||
} else {
|
} else {
|
||||||
dest.Write(L"-");
|
dest.Write("-");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,34 +175,34 @@ wxString BreakpointList::OnGetItemText(long item, long col) const
|
||||||
} else {
|
} else {
|
||||||
char temp[256];
|
char temp[256];
|
||||||
disasm->getOpcodeText(displayedBreakPoints_[index].addr, temp);
|
disasm->getOpcodeText(displayedBreakPoints_[index].addr, temp);
|
||||||
dest.Write(L"%s",temp);
|
dest.Write("%s",temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BPL_CONDITION:
|
case BPL_CONDITION:
|
||||||
{
|
{
|
||||||
if (isMemory || displayedBreakPoints_[index].hasCond == false) {
|
if (isMemory || displayedBreakPoints_[index].hasCond == false) {
|
||||||
dest.Write(L"-");
|
dest.Write("-");
|
||||||
} else {
|
} else {
|
||||||
dest.Write(L"%s",displayedBreakPoints_[index].cond.expressionString);
|
dest.Write("%s",displayedBreakPoints_[index].cond.expressionString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BPL_HITS:
|
case BPL_HITS:
|
||||||
{
|
{
|
||||||
if (isMemory) {
|
if (isMemory) {
|
||||||
dest.Write(L"%d",displayedMemChecks_[index].numHits);
|
dest.Write("%d",displayedMemChecks_[index].numHits);
|
||||||
} else {
|
} else {
|
||||||
dest.Write(L"-");
|
dest.Write("-");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BPL_ENABLED:
|
case BPL_ENABLED:
|
||||||
{
|
{
|
||||||
if (isMemory) {
|
if (isMemory) {
|
||||||
dest.Write(L"%s",displayedMemChecks_[index].result & MEMCHECK_BREAK ? "true" : "false");
|
dest.Write("%s",displayedMemChecks_[index].result & MEMCHECK_BREAK ? "true" : "false");
|
||||||
} else {
|
} else {
|
||||||
dest.Write(L"%s",displayedBreakPoints_[index].enabled ? "true" : "false");
|
dest.Write("%s",displayedBreakPoints_[index].enabled ? "true" : "false");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue