-
Notifications
You must be signed in to change notification settings - Fork 149
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
Address edits by offset value #269
base: master
Are you sure you want to change the base?
Conversation
…t_changed This keeps the coding style a bit more consistent
Rename append_to_travel_history to append_history
dialog = InputDialogForm(self, item_list=[("Offset addresses by:",'')]) | ||
if dialog.exec(): | ||
offset_value = dialog.get_values() | ||
offset_int = int(offset_value, 16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the user does not input a valid hex number?
print(offset_int) | ||
for row in self.treeWidget_AddressTable.selectedItems(): | ||
desc, address_expr, value_type = self.read_address_table_entries(row) | ||
address = row.text(ADDR_COL).strip("P->") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're stripping P-> but that's grabbing the resolved address from the pointer chain.
Unless you modify the chain and add the value to the last offset directly, it will just break again.
Added small feature to allow changing selected addresses by specified offset value. Using either the Edit popup menu option or the Shift+Return shortcut, a hex value can be entered (positive or negative) and will then modify the addresses of all selected records by that value.