Option to omit redundant size directives #1342

Open
nitrocaster opened this Issue Dec 2, 2016 · 5 comments

Projects

None yet

2 participants

@nitrocaster

Consider the following example:

mov eax, dword ptr ds:[ecx]

Since the destination is eax, which is 32-bit register, and the instruction is plain mov, it's obvious that [ecx] is a 32-bit value. IDA Pro omits such redundant directives and it would be nice to have this option in x64dbg.

@mrexodia
Member
mrexodia commented Dec 2, 2016
@nitrocaster
nitrocaster commented Dec 2, 2016 edited

I reverse engineer stuff and occasionally write in x86 assembly. In this particular case it is obviously redundant and makes the code too verbose, not helping to read and understand it. I believe that is the reason why IDA hides it.
Anyway, I suggest to add an option, not just omit these directives. Please note that I suggest omit only redundant ones, like the one in the first post. For example, in mov dword ptr ds[ecx], 5 size directive is absolutely necessary because 5 could be anything from byte to dword.

@mrexodia
Member
mrexodia commented Dec 2, 2016
@nitrocaster

It doesn't matter much for your understanding anyway.

It matters in one case but not in the other. I provided an example for each case. Hope you understand now.

@mrexodia
Member
mrexodia commented Dec 2, 2016

I already understood the issue after the first post, but I wouldn't know a good heuristic to determine when a size specifier is redundant. The most trivial case mov reg32, dword ptr ds:[mem] might work, but I'm not sure if overloaded variations exist where equal memory sizes are important or not the general case. The solution assembler-wise is still a pure hack and doesn't work in all cases (look for issues with 'XEDParse' if you're interested).

@mrexodia mrexodia added the feature label Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment