> If I would change a thing, it would only be to extend the loop condition
> to include `&& ud_insn_mnemonic (&ud_obj) != UD_Iret`, so as to avoid
> running outside the function.

Yes, I was thinking about this after I sent the patches: terminate the
loop(s) if it hits a `ret` or possibly an unconditional `jmp`, and add the
same check to the ARM64 version.

I also was thinking about adding a link to the ARM doc I was using to
either the commit message or a comment.  The existing code didn't seem to
take any particular trouble that the reader might not be familiar with how
x86 instructions are represented in machine code, but dropping a link to
this doc shouldn't hurt (and it's substantially easier to follow than
Appendices A & B of Volume 2 of the Intel Software Developer's Manual :P)

Reply via email to