mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 18:23:43 +01:00
Avoid returning points from the symbol map.
Now that it uses a lookup, this is even more dangerous. But, the maps could be reordered while it's trying to print the pointer and cause that data to become invalid. This should be safe from race conditions.
This commit is contained in:
1 parent
b1af4f4911
commit
76afb2a8d5
11 files changed
+69
-50
No files matched your search
@@ -463,8 +463,8 @@ void CtrlBreakpointList::GetColumnText(wchar_t* dest, int row, int col)
|
||||
else
|
||||
wsprintf(dest,L"0x%08X",mc.end-mc.start);
|
||||
} else {
|
||||
const char* sym = symbolMap.GetLabelName(displayedBreakPoints_[index].addr);
|
||||
if (sym != NULL)
|
||||
const std::string sym = symbolMap.GetLabelString(displayedBreakPoints_[index].addr);
|
||||
if (!sym.empty())
|
||||
{
|
||||
std::wstring s = ConvertUTF8ToWString(sym);
|
||||
wcscpy(dest,s.c_str());
|
||||
@@ -635,8 +635,8 @@ void CtrlStackTraceView::GetColumnText(wchar_t* dest, int row, int col)
|
||||
break;
|
||||
case SF_ENTRYNAME:
|
||||
{
|
||||
const char* sym = symbolMap.GetLabelName(frames[row].entry);
|
||||
if (sym != NULL) {
|
||||
const std::string sym = symbolMap.GetLabelString(frames[row].entry);
|
||||
if (!sym.empty()) {
|
||||
wcscpy(dest, ConvertUTF8ToWString(sym).c_str());
|
||||
} else {
|
||||
wcscpy(dest,L"-");
|
||||
|
||||
Reference in new issue
Block a user