Watchpoint a fixed address

╄→尐↘猪︶ㄣ 提交于 2019-12-03 04:02:30

问题


For my current embedded application I am trying to put GDB watch point at a fixed memory address.

As an example, my application updates the following address: 0x10793ad0. In order to be sure which part of the code is corrupting the value, I tried

watch 0x10793ad0

Even though GDB does not print any error after this, it is not able to break during execution even though I verified the value is getting modified at between start and end of execution.

Questions:

  1. Can I really put watch at a fixed address? I didn't come across any such example online.
  2. Is this the right way or am I missing something?

回答1:


The right way to set watchpoint on address is watch *0x10793ad0. See gdb doc



来源:https://stackoverflow.com/questions/3649438/watchpoint-a-fixed-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!