Breakpoint on Memory Range?

Eli Zaretskii eliz@delorie.com
Tue May 23 03:14:00 GMT 2000


> Does GDB 5.0 (i386 NetBSD) offer the ability to stop execution when there
> has been a "write" to a memory range?

GDB supports watchpoints on several x86-based platforms.  You say
"watch foo", resume the program, and the debugger will kick in when
the address of the variable `foo' is written to.

On 32-bit x86 targets, GDB typically can watch no more than 16 bytes
of memory, due to x86 debug registers limitations.

I have no idea if the NetBSD version of GDB supports watchpoint, but
you could try.  The GDB manual has more info about watchpoints.


More information about the Gdb mailing list