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

Patching - show bytes and/or the length of of new instructions #5678

Open
teropentis64 opened this issue Jul 1, 2024 · 4 comments
Open

Patching - show bytes and/or the length of of new instructions #5678

teropentis64 opened this issue Jul 1, 2024 · 4 comments
Labels
Component: Assemblers Component: UI Issue needs changes to the user interface Effort: Medium Issue should take < 1 month Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Dialogs Issues with smaller dialogs

Comments

@teropentis64
Copy link

teropentis64 commented Jul 1, 2024

When patching, there should be a preview of bytes in currently written instruction.

I've made a small visualisation of what I mean:

patching
prev2

assembly
assem1

if doesn't fit, wrap
(00 should be wrapped instead of 48, my bad)
assem2

@xusheng6 xusheng6 added Type: Enhancement Issue is a small enhancement to existing functionality Component: UI Issue needs changes to the user interface Impact: Low Issue is a papercut or has a good, supported workaround Effort: Medium Issue should take < 1 month UI: Dialogs Issues with smaller dialogs Component: Assemblers labels Jul 2, 2024
@xusheng6
Copy link
Member

xusheng6 commented Jul 2, 2024

This would not be super easy to do -- would you like to let us know why you would want this?

@teropentis64
Copy link
Author

teropentis64 commented Jul 2, 2024

Oh I thought it would. I've saw it i every other major RE environment and i find it very helpful to instantly see if im going out of bounds of original instruction. Also: I don't think assembly one is that important but inline edit - definitely.

@xusheng6
Copy link
Member

xusheng6 commented Jul 2, 2024

Thanks for the input! Right now, when you try to assemble a longer instruction, binja will remind you that the new instruction is longer and will overwrite the bytes after it. Maybe we can prompt that info in real time as people type to let them know about it.

I am personally not inclined towards showing the actual bytes -- I feel like they are less useful compared against the length info

@teropentis64
Copy link
Author

Ah yes, I just thought about the usual implementation. You're right, I care about length not the bytes. I think macOS popup every time I go out of bound would be annoying. Maybe just a counter on the side of the old vs new instruction. But I bet You know better how to do it.
Thanks!

@xusheng6 xusheng6 changed the title Patching - show bytes of new instruction Patching - show bytes and/or the length of of new instructions Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Assemblers Component: UI Issue needs changes to the user interface Effort: Medium Issue should take < 1 month Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Dialogs Issues with smaller dialogs
Projects
None yet
Development

No branches or pull requests

2 participants