In which scenario it is useful to use Disassembly language while debugging

前端 未结 4 708
无人共我
无人共我 2021-01-14 21:28

I have following basic questions :

  • When we should involve disassembly in debugging

  • How to interpret disassembly, For example be

4条回答
  •  轮回少年
    2021-01-14 21:55

    1 - We should (I) involve disassembly in debugging as a last resort. Generally, an optimizing compiler generates code that is not trivial to understand to the human eye. Instructions are reordered, some dead code is eliminated, some specific code is inlined, etc, etc. So it is not necessary and not easy when necessary to understand disassembled code. For example, I sometimes look at the disassembly to see if constants are part of the opcode or are stored in const variables.

    2 - That piece of code calls a function like getRequiredFields(result, 0, arItem). You have to learn assembly language for the processor you want. For x86, go to www.intel.com and get the manuals of the IA32.

提交回复
热议问题