Variable watchpoint and memory watchpoint

Fernando Nasser fnasser@cygnus.com
Thu Jul 20 17:20:00 GMT 2000


Fabrice Gautier wrote:
> 
> Hi,
> 
> It doesn't seem possible to set watchpoint on variables (ie: that halts the
> program when the variable value change) nor on memory words with GDB. Or am
> I missing something?
> 
You haven't missed anything.  See below...


> At least I didn't saw anything in the insights menus. Is there a console
> command for this?
> 
Yes, there are console commands and, for now, this is the only way you can
set watchpoints. Use the console help command and you find the "watch" variety
(under the breakpoint category).


> Also, I'm working with ARM and i know that the ARM debugger for Windows is
> able to set such watchpoints.
> 
All targets are able to implement watchpoints by single-stepping (very slow).
Some CPUs have hardware support and some Operating Systems or gdb stubs give
access to this facility.  There is nothing of the sort for ARM so you'll have
to rely on the software implemented ones.



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299


More information about the Gdb mailing list