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

Search does not show all occurrences of search term #3359

Open
1 of 3 tasks
JomerDev opened this issue Jul 1, 2024 · 2 comments
Open
1 of 3 tasks

Search does not show all occurrences of search term #3359

JomerDev opened this issue Jul 1, 2024 · 2 comments
Labels
rizin Needs changes into rizin codebase.

Comments

@JomerDev
Copy link

JomerDev commented Jul 1, 2024

Environment information

  • Operating System: Windows 10
  • Cutter version: 2.3.4-HEAD-209c26b
  • Obtained from:
    • Built from source
    • Downloaded release from Cutter website or GitHub
    • Distribution repository
  • File format: binary (m68k assembly)

Describe the bug
When trying to understand assembly code I often search for known memory addresses to see what gets written or read from them.
Sadly, the search only seems to show entries that I have actually looked at at some point (or added comments to).
I've had the issue multiple times now where I search for an address (lets say 0x80000f), add a comment to all reads from it (because it is a known register that starts a command), read through the code for a bit and stumble upon more reads of that address that were not found in the search, since they don't have the comment. After I've found them in the code they show up in the search as well. It also seems like the search mode "Raw" finds less entries than "All maps", but both don't find all occurrences

To Reproduce

Steps to reproduce the behavior:

  1. Open up a binary (mine was m68k/68020 assembly, a 256kb file)
  2. Use a memory address to search for that shows up in the code
  3. Click on a line with that address
  4. Search for that address in the "Raw" search mode (it should show up)
  5. Scroll the disassembly window to a different place (address 0x00 worked for me)
  6. Search for the address from before in the "Raw" search mode (it shouldn't show up)
  7. Navigate back to the place the address was used (you might have to click on the actual line)
  8. Search for the address from before in the "Raw" search mode (it shows up again)

I also tried the "All maps" search mode where some entries always showed up but not all

Expected behavior
There should be at least one search mode that

  1. Searches the whole file (I would expect "Raw" to do so but maybe I'm wrong)
  2. Actually shows all occurrences of the search term through the whole file

Screenshots
While looking at the lines:
image
After navigating to 0x00:
image

@XVilka XVilka added the rizin Needs changes into rizin codebase. label Aug 11, 2024
@XVilka
Copy link
Member

XVilka commented Aug 11, 2024

Could you please share that file?

@JomerDev
Copy link
Author

Sure: Scanco_EEPROM20_4_31B.zip

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

No branches or pull requests

2 participants