问题描述
硬件和软件断点之间有什么区别?硬件断点是否比软件断点更快,如果是,那么为什么会这样我们需要软件断点?
本文提供了一个很好的讨论利弊:
为了直接回答您的问题,软件断点更灵活,因为硬件断点在某些功能方面有限,而且依赖于架构高度。文章中给出的一个例子是x86硬件限制了4个硬件断点。
硬件断点更快,因为它们具有专用寄存器,而且比软件断点更少的开销。 / p>
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 then why would we need the software breakpoints at all?
This article provides a good discussion of pros and cons:http://www.nynaeve.net/?p=80
To answer your question directly software breakpoints are more flexible because hardware breakpoints are limited in some functionality and highly architecture-dependant. One example given in the article is that x86 hardware has a limit of 4 hardware breakpoints.
Hardware breakpoints are faster because they have dedicated registers and less overhead than software breakpoints.
这篇关于硬件和软件断点有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!