diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2017-08-16 05:28:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-16 05:28:19 +0200 |
| commit | 14c2c6092e05de7fa9c2d81ba2c7db0c0584c9f9 (patch) | |
| tree | 5a35d3fa2ca4782d0bbd7ddcb32bdfd8cc0170f3 /Source/Core/Common/SymbolDB.cpp | |
| parent | 9b79e0ac728529de850aef2df30d155aba350352 (diff) | |
| parent | 93b5a5369b9c030e4f5e260be4b79272346f9bdf (diff) | |
Merge pull request #5932 from sepalani/sym-strip
SymbolDB: Blank stripped symbol name fixed
Diffstat (limited to 'Source/Core/Common/SymbolDB.cpp')
| -rw-r--r-- | Source/Core/Common/SymbolDB.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/Common/SymbolDB.cpp b/Source/Core/Common/SymbolDB.cpp index cec02af226..0c2268b39a 100644 --- a/Source/Core/Common/SymbolDB.cpp +++ b/Source/Core/Common/SymbolDB.cpp @@ -11,6 +11,21 @@ #include "Common/Logging/Log.h" #include "Common/SymbolDB.h" +static std::string GetStrippedFunctionName(const std::string& symbol_name) +{ + std::string name = symbol_name.substr(0, symbol_name.find('(')); + size_t position = name.find(' '); + if (position != std::string::npos) + name.erase(position); + return name; +} + +void Symbol::Rename(const std::string& symbol_name) +{ + this->name = symbol_name; + this->function_name = GetStrippedFunctionName(symbol_name); +} + void SymbolDB::List() { for (const auto& func : functions) |
