Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Samuel Thibault <samuel.thibault@gnu.org>, <bug-hurd@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCHv3,Hurd] Add hardware watch support
Date: Mon, 15 Sep 2014 22:08:00 -0000	[thread overview]
Message-ID: <87lhpko7um.fsf@schwinge.name> (raw)
In-Reply-To: <874mwcpvsy.fsf@schwinge.name>

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

Hi Samuel!

On Fri, 12 Sep 2014 19:56:13 +0200, I wrote:
> Many thanks for persisting with this patch.  The GDB testsuite shows a
> pretty good improvement!  I'll try to assess the remaining issues

From a quick scan through the »FAIL:.*watch« matches, the following one
issue should be relevant for a lot of the regressions: given, for
example, the gdb.base/pr11022 test case, on GNU/Linux we see:

    $ gcc [...]/gdb/testsuite/gdb.base/pr11022.c -g -o pr11022
    $ ./gdb -q -ex 'watch x' -ex run pr11022 
    [...]
    Hardware watchpoint 1: x
    
    Old value = 0
    New value = 42
    main () at ../../W._C._Handy/gdb/testsuite/gdb.base/pr11022.c:28
    28          j = i;  /* expect HW watchpoint stop */

... whereas on GNU Hurd we see:

    [...]
    Program received signal SIGTRAP, Trace/breakpoint trap.
    main () at ../../../W._C._Handy/gdb/testsuite/gdb.base/pr11022.c:28
    28          j = i;  /* expect HW watchpoint stop */

You may want to prepend »-ex 'maintenance set show-debug-regs on'« to see
some debugging output (and notice that »watchpoint_hit« is missing on GNU
Hurd).

I tracked this down to gdb/nat/x86-dregs.c:x86_dr_stopped_data_address
and x86_dr_stopped_by_watchpoint not returning the information as
desired, and tracked that in turn down to our kernel interface always
returning zero for DR6, the debug status register.  See the comment in
x86_dr_stopped_data_address for how GDB is using this information.  Do
you agree that thread_get_state(i386_DEBUG_STATE) should be returning the
actual DR6, and where in GNU Mach would we need to copy the DR6 register
into the PCB?


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]

  parent reply	other threads:[~2014-09-15 22:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 22:49 Samuel Thibault
2014-09-10 23:23 ` Sergio Durigan Junior
2014-09-12 18:21   ` Samuel Thibault
2014-09-12 19:18     ` Sergio Durigan Junior
2014-09-12 16:51 ` Joel Brobecker
2014-09-12 18:24   ` Samuel Thibault
2014-09-12 17:56 ` Thomas Schwinge
2014-09-12 18:01   ` Samuel Thibault
2014-09-12 20:01     ` Joel Brobecker
2014-09-12 21:24       ` Samuel Thibault
2014-09-12 21:42         ` Sergio Durigan Junior
2014-09-15 13:50         ` Joel Brobecker
2014-09-12 18:25   ` Samuel Thibault
2014-09-15 22:08   ` Thomas Schwinge [this message]
2014-09-15 23:09     ` Samuel Thibault
2014-09-16  9:00       ` Thomas Schwinge
2014-09-16 23:17         ` Samuel Thibault
2014-09-16 23:29           ` Samuel Thibault

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=87lhpko7um.fsf@schwinge.name \
    --to=thomas@codesourcery.com \
    --cc=bug-hurd@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=samuel.thibault@gnu.org \
    /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