What is the feature you'd like to have?
I would like to be able to return multiple lines of text from a custom architecture plugin's GetInstructionText function. This could come in the form of a new line separator InstructionTextToken type, rendering of a \n TextToken as a newline in assembly listings, or by some other method.
Is your feature request related to a problem?
In the Hexagon architecture, instructions are bundled into "packets". To correctly interpret and render the start and end of packets and to detect certain flow control operations, it is necessary to examine the whole packet at once. The Hexagon support plugin from Google (https://github.com/google/binja-hexagon) achieves this by keeping their own packet context database, but this carries a large memory overhead and limits Binary Ninja to only a single Hexagon binary open at a time.
As an alternative to keeping a separate context database in the architecture plugin, I'd like to handle parsing/lifting/printing an entire packet at a time. Hexagon packets can contain up to four instructions with additional modifiers, making them very difficult to scan if condensed to one line, motivating this feature request.
Are any alternative solutions acceptable?
Support for referencing the binary view in the architecture plugin (#551) would likely also provide a solution for this issue.
Alternatively, on slack I was contemplating the possibility of providing a context buffer to GetInstructionText based on the instruction start address and length returned by GetInstructionInfo. This would allow GetInstructionText to nibble off the individual instructions in a packet one at a time, while still retaining access to the whole packet context.
Additional Information:
Slack post referenced regarding alternative solutions: https://binaryninja.slack.com/archives/C1E616ZSQ/p1729965962827819
What is the feature you'd like to have?
I would like to be able to return multiple lines of text from a custom architecture plugin's
GetInstructionTextfunction. This could come in the form of a new line separatorInstructionTextTokentype, rendering of a\nTextTokenas a newline in assembly listings, or by some other method.Is your feature request related to a problem?
In the Hexagon architecture, instructions are bundled into "packets". To correctly interpret and render the start and end of packets and to detect certain flow control operations, it is necessary to examine the whole packet at once. The Hexagon support plugin from Google (https://github.com/google/binja-hexagon) achieves this by keeping their own packet context database, but this carries a large memory overhead and limits Binary Ninja to only a single Hexagon binary open at a time.
As an alternative to keeping a separate context database in the architecture plugin, I'd like to handle parsing/lifting/printing an entire packet at a time. Hexagon packets can contain up to four instructions with additional modifiers, making them very difficult to scan if condensed to one line, motivating this feature request.
Are any alternative solutions acceptable?
Support for referencing the binary view in the architecture plugin (#551) would likely also provide a solution for this issue.
Alternatively, on slack I was contemplating the possibility of providing a context buffer to
GetInstructionTextbased on the instruction start address and length returned byGetInstructionInfo. This would allowGetInstructionTextto nibble off the individual instructions in a packet one at a time, while still retaining access to the whole packet context.Additional Information:
Slack post referenced regarding alternative solutions: https://binaryninja.slack.com/archives/C1E616ZSQ/p1729965962827819