Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>,
	       "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Add watchpoint hit address function to procfs.c
Date: Mon, 10 May 2010 21:33:00 -0000	[thread overview]
Message-ID: <001801caf088$4d8a7ae0$e89f70a0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201005102027.10080.pedro@codesourcery.com>

> See here for a workaround that requires no testsuite changes:
>  <http://sourceware.org/ml/gdb-patches/2010-04/msg00544.html>

  Yes, but that one requires root privileges...
I will try to resubmit my lib/gdb.exp patch shortly...
 
> >   So there are no regressions.
> 
> Thanks.
> 
> > Remaining failures are:
> > pierre@fpcOpenSolaris:~/gdbcvs/build64/gdb/testsuite$ grep FAIL
> gdbv4.sum
> > FAIL: gdb.base/watch-read.exp: read watchpoint triggers when value
> doesn't change, trapping reads and writes
> > FAIL: gdb.base/watch-read.exp: only read watchpoint triggers when
> value doesn't change
> 
> Odd.  I don't suppose a procfs client is supposed to
> handle overlapping watchpoints instead of having the kernel
> handle them?  The test explicitly sets a write watchpoint watching
> the same memory as a read watchpoint, and expects reads to still
> be trapped.  Maybe the write request overwrote the read
> request?  Maybe this is a kernel bug?
No idea here, the log inspection clearly confirms that
the read watch after watch insertion is missed.

> > KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in
> > multithreaded
> > app (PRMS: gdb/10116)
> > FAIL: gdb.threads/watchthreads.exp: threaded watch loop
> > FAIL: gdb.threads/watchthreads.exp: first watchpoint on args[0] hit
> > FAIL: gdb.threads/watchthreads.exp: first watchpoint on args[1] hit
> > FAIL: gdb.threads/watchthreads.exp: watchpoint on args[0] hit in
> thread
> > FAIL: gdb.threads/watchthreads.exp: watchpoint on args[1] hit in
> thread
> > FAIL: gdb.threads/watchthreads.exp: combination of threaded
> watchpoints = 30

  Those failure are a problem within the watchthreads.exp
source, the test uses '\r' patterns without the '\n' as is usual...
If I replace all '\r' by '\r+' then there are no failures left
for that test.
  I ran again both versions (with TIDGET or plain zero)
and got exactly the same output for both. Thus, apparently the 
thread number is not necessary to get the location of the
watchpoint even if it is not in the main thread (for my OpenSolaris version
at least...)
  
  
  It is rather unusual to use \r patterns alone inside the 
GDB testsuite...

   The following patch fixes the failures shown here,
is this patch OK, or should I replace all '\r' into '\r\n'
(in that case, my lib/gdb.exp patch would catch it...)

Pierre

testsuite ChangeLog entry:
 
2010-05-10  Pierre Muller  <muller@ics.u-strasbg.fr>

	* gdb.threads/watchthreads.exp: Allow multiple `\r' in
	regular expression pattern to avoid problems with systems
	uses `Dos-like' newlines.

Index: watchthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/watchthreads.exp,v
retrieving revision 1.11
diff -u -p -r1.11 watchthreads.exp
--- watchthreads.exp    5 May 2010 18:07:03 -0000       1.11
+++ watchthreads.exp    10 May 2010 21:12:44 -0000
@@ -79,11 +79,11 @@ for {set i 0} {$i < 30} {incr i} {
        # At least one hardware watchpoint was hit.  Check if both were.
        set string $expect_out(1,string)

-       if [regexp "Hardware watchpoint 2:
args\\\[0\\\]\[^\r\]*\r\[^\r\]*\r\[^\r\]*Old value =
$args_0\[^\r\]*\r\[^\r\]*New value = [expr $args_0+1]\r" $string] {
+       if [regexp "Hardware watchpoint 2:
args\\\[0\\\]\[^\r\]*\r+\[^\r\]*\r+\[^\r\]*Old value =
$args_0\[^\r\]*\r+\[^\r\]*New value = [expr $args_0+1]\r+" $string] {
            incr args_0
            incr test_flag_0
        }
-       if [regexp "Hardware watchpoint 3:
args\\\[1\\\]\[^\r\]*\r\[^\r\]*\r\[^\r\]*Old value =
$args_1\[^\r\]*\r\[^\r\]*New value = [expr $args_1+1]\r" $string] {
+       if [regexp "Hardware watchpoint 3:
args\\\[1\\\]\[^\r\]*\r+\[^\r\]*\r+\[^\r\]*Old value =
$args_1\[^\r\]*\r+\[^\r\]*New value = [expr $args_1+1]\r+" $string] {
            incr args_1
            incr test_flag_1
        }
  




  parent reply	other threads:[~2010-05-10 21:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 14:17 Pierre Muller
2010-05-07 15:25 ` Pedro Alves
2010-05-08 16:46   ` Pierre Muller
2010-05-08 17:24     ` Pedro Alves
2010-05-10  7:16       ` Pierre Muller
2010-05-10 19:27         ` Pedro Alves
2010-05-10 21:23           ` Joel Brobecker
2010-05-12  2:31             ` Reformat procfs.c (was: Re: [RFC] Add watchpoint hit address function to procfs.c) Pedro Alves
2010-05-17 10:50               ` Pedro Alves
2010-05-10 21:33           ` Pierre Muller [this message]
2010-05-10 21:49             ` [RFC] Add watchpoint hit address function to procfs.c Pedro Alves
2010-05-10 22:19               ` [RFA] " Pierre Muller
2010-05-11 11:49                 ` Pedro Alves

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='001801caf088$4d8a7ae0$e89f70a0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@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