How to update the binary handler content?
See original GitHub issueHi,
I’m creating a simple emulator for LowUIR and during my test I need to modify the content of the Binary Handler (as in a self modifying program).
As far as I understood the only way in doing this is by using the BinHandler.UpdateCode
function, that return a new handler. The function accepts an array of bytes that represent the full content of the new handler. This is a bit annoying if I have to modify just a couple of bytes (but I understand that you want to maintain BinHandler immutable).
My current strategy is:
- Convert the VA with a raw offset inside the buffer
- Read the handler buffer and modify the given bytes at the calculated offset
- create an handler with the update buffer
Is there any other easier way of doing this or what I described is the proper way?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to update a record in a Binary File? | CBSE Class XII
CBSE Class 12 Computer Science In this video, you will learn how to update a record in a binary file. ... File Handling...
Read more >Python program to modify the content of a Binary File
Step 5: Write the new object at the position “pos” and hence the record is updated and print “record successfully updated”. Step 6:...
Read more >Updating and Deleting Existing Binary Data (C#)
Updating and Deleting Existing Binary Data (C#) · Step 1: Updating the Data Access Layer · Step 2: Adding the Business Logic Layer...
Read more >Updating Record in Binary File in Python Programming
Updating records in Binary File: There is no any pre defined function available in python to update records in binary file in python....
Read more >How to update a binary file
I'm creating a GUI, and I use a method "getStudentInfo()" of the Student object return data type to retrieve information from the JTextFields ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please checkout: 40e7be659ede4305cc36630e38fbc462525f2943
You should now be able to modify the buffer by:
Or even by:
I am reopening the issue so that we don’t forget.