Watch a memory range in gdb?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am debugging a program in gdb and I want the program to stop when the memory region 0x08049000 to 0x0804a000 is accessed. When I try to set memory breakpoints manually, gdb does not seem to support more than two locations at a time. (gdb) awatch *0x08049000 Hardware access (read/write) watchpoint 1: *0x08049000 (gdb) awatch *0x08049001 Hardware access (read/write) watchpoint 2: *0x08049001 (gdb) awatch *0x08049002 Hardware access (read/write) watchpoint 3: *0x08049002 (gdb) run Starting program: /home/iblue/git/some-code/some-executable