diff options
| author | Mason Reed <mason@vector35.com> | 2024-05-02 17:00:42 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-05-02 17:00:42 -0400 |
| commit | ee9248c0f7144d9925e600be03f37fa155f51aef (patch) | |
| tree | 9f07e7fc86c83ba7b24cb3fadc0684deb6bf944c /python/binaryview.py | |
| parent | 87b1470b2de74640c856d8a90ba88ec672713d71 (diff) | |
BinaryView.get_functions_by_name retrieve regardless of platform when no platform passed
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 43eda87f..dbf26456 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4463,8 +4463,6 @@ class BinaryView: SymbolType.FunctionSymbol, SymbolType.ImportedFunctionSymbol, SymbolType.LibraryFunctionSymbol ] - if plat == None: - plat = self.platform fns = [] addresses = [sym.address for sym in self.get_symbols_by_name(name, ordered_filter=ordered_filter)] if len(addresses) == 0 and name.startswith("sub_"): @@ -4474,7 +4472,9 @@ class BinaryView: addresses = [] for address in addresses: for fn in self.get_functions_at(address): - if fn.start == address and fn.platform == plat: + if fn.start == address: + if plat is not None and fn.platform == plat: + continue fns.append(fn) return fns |
