This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Variable watchpoint and memory watchpoint
- To: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Subject: Re: Variable watchpoint and memory watchpoint
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 21 Jul 2000 00:20:13 +0000
- CC: "GDB (E-mail)" <gdb at sourceware dot cygnus dot com>
- Organization: Red Hat Canada Ltd. - Toronto
- References: <21DDE8E5343ED411840A00A0CC3340201047E3@EXCHANGE5_5>
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