Assembler

The Patch Instruction action will allow you to edit the current assembly instruction in the listing. The first time you use the action, it may take a moment to prepare the assembler for your processor. You can then edit the text of the instruction, optionally replacing it altogether. As you edit, a content assists will provide completion suggestions. It will present a list of byte sequences when the text comprises a complete instruction. Activating a completion suggestion will input that text at your cursor. Activating a byte sequence will complete the action, replacing the instruction at your cursor. Pressing ESC or clicking outside of the assembly editor will cancel the action.

Assembly Editor

To edit assembly, select Patch Instruction from the Listing View context menu or press CTRL-SHIFT-G on the instruction to modify. Click the plus button below the content assist to exhaust the undefined bits.

Ghidra's assembler is based on the same SLEIGH modeling that powers the disassembler. This offers some nice benefits:

Keep in mind, the above list is in an ideal world. We are in the process of improving the assembly engine and processor modules to eventually support assembly for all of Ghidra's processors. In the meantime, we test several popular processors and assign a performance rating to each. The possible ratings are:

  1. Platinum: Our automated tests did not find any errors. This offers the best possible user experience.
  2. Gold: You will rarely encounter an error. You will find it very useful.
  3. Silver: You may occasionally encounter an error, but the assembler is still usable. You will likely find it useful with occasional frustration.
  4. Bronze: You are likely to encounter errors, but there are enough working instructions that the assembler is useful. You may find it useful, but it will probably be frustrating.
  5. Poor: You are likely to encounter severe errors, and there are few instructions that assemble. You may or may not find it useful, but we consider it unusable.
  6. Unrated: The processor is not tested, or the test failed before a rating could be assigned. You might get lucky, but don't count on it.

As of this release, our tested processors fall under Platinum, Gold, or Poor.

Provided by: Assembler plugin

Related Topics: