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

ATT syntax decode is ambiguous #113

Open
robertwhitton opened this issue May 24, 2016 · 2 comments
Open

ATT syntax decode is ambiguous #113

robertwhitton opened this issue May 24, 2016 · 2 comments

Comments

@robertwhitton
Copy link

In the function ud_translate_att "size" is initialised to zero and isn't subsequently set. Consequently some instructions decode ambiguously and it isn't possible to determine the size of the operation. For example a "mov" instruction with operands of the following type:

mov UD_OP_IMM, UD_OP_MEM

For cases such as this size of the operation is ambiguous in the disassembly.

I suggest that udis86 takes a lead from objdump and for such ambiguous cases appends b, w, l, q to the mnemonic as appropriate. For the case above (and I don't know if there are other similar cases) the attached patch appears to be helpful:

patch.txt

@robertwhitton
Copy link
Author

Another set of cases are the single operand instructions such as "not" with an operand of type UD_OP_MEM, New patch attached.

patch2.txt

@robertwhitton
Copy link
Author

Yet more cases come to light. All candidate changes attached:

patch3.txt

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

No branches or pull requests

1 participant