summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-02-03 21:45:09 -0500
committerGlenn Smith <glenn@vector35.com>2022-02-10 20:11:05 -0500
commitece59d9114f566a0f364cf8c56d555b70952f70b (patch)
treefa8703614af89adea1cfca26fe9a3cc13c4e1994 /binaryninjaapi.h
parentbabc57fefb70199ef388cab6d0feca95cc43307f (diff)
Move TypeView::getLinesForType into core as Type::GetLines
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index f6a3ab51..e89a572a 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1461,6 +1461,18 @@ namespace BinaryNinja {
static LinearDisassemblyLine FromAPIObject(BNLinearDisassemblyLine* line);
};
+ struct TypeDefinitionLine
+ {
+ BNTypeDefinitionLineType lineType;
+ std::vector<InstructionTextToken> tokens;
+ Ref<Type> type, rootType;
+ std::string rootTypeName;
+ uint64_t offset;
+ size_t fieldIndex;
+
+ static TypeDefinitionLine FromAPIObject(BNTypeDefinitionLine* line);
+ };
+
class DisassemblySettings;
class AnalysisCompletionEvent :
@@ -3001,6 +3013,8 @@ namespace BinaryNinja {
bool AddTypeMemberTokens(BinaryView* data, std::vector<InstructionTextToken>& tokens, int64_t offset,
std::vector<std::string>& nameList, size_t size = 0, bool indirect = false);
+ std::vector<TypeDefinitionLine> GetLines(Ref<BinaryView> data, const std::string& name,
+ int lineWidth = 80, bool collapsed = false);
static std::string GetSizeSuffix(size_t size);
};