What is the difference between hardware and software breakpoints?

前端 未结 7 551
梦谈多话
梦谈多话 2020-12-13 04:17

What is the difference between hardware and software breakpoints?

Are hardware breakpoints are said to be faster than software breakpoints, if yes then how, and also

7条回答
  •  忘掉有多难
    2020-12-13 05:00

    In addition to the answers above, it is also important to note that while software breakpoints overwrite specific instructions in the program to know where to stop, the more limited number of hardware breakpoints are actually part of the processor.

    Justin Seitz in his book Gray Hat Python points out that the important difference here is that by overwriting instructions, software breakpoints actually change the CRC of the file, and so any sort of program such as a piece of malware which calculates its CRC can change its behavior in response to breakpoints being set, whereas with hardware breakpoints it is less obvious that the debugger is stopping and stepping through certain chunks of code.

提交回复
热议问题