summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
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;