summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorSepalani <sepalani@hotmail.fr>2017-08-10 21:30:32 +0100
committerSepalani <sepalani@hotmail.fr>2017-08-10 21:30:32 +0100
commitae4790ff25c1a62d8a6df08376edc03d68bd97ab (patch)
treef95f6f76123ce2ec2cea1b46740693388789d5a3 /Source/Core
parentf2a9ad0089dc051d020e57af843c44c6562590cd (diff)
RSO: Import data symbols
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Debugger/RSO.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/Core/Debugger/RSO.cpp b/Source/Core/Core/Debugger/RSO.cpp
index 013a9209a6..2bbc3351ea 100644
--- a/Source/Core/Core/Debugger/RSO.cpp
+++ b/Source/Core/Core/Debugger/RSO.cpp
@@ -371,7 +371,6 @@ void RSOView::LoadAll(u32 address)
void RSOView::Apply(PPCSymbolDB* symbol_db) const
{
- std::size_t count = 0;
for (const RSOExport& rso_export : GetExports())
{
u32 address = GetExportAddress(rso_export);
@@ -380,14 +379,21 @@ void RSOView::Apply(PPCSymbolDB* symbol_db) const
Symbol* symbol = symbol_db->AddFunction(address);
if (!symbol)
symbol = symbol_db->GetSymbolFromAddr(address);
+
+ const std::string export_name = GetExportName(rso_export);
if (symbol)
{
- symbol->name = GetExportName(rso_export);
- count += 1;
+ // Function symbol
+ symbol->name = export_name;
+ }
+ else
+ {
+ // Data symbol
+ symbol_db->AddKnownSymbol(address, 0, export_name, Symbol::Type::Data);
}
}
}
- DEBUG_LOG(OSHLE, "RSO(%s): %zu/%zu symbols applied", GetName().c_str(), count, GetExportsCount());
+ DEBUG_LOG(OSHLE, "RSO(%s): %zu symbols applied", GetName().c_str(), GetExportsCount());
}
u32 RSOView::GetNextEntry() const