From ee9248c0f7144d9925e600be03f37fa155f51aef Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 2 May 2024 17:00:42 -0400 Subject: BinaryView.get_functions_by_name retrieve regardless of platform when no platform passed --- python/binaryview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') 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 -- cgit v1.3.1