mirror of https://github.com/PCSX2/pcsx2.git
pcsx2 debugger: don't use erased iterator
CID 146848 (#1 of 1): Using invalid iterator (INVALIDATE_ITERATOR) 8. use_iterator: Using invalid iterator existing. Directly edit the value through the iterator.
This commit is contained in:
parent
7c69958c92
commit
4d680b73dc
|
@ -341,11 +341,8 @@ void SymbolMap::AddFunction(const char* name, u32 address, u32 size, int moduleI
|
||||||
if (existing != functions.end()) {
|
if (existing != functions.end()) {
|
||||||
existing->second.size = size;
|
existing->second.size = size;
|
||||||
if (existing->second.module != moduleIndex) {
|
if (existing->second.module != moduleIndex) {
|
||||||
FunctionEntry func = existing->second;
|
existing->second.start = relAddress;
|
||||||
func.start = relAddress;
|
existing->second.module = moduleIndex;
|
||||||
func.module = moduleIndex;
|
|
||||||
functions.erase(existing);
|
|
||||||
functions[symbolKey] = func;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh the active item if it exists.
|
// Refresh the active item if it exists.
|
||||||
|
@ -540,11 +537,8 @@ void SymbolMap::AddLabel(const char* name, u32 address, int moduleIndex) {
|
||||||
// We leave an existing label alone, rather than overwriting.
|
// We leave an existing label alone, rather than overwriting.
|
||||||
// But we'll still upgrade it to the correct module / relative address.
|
// But we'll still upgrade it to the correct module / relative address.
|
||||||
if (existing->second.module != moduleIndex) {
|
if (existing->second.module != moduleIndex) {
|
||||||
LabelEntry label = existing->second;
|
existing->second.addr = relAddress;
|
||||||
label.addr = relAddress;
|
existing->second.module = moduleIndex;
|
||||||
label.module = moduleIndex;
|
|
||||||
labels.erase(existing);
|
|
||||||
labels[symbolKey] = label;
|
|
||||||
|
|
||||||
// Refresh the active item if it exists.
|
// Refresh the active item if it exists.
|
||||||
auto active = activeLabels.find(address);
|
auto active = activeLabels.find(address);
|
||||||
|
@ -646,11 +640,8 @@ void SymbolMap::AddData(u32 address, u32 size, DataType type, int moduleIndex) {
|
||||||
existing->second.size = size;
|
existing->second.size = size;
|
||||||
existing->second.type = type;
|
existing->second.type = type;
|
||||||
if (existing->second.module != moduleIndex) {
|
if (existing->second.module != moduleIndex) {
|
||||||
DataEntry entry = existing->second;
|
existing->second.module = moduleIndex;
|
||||||
entry.module = moduleIndex;
|
existing->second.start = relAddress;
|
||||||
entry.start = relAddress;
|
|
||||||
data.erase(existing);
|
|
||||||
data[symbolKey] = entry;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh the active item if it exists.
|
// Refresh the active item if it exists.
|
||||||
|
|
Loading…
Reference in New Issue