开发者

Global variable is changed, but memory breakpoint is not hit

I have a bool variable which should b开发者_如何学Pythone true, but is sometimes set to false. I have set a memory breakpoint to see what is changing that. To my surprise, the breakpoint did not hit, but the variable went to false again.

What could change the memory without memory breakpoint catching it?


A few thoughts.

  1. If you pass the bool value into a kernel function and THAT is changing it (or perhaps a kernel function call is overwriting memory because it is called incorrectly) then that won't fire a data breakpoint.

  2. If you are using multiple processes and another process, that isn't being debugged, writes to that memory location then you the breakpoint won't get triggered.

  3. (Edit) As pointed out in the comments a DMA into the memory the hardware breakpoint is on will also not get picked up.

My guess is that you aren't checking a buffer size appropriately somewhere and you are getting hit by (1), perhaps when reading data from a file?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜