Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: adjust watchpoint testing
Date: Mon, 12 Jun 2006 16:30:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0606130003580.6222@localhost.localdomain> (raw)
In-Reply-To: <4489E0D8.2000702@codesourcery.com>

Nathan,

I had similar concerns about these watchpoint tests with you.  However, 
I'd like to propose a somewhat different solution.

On Fri, 9 Jun 2006, Nathan Sidwell wrote:

> the recurse.exp test presume there are at least two hardware watchpoints.  

In my opinion, recurse.exp doesn't presume that. If there is no hardware 
watchpoint support, it will use software simulated ones.  If the target 
can support only one h/w watchpoint, the second will switch to software 
watchpoint.

This target-dependent feature might incur confusion some where.  One 
may have difficulty in knowing for sure what this case is trying to 
test: s/w watchpoint, or h/w watchpoint, or both?  If there are errors 
reported, what type of watchpoint trigger that?  To track into the root 
cause, which code to look at? 

To clarify the situation, I propose to let recurse.exp based on totally on 
software simulated watchpoint.  This can be done easily, by using "set 
can-use-hardware-watchpoint 0".

Then we can add another similar testcase, specifically designed for 
hardware watchpoint. This testcase will first detect if there are any 
hardware watchpoint in the underlying target.  If there are any, then go 
on with the test, otherwise skip and quit.

In this h/w watchpoint specific testcase, we can also add some tests for 
rwatch and awatch, which is not touched by any testcase in current gdb  
testsuite (that is my reading of the code, correct me if I am wrong).

For simplicity, we can use only one watchpoint. This has another strength 
in that it don't make any assumption.

This is my rough thought. I had some code, but not finished yet.  So I am 
very appreciated if anyone can provide any comment or insight into my 
proposal.  Thanks a lot in advance.

Regards
- Wu Zhou 

> This
> patch adds a gdb,hardware_watchpoint target info variable and adjust the test to
> only test where two watchpoints are used, if they exist on the target.
> 
> I found it necessary to adjust the watchpoint.exp expected reply too.
> 
> ok?
> 
> nathan
> -- 
> Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
> nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk
>  


  reply	other threads:[~2006-06-12 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09 20:58 Nathan Sidwell
2006-06-12 16:30 ` Wu Zhou [this message]
2006-06-12 16:40   ` Nathan Sidwell
2006-06-13  6:12     ` Wu Zhou
2006-06-13  6:23       ` Nathan Sidwell
2006-06-13  6:43         ` Wu Zhou
2006-06-13  7:07           ` Nathan Sidwell
2006-06-13 10:20             ` Wu Zhou
2006-06-13 10:25               ` Nathan Sidwell
2006-06-13 17:30           ` Eli Zaretskii
2006-06-14  1:21             ` Wu Zhou
2006-06-14  2:52               ` Daniel Jacobowitz
2006-06-14  3:32               ` Eli Zaretskii
2006-06-13 13:11       ` Daniel Jacobowitz

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=Pine.LNX.4.64.0606130003580.6222@localhost.localdomain \
    --to=woodzltc@cn.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nathan@codesourcery.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