This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: awatch and rwatch vs watch
- To: Eli Zaretskii <eliz@delorie.com>
- Subject: Re: awatch and rwatch vs watch
- From: jtc@redback.com (J.T. Conklin)
- Date: 09 Aug 1999 11:44:35 -0700
- Cc: gdb-patches@sourceware.cygnus.com, DJ Delorie <dj@delorie.com>, Jim Blandy <jimb@cygnus.com>, Stan Shebs <shebs@cygnus.com>
- References: <199907110846.EAA00532@indy.delorie.com>
- Reply-To: jtc@redback.com
>>>>> "Eli" == Eli Zaretskii <eliz@delorie.com> writes:
Eli> Here's a fragment from watch_command_1:
Eli> if (accessflag == 1) bp_type = bp_read_watchpoint;
Eli> else if (accessflag == 2) bp_type = bp_access_watchpoint;
Eli> else bp_type = bp_hardware_watchpoint;
Eli>
Eli> mem_cnt = can_use_hardware_watchpoint (val);
Eli> if (mem_cnt == 0 && bp_type != bp_hardware_watchpoint)
Eli> error ("Expression cannot be implemented with read/access watchpoint.");
Eli> Why is bp_hardware_watchpoint treated specially here?
A hardware watchpoint, which triggers if an expression has changed (ie
a value is written), is the only type of watchpoint that can currently
be demoted to a software watchpoint. To implement awatch or rwatch in
software, you'd have to examine each instruction as it is stepped to
determine if a value in a watchpoint expression was accessed or read.
--jtc
--
J.T. Conklin
RedBack Networks