From: Daniel Jacobowitz <drow@false.org>
To: Wu Zhou <woodzltc@cn.ibm.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
gdb-patches@sources.redhat.com, bje@au1.ibm.com,
anton@au1.ibm.com, pgilliam@us.ibm.com
Subject: Re: [RFC] GDB patches for hw watchpoints - revised
Date: Tue, 24 Jan 2006 21:20:00 -0000 [thread overview]
Message-ID: <20060124212046.GC26974@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601241816210.3568@wks190239wss.cn.ibm.com>
On Tue, Jan 24, 2006 at 06:59:53PM +0800, Wu Zhou wrote:
> Hi Daniel,
>
> Because there are quite a few places in different arch/target of GDB which
> use region_size_ok_for_hw_watchpoint, so I am prefering to get this done
> in two steps: first add to_region_ok_for_hw_watchpoint into struct
> target_ops, then replace these to_region_size_ok_for_hw_watchpoint
> reference with to_region_ok_for_hw_watchpoint ones. IMHO, it is easier to
> not confuse the original intention of this patch with this replacement.
> What is your thought on this?
Sure. Couple small things but we're almost done.
> (ppc_linux_check_watch_resources): New function to check whether
> the target has available hardware watchpoint resource.
> (ppc_linux_region_ok_for_hw_watchpoint): New function to check if
> the region is ok for hardware watchpoint.
> (ppc_linux_insert_watchpoint): New function to insert a hardware
> watchpoint.
> (ppc_linux_remove_watchpoint): New function to remove a hardware
> watchpoint.
> (ppc_linux_stopped_data_address): New function to get the stopped
> data address of the watchpoint.
> (ppc_linux_stopped_by_watchpoint): New function to see if the
> inferior is stopped by watchpoint.
"New function" is sufficient; if you feel that the function needs an
explanation, it should go in the code, not in the changelog.
> target.h (struct target_ops): Add a new target vector
Missed a "* " there.
> + /* P630 has nonsteppable watchpoint. So we are assuming that all PowerPC
> + targets have nonsteppable watchpoint. */
> + set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
Please skip this comment.
> @@ -1575,6 +1582,12 @@ find_default_create_inferior (char *exec
> }
>
> static int
> +default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
> +{
> + return (len <= TYPE_LENGTH (builtin_type_void_data_ptr));
> +}
TARGET_REGION_OK_FOR_HW_WATCHPOINT will now always be defined, because
of the #ifdef in target.h. Therefore this won't trigger (from
breakpoint.c):
#if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT)
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN))
#endif
So you need to call TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (len) here,
in case the target has overridden that.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-01-24 21:20 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 15:26 Wu Zhou
2005-12-22 15:38 ` Wu Zhou
2005-12-22 15:57 ` Eli Zaretskii
2005-12-22 15:57 ` Wu Zhou
2005-12-23 20:52 ` Eli Zaretskii
2006-01-22 20:56 ` Daniel Jacobowitz
2006-01-24 3:40 ` Wu Zhou
2006-01-24 3:43 ` Daniel Jacobowitz
2006-01-24 4:33 ` Wu Zhou
2006-01-24 11:00 ` Wu Zhou
2006-01-24 21:20 ` Daniel Jacobowitz [this message]
2006-01-25 3:19 ` Wu Zhou
2006-01-25 8:34 ` Replace to_region_size_ok_for_hw_watchpoint references with to_region_ok_for_hw_watchpoint ones Wu Zhou
2006-02-02 1:43 ` [RFC] GDB patches for hw watchpoints - revised Daniel Jacobowitz
2006-02-08 5:35 ` Wu Zhou
2006-02-09 5:44 ` Wu Zhou
2006-02-09 7:44 ` Eli Zaretskii
2006-02-13 9:53 ` Wu Zhou
-- strict thread matches above, loose matches on Subject: below --
2005-12-06 19:54 Wu Zhou
2005-12-06 22:46 ` Ulrich Weigand
2005-12-09 12:00 ` Wu Zhou
2005-12-09 14:34 ` Ulrich Weigand
2005-12-06 23:05 ` Eli Zaretskii
2005-12-06 23:31 ` Daniel Jacobowitz
2005-12-09 12:04 ` Wu Zhou
2005-12-09 14:22 ` Daniel Jacobowitz
2005-12-09 18:58 ` Eli Zaretskii
2005-12-10 22:23 ` Wu Zhou
2005-12-11 11:12 ` Daniel Jacobowitz
2005-12-11 14:39 ` Wu Zhou
2005-12-13 22:47 ` Wu Zhou
2005-12-14 18:12 ` Eli Zaretskii
2005-12-14 18:13 ` Daniel Jacobowitz
2005-12-15 20:06 ` Wu Zhou
2005-12-16 0:10 ` Anton Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060124212046.GC26974@nevyn.them.org \
--to=drow@false.org \
--cc=anton@au1.ibm.com \
--cc=bje@au1.ibm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=pgilliam@us.ibm.com \
--cc=woodzltc@cn.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox