Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instrIndex in the current UIActionContext becomes -1 after navigating to a history entry in the linear view #6320

Open
xusheng6 opened this issue Jan 15, 2025 · 1 comment

Comments

@xusheng6
Copy link
Member

This is created to track the leftover issue of #6254. Basically, since we are not restoring the instrIndex when we navigate to a history entry in the linear view, it gets its default value (-1). While this behavior is much better than the original behavior (the value is read before initialization and can return anything), it is still not the most desired result.

We cannot simply save the instrIndex into the HistoryEntry object -- since the instrIndex could change in the future. Also, this issue is unlikely to make substantial difference to the user -- since if they randomly click somewhere in the linear view, these things will all be populated correctly. In other words, the instrIndex is only missing when the user does not click anywhere else. In this sense, if we do not find out a good way to restore it, I think it is tolerable to leave it as-is. That said, I am still creating this issue to track the progress and latest status on it

@xusheng6
Copy link
Member Author

Repro steps:

  1. Open any binary and switch to linear view
  2. Double-click a function to navigate to it
  3. Press Escape to go back
  4. Run following code in Python console:
>>> hex(current_ui_action_context.instrIndex)
'0xffffffffffffffff'
  1. Also notice if I click on any other instruction, the value becomes correctly populated:
>>> hex(current_ui_action_context.instrIndex)
'0x4'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant