This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Variable watchpoint and memory watchpoint


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]