Skip to content

Commit

Permalink
Jump Over hotkey changed as NavigatableContextAction
Browse files Browse the repository at this point in the history
This means that now there is no need to focus the cursor on the disassembled listing.
  • Loading branch information
Nalen98 committed Dec 26, 2022
1 parent 07dc872 commit 1042ef2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Jump over feature allows you to jump ahead one instruction if you don't want to

`MOV RAX, qword ptr FS:[0x28]`

We'll just try to cheat a little and jump over it by increasing the PC value. To do this, stop at the instruction you don't want to emulate, click anywhere in the space of Ghidra disassm listing to have focus on it and press `J` hotkey. Otherwise, stepping further, we would get an uninitialized memory read error.
We'll just try to cheat a little and jump over it by increasing the PC value. To do this, stop at the instruction you don't want to emulate and press `J` hotkey. Otherwise, stepping further, we would get an uninitialized memory read error.

![Jump Over](./images/JumpOver.gif)

Expand Down
Binary file modified images/JumpOver.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/main/java/ghidraemu/GhidraEmuPopup.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import docking.action.MenuData;
import ghidra.app.context.ListingActionContext;
import ghidra.app.context.ListingContextAction;
import ghidra.app.context.NavigatableActionContext;
import ghidra.app.context.NavigatableContextAction;
import ghidra.app.plugin.core.colorizer.ColorizingService;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address;
Expand Down Expand Up @@ -161,9 +163,9 @@ protected void actionPerformed(ListingActionContext context) {
tool.addAction(unsetBreak);

// new feature - jump over the instruction
ListingContextAction jumpOver = new ListingContextAction("Jump over the instruction", getName()) {
NavigatableContextAction jumpOver = new NavigatableContextAction("Jump over the instruction", getName()) {
@Override
protected void actionPerformed(ListingActionContext context) {
protected void actionPerformed(NavigatableActionContext context) {
Address badPlace = GhidraEmuProvider.emuHelper.getExecutionAddress();
unsetColor(badPlace);
GhidraEmuProvider.setNextPC();
Expand Down

0 comments on commit 1042ef2

Please sign in to comment.