Skip to content

Implementing indirect instruction execution in processor plugin #6612

Answered by shuffle2
shuffle2 asked this question in Q&A
Discussion options

You must be logged in to vote

I eventually arrived at something that seems to produce good results, although I think it may highlight some issues in existing ghidra code.

I split the functionality for decoding the indirectly referenced instructions, then only return pcode in the injection hook, and perform the extra annotation in an Analyzer:

package plugin.core.analysis;
//...
public class EX9ITDisassembler {
	private Program program;
	private ProgramContext programContext;
	private Language language;
	private Memory memory;
	private final int INSTRUCTION_TABLE_ENTRY_LENGTH = 4;
	private Register itbReg;
	private Listing listing;
	private Address zeroAddress;
	private final String EX9IT_MNEMONIC = "EX9.IT";

	public E…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by shuffle2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6611 on May 31, 2024 16:00.