summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-06-06 14:21:56 -0400
committerGlenn Smith <glenn@vector35.com>2025-06-06 15:27:37 -0400
commit709149ef91f06f6cc31bb632a88876ff6835cc44 (patch)
tree1f7e1b158295cf8ee0faffb0a095f8ae01577bc9
parentf5ca152c06e528440da22797bb1762d8c208a98f (diff)
Option to ignore whitespace in searches
-rw-r--r--binaryninjacore.h3
-rw-r--r--python/binaryview.py8
-rw-r--r--ui/searchresult.h1
3 files changed, 8 insertions, 4 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index d36c1767..c4ac0911 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -2782,7 +2782,8 @@ extern "C"
typedef enum BNFindFlag
{
FindCaseSensitive = 0,
- FindCaseInsensitive = 1
+ FindCaseInsensitive = 1,
+ FindIgnoreWhitespace = 2,
} BNFindFlag;
typedef enum BNFindRangeType
diff --git a/python/binaryview.py b/python/binaryview.py
index d320d675..466f4e0f 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -8921,7 +8921,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common"
def find_next_text(
self, start: int, text: str, settings: Optional[_function.DisassemblySettings] = None,
- flags: FindFlag = FindFlag.FindCaseSensitive,
+ flags: int = FindFlag.FindCaseSensitive,
graph_type: _function.FunctionViewTypeOrName = FunctionGraphType.NormalFunctionGraph
) -> Optional[int]:
"""
@@ -8931,13 +8931,14 @@ to a the type "tagRECT" found in the typelibrary "winX64common"
:param int start: virtual address to start searching from.
:param str text: text to search for
:param DisassemblySettings settings: disassembly settings
- :param FindFlag flags: (optional) defaults to case-insensitive data search
+ :param FindFlag flags: (optional) bit-flags list of options, defaults to case-insensitive data search
==================== ============================
FindFlag Description
==================== ============================
FindCaseSensitive Case-sensitive search
FindCaseInsensitive Case-insensitive search
+ FindIgnoreWhitespace Ignore whitespace characters
==================== ============================
:param FunctionViewType graph_type: the IL to search within
"""
@@ -9087,13 +9088,14 @@ to a the type "tagRECT" found in the typelibrary "winX64common"
:param str text: text to search for
:param DisassemblySettings settings: DisassemblySettings object used to render the text \
to be searched
- :param FindFlag flags: (optional) defaults to case-insensitive data search
+ :param FindFlag flags: (optional) bit-flags list of options, defaults to case-insensitive data search
==================== ============================
FindFlag Description
==================== ============================
FindCaseSensitive Case-sensitive search
FindCaseInsensitive Case-insensitive search
+ FindIgnoreWhitespace Ignore whitespace characters
==================== ============================
:param FunctionViewType graph_type: the IL to search within
:param callback progress_func: optional function to be called with the current progress \
diff --git a/ui/searchresult.h b/ui/searchresult.h
index 779b815b..9fe28996 100644
--- a/ui/searchresult.h
+++ b/ui/searchresult.h
@@ -316,6 +316,7 @@ class BINARYNINJAUIAPI SearchResultHeaderWidget : public QWidget, public FilterT
QLineEdit* m_search;
QComboBox* m_mode;
ClickableIcon* m_caseSensitive;
+ ClickableIcon* m_ignoreWhitespace;
public:
SearchResultHeaderWidget();