summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2025-07-30 17:15:28 +0100
committerGitHub <noreply@github.com>2025-07-30 17:15:28 +0100
commit131ca1ba9bb29641ec55a2e6e3ea7118646ade0e (patch)
tree52ab02ce22be33391d7f1defc470f2d997daffc1 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parentcd142aa18d90e4c76d48bd823227b083d7c8d2ed (diff)
parent9f32562e3633b62526918cbf0cfb920b96a263da (diff)
Merge pull request #13786 from JosJuice/symboldb-locking
PPCSymbolDB: Improve locking
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index a430be15a3..f94b640c41 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -335,7 +335,7 @@ void CodeViewWidget::Update(const Core::CPUThreadGuard* guard)
std::string ins = (split == std::string::npos ? disas : disas.substr(0, split));
std::string param = (split == std::string::npos ? "" : disas.substr(split + 1));
- const std::string_view desc = debug_interface.GetDescription(addr);
+ const std::string desc = debug_interface.GetDescription(addr);
const Common::Note* note = m_ppc_symbol_db.GetNoteFromAddr(addr);
std::string note_string;
@@ -950,7 +950,7 @@ void CodeViewWidget::OnFollowBranch()
void CodeViewWidget::OnEditSymbol()
{
const u32 addr = GetContextAddress();
- Common::Symbol* const symbol = m_ppc_symbol_db.GetSymbolFromAddr(addr);
+ const Common::Symbol* const symbol = m_ppc_symbol_db.GetSymbolFromAddr(addr);
if (symbol == nullptr)
{
@@ -974,12 +974,14 @@ void CodeViewWidget::OnEditSymbol()
}
if (symbol->name != name)
- symbol->Rename(name);
+ m_ppc_symbol_db.RenameSymbol(*symbol, name);
if (symbol->size != size)
{
Core::CPUThreadGuard guard(m_system);
- PPCAnalyst::ReanalyzeFunction(guard, symbol->address, *symbol, size);
+ Common::Symbol new_symbol = *symbol;
+ PPCAnalyst::ReanalyzeFunction(guard, symbol->address, new_symbol, size);
+ m_ppc_symbol_db.AddCompleteSymbol(new_symbol);
}
emit Host::GetInstance()->PPCSymbolsChanged();
@@ -988,7 +990,7 @@ void CodeViewWidget::OnEditSymbol()
void CodeViewWidget::OnDeleteSymbol()
{
const u32 addr = GetContextAddress();
- Common::Symbol* const symbol = m_ppc_symbol_db.GetSymbolFromAddr(addr);
+ const Common::Symbol* const symbol = m_ppc_symbol_db.GetSymbolFromAddr(addr);
if (symbol == nullptr)
return;
@@ -1039,7 +1041,7 @@ void CodeViewWidget::OnSelectionChanged()
void CodeViewWidget::OnEditNote()
{
const u32 context_address = GetContextAddress();
- Common::Note* const note = m_ppc_symbol_db.GetNoteFromAddr(context_address);
+ const Common::Note* const note = m_ppc_symbol_db.GetNoteFromAddr(context_address);
if (note == nullptr)
return;
@@ -1071,7 +1073,7 @@ void CodeViewWidget::OnEditNote()
void CodeViewWidget::OnDeleteNote()
{
const u32 context_address = GetContextAddress();
- Common::Note* const note = m_ppc_symbol_db.GetNoteFromAddr(context_address);
+ const Common::Note* const note = m_ppc_symbol_db.GetNoteFromAddr(context_address);
if (note == nullptr)
return;