summaryrefslogtreecommitdiff
path: root/ui/viewframe.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-10-13 19:36:47 -0400
committerRusty Wagner <rusty.wagner@gmail.com>2025-10-21 13:52:40 -0400
commitc99c4f47ff9a86ea700005d55d435c1dacb2c764 (patch)
tree1a919ba3caee505d241b821c0952d3f652dddb81 /ui/viewframe.h
parent5d4fc5f1fb7a0c368d2a048a5d750564c970c9c9 (diff)
Refactor strings view to support derived strings
Diffstat (limited to 'ui/viewframe.h')
-rw-r--r--ui/viewframe.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/viewframe.h b/ui/viewframe.h
index 69f7a198..055e27c0 100644
--- a/ui/viewframe.h
+++ b/ui/viewframe.h
@@ -32,7 +32,7 @@ struct BINARYNINJAUIAPI SelectionInfoForXref
// Check these booleans before accessing the address/type/variable info,
// since the invalid fields are not guaranteed to be initialized/zero-ed.
// At any given time, at most one of these four should be true.
- bool addrValid, typeValid, typeFieldValid, localVarValid;
+ bool addrValid, typeValid, typeFieldValid, localVarValid, derivedStringValid;
BNFunctionGraphType ilSource = InvalidILViewType;
@@ -48,7 +48,9 @@ struct BINARYNINJAUIAPI SelectionInfoForXref
FunctionRef func;
ArchitectureRef arch;
- SelectionInfoForXref() : addrValid(false), typeValid(false), typeFieldValid(false), localVarValid(false) { }
+ BinaryNinja::DerivedString derivedString;
+
+ SelectionInfoForXref() : addrValid(false), typeValid(false), typeFieldValid(false), localVarValid(false), derivedStringValid(false) { }
bool operator==(const SelectionInfoForXref& other) const
{
@@ -60,11 +62,13 @@ struct BINARYNINJAUIAPI SelectionInfoForXref
return (type == other.type) && (offset == other.offset);
else if (localVarValid && other.localVarValid)
return (var == other.var) && (ilSource == other.ilSource);
+ else if (derivedStringValid && other.derivedStringValid)
+ return derivedString == other.derivedString;
return false;
}
bool operator!=(const SelectionInfoForXref& other) const { return !(*this == other); }
- bool isValid() const { return addrValid || typeValid || typeFieldValid || localVarValid; }
+ bool isValid() const { return addrValid || typeValid || typeFieldValid || localVarValid || derivedStringValid; }
};
/*!