diff options
| author | Peter LaFosse <peter@vector35.com> | 2019-08-06 17:19:01 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2019-08-07 11:22:32 -0400 |
| commit | 4704a1ee70e5b1a82989b2b3b016146fc183aefe (patch) | |
| tree | 0b040d139eb78358cc0aa84398c1d30c42e19673 | |
| parent | d501ab95b2d90ebba4550b6cb7c7cfaa557750e1 (diff) | |
Add option to display raw names in symbol view
| -rw-r--r-- | ui/symbollist.h | 21 | ||||
| -rw-r--r-- | ui/symbolsview.h | 1 |
2 files changed, 21 insertions, 1 deletions
diff --git a/ui/symbollist.h b/ui/symbollist.h index 786380d7..31b6580f 100644 --- a/ui/symbollist.h +++ b/ui/symbollist.h @@ -118,6 +118,20 @@ public: } return false; } + + bool lessThanAlphaRaw(const NamedObject& other) const + { + if (rawName < other.rawName) + return true; + else if (rawName == other.rawName) + { + if (name < other.name) + return true; + if (name == other.name) + return getStart() < other.getStart(); + } + return false; + } BNSymbolType getType() const { return sym->GetType(); } }; @@ -178,9 +192,11 @@ private: bool m_showLocalFunctions; bool m_showLocalDataVars; SortType m_sortType; + bool m_displayMangled; static bool symbolLessThan(const NamedObject& a, const NamedObject& b); static bool symbolNameLessThan(const NamedObject& a, const NamedObject& b); + static bool symbolRawNameLessThan(const NamedObject& a, const NamedObject& b); void getValidObject(std::deque<NamedObject>& result); @@ -236,6 +252,9 @@ public: bool getShowLocalDataVars() const { return m_showLocalDataVars; } bool getShowImports() const { return m_showImports; } + bool getShowMangled() const { return m_displayMangled; } + void setShowMangled(bool show) { m_displayMangled = show; } + void sortSymbols(SortType type); void setSortType(SortType type) { m_sortType = type; } SortType getSortType() const { return m_sortType; } @@ -269,7 +288,6 @@ class BINARYNINJAUIAPI SymbolList: public QListView, public FilterTarget bool m_showLocalDataVars; bool m_showImports; std::string m_filter; - SymbolListModel::SortType m_sortType; SymbolListModel::NamedObject m_index; SymbolListModel::NamedObject m_topIndex; bool m_doubleClick; @@ -298,6 +316,7 @@ public: bool getShowLocalFunctions() const { return m_list->getShowLocalFunctions(); } bool getShowLocalDataVars() const { return m_list->getShowLocalDataVars(); } bool getShowImports() const { return m_list->getShowImports(); } + bool getShowMangled() const { return m_list->getShowMangled(); } void toggleExportedFunctions() { m_list->toggleExportedFunctions(); } void toggleExportedDataVars() { m_list->toggleExportedDataVars(); } diff --git a/ui/symbolsview.h b/ui/symbolsview.h index 4b6bef1a..25eeab6e 100644 --- a/ui/symbolsview.h +++ b/ui/symbolsview.h @@ -38,6 +38,7 @@ public: bool getShowLocalFunctions() const { return m_funcList->getShowLocalFunctions(); } bool getShowLocalDataVars() const { return m_funcList->getShowLocalDataVars(); } bool getShowImports() const { return m_funcList->getShowImports(); } + bool getShowMangled() const { return m_funcList->getShowMangled(); } void toggleExportedFunctions() { m_funcList->toggleExportedFunctions(); } void toggleExportedDataVars() { m_funcList->toggleExportedDataVars(); } |
