diff options
| author | Xusheng <xusheng@vector35.com> | 2021-02-05 20:28:13 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2021-04-22 10:52:39 +0800 |
| commit | c4b1dd712783e7474570705e6d95183a0c02a76e (patch) | |
| tree | 0393986e0078cb20610c8ad091db061f8f41a08b /linearviewcursor.cpp | |
| parent | a355d5c9aa1978d10f378931bfd5f06be60bae98 (diff) | |
add persistent search result
Diffstat (limited to 'linearviewcursor.cpp')
| -rw-r--r-- | linearviewcursor.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/linearviewcursor.cpp b/linearviewcursor.cpp index c9101594..55211e00 100644 --- a/linearviewcursor.cpp +++ b/linearviewcursor.cpp @@ -198,22 +198,7 @@ vector<LinearDisassemblyLine> LinearViewCursor::GetLines() vector<LinearDisassemblyLine> result; result.reserve(count); for (size_t i = 0; i < count; i++) - { - LinearDisassemblyLine line; - line.type = lines[i].type; - line.function = lines[i].function ? new Function(BNNewFunctionReference(lines[i].function)) : nullptr; - line.block = lines[i].block ? new BasicBlock(BNNewBasicBlockReference(lines[i].block)) : nullptr; - line.contents.addr = lines[i].contents.addr; - line.contents.instrIndex = lines[i].contents.instrIndex; - line.contents.highlight = lines[i].contents.highlight; - line.contents.tokens = InstructionTextToken::ConvertInstructionTextTokenList(lines[i].contents.tokens, lines[i].contents.count); - line.contents.tags = Tag::ConvertTagList(lines[i].contents.tags, lines[i].contents.tagCount); - line.contents.typeInfo.hasTypeInfo = lines[i].contents.typeInfo.hasTypeInfo; - line.contents.typeInfo.fieldIndex = lines[i].contents.typeInfo.fieldIndex; - line.contents.typeInfo.parentType = lines[i].contents.typeInfo.parentType ? - new Type(BNNewTypeReference(lines[i].contents.typeInfo.parentType)) : nullptr; - result.push_back(line); - } + result.push_back(LinearDisassemblyLine::FromAPIObject(&lines[i])); BNFreeLinearDisassemblyLines(lines, count); return result; |
