diff options
| author | Brian Potchik <brian@vector35.com> | 2023-11-24 13:23:11 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2023-11-24 13:23:11 -0500 |
| commit | 2127e6bee8f6bf8e7ef6a742380ba822bad60956 (patch) | |
| tree | b2bc0f686406c96c7ca3aad174e576644aead62e | |
| parent | f7fc9a16455913bc97b969a653e06a00dfa9eb23 (diff) | |
Add Symbolic symbols type.
| -rw-r--r-- | binaryninjaapi.h | 1 | ||||
| -rw-r--r-- | binaryninjacore.h | 3 | ||||
| -rw-r--r-- | docs/dev/annotation.md | 2 | ||||
| -rw-r--r-- | python/binaryview.py | 2 | ||||
| -rw-r--r-- | python/types.py | 1 | ||||
| -rw-r--r-- | rust/src/symbol.rs | 3 | ||||
| -rw-r--r-- | ui/symbollist.h | 3 |
7 files changed, 10 insertions, 5 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 91006bf5..f3ca80b2 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -3301,6 +3301,7 @@ namespace BinaryNinja { ImportedDataSymbol Symbol for data that is not defined in the current binary ExternalSymbol Symbols for data and code that reside outside the BinaryView LibraryFunctionSymbol Symbols for functions identified as belonging to a shared library + SymbolicFunctionSymbol Symbols for functions without a concrete implementation or which have been abstractly represented =========================== ================================================================= \return Symbol type diff --git a/binaryninjacore.h b/binaryninjacore.h index e3fa2962..229f708c 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -431,7 +431,8 @@ extern "C" DataSymbol = 3, ImportedDataSymbol = 4, ExternalSymbol = 5, - LibraryFunctionSymbol = 6 + LibraryFunctionSymbol = 6, + SymbolicFunctionSymbol = 7 } BNSymbolType; typedef enum BNSymbolBinding diff --git a/docs/dev/annotation.md b/docs/dev/annotation.md index bad34677..0f22de4c 100644 --- a/docs/dev/annotation.md +++ b/docs/dev/annotation.md @@ -42,7 +42,7 @@ Valid symbol types [include](https://api.binary.ninja/binaryninja.enums.SymbolTy | ImportedDataSymbol | Symbol for data that is not defined in the current binary | | ExternalSymbol | Symbols for data and code that reside outside the BinaryView | | LibraryFunctionSymbol | Symbols for functions identified as belonging to a shared library | - +| SymbolicFunctionSymbol | Symbols for functions without a concrete implementation or which have been abstractly represented| ## Tags diff --git a/python/binaryview.py b/python/binaryview.py index 009e668d..e64b53a4 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -5288,7 +5288,7 @@ class BinaryView: """ if ordered_filter is None: ordered_filter = [ - SymbolType.FunctionSymbol, SymbolType.ImportedFunctionSymbol, SymbolType.LibraryFunctionSymbol, + SymbolType.FunctionSymbol, SymbolType.ImportedFunctionSymbol, SymbolType.LibraryFunctionSymbol, SymbolType.SymbolicFunctionSymbol, SymbolType.DataSymbol, SymbolType.ImportedDataSymbol, SymbolType.ImportAddressSymbol, SymbolType.ExternalSymbol ] diff --git a/python/types.py b/python/types.py index 68858ac8..87e092bb 100644 --- a/python/types.py +++ b/python/types.py @@ -397,6 +397,7 @@ class Symbol(CoreSymbol): ImportedDataSymbol Symbol for data that is not defined in the current binary ExternalSymbol Symbols for data and code that reside outside the BinaryView LibraryFunctionSymbol Symbols for functions identified as belonging to a shared library + SymbolicFunctionSymbol Symbols for functions without a concrete implementation or which have been abstractly represented =========================== ================================================================= """ def __init__( diff --git a/rust/src/symbol.rs b/rust/src/symbol.rs index 59080814..42b4466d 100644 --- a/rust/src/symbol.rs +++ b/rust/src/symbol.rs @@ -32,6 +32,7 @@ pub enum SymbolType { Data, ImportedData, External, + Symbolic, } impl From<BNSymbolType> for SymbolType { @@ -46,6 +47,7 @@ impl From<BNSymbolType> for SymbolType { DataSymbol => SymbolType::Data, ImportedDataSymbol => SymbolType::ImportedData, ExternalSymbol => SymbolType::External, + SymbolicFunctionSymbol => SymbolType::Symbolic, } } } @@ -62,6 +64,7 @@ impl From<SymbolType> for BNSymbolType { SymbolType::Data => DataSymbol, SymbolType::ImportedData => ImportedDataSymbol, SymbolType::External => ExternalSymbol, + SymbolType::Symbolic => SymbolicFunctionSymbol, } } } diff --git a/ui/symbollist.h b/ui/symbollist.h index f0f5ffa8..21faa2ba 100644 --- a/ui/symbollist.h +++ b/ui/symbollist.h @@ -147,8 +147,7 @@ class BINARYNINJAUIAPI SymbolListModel : public QAbstractItemModel, public Binar bool isFunc() const { - return (getType() == FunctionSymbol) || (getType() == ImportedFunctionSymbol) - || (getType() == LibraryFunctionSymbol); + return (getType() == FunctionSymbol) || (getType() == ImportedFunctionSymbol) || (getType() == LibraryFunctionSymbol); } uint64_t getStart() const { return address; } std::string getName() const { return name; } |
