Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Add hardware breapoints in procfs.c
Date: Fri, 15 May 2009 15:41:00 -0000	[thread overview]
Message-ID: <20090515154125.GO7292@adacore.com> (raw)
In-Reply-To: <003801c9d4db$380e2ff0$a82a8fd0$@u-strasbg.fr>


> 2009-05-14  Pierre Muller  <muller@ics.u-strasbg.fr>
>  
>  	* procfs.c (procfs_insert_hw_breakpoint, procfs_remove_hw_breakpoint):
>  	New functions.
>  	(procfs_use_watchpoints): Register new hardware breakpoint related
>  	target functions.

I don't know procfs enough to review the patch accurately. I think
that the part for removing the watchpoint is correct, but I'm wondering
about the part that sets the watchpoint. Does it always stop before
the instruction gets executed? for instance, if you look at 
procfs_insert_watchpoint, it does depend on the target:

  if (!target_have_steppable_watchpoint
      && !gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
    {
      /* When a hardware watchpoint fires off the PC will be left at
         the instruction following the one which caused the
         watchpoint.  It will *NOT* be necessary for GDB to step over
         the watchpoint.  */
      return procfs_set_watchpoint (inferior_ptid, addr, len, type, 1);
    }
  else
    {
      /* When a hardware watchpoint fires off the PC will be left at
         the instruction which caused the watchpoint.  It will be
         necessary for GDB to step over the watchpoint.  */
      return procfs_set_watchpoint (inferior_ptid, addr, len, type, 0);
    }

Does it matter for h/w breakpoints?

-- 
Joel


  reply	other threads:[~2009-05-15 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 21:24 Pierre Muller
2009-05-14 21:30 ` Pierre Muller
2009-05-15 15:41   ` Joel Brobecker [this message]
2009-05-15 15:51     ` Joel Brobecker

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=20090515154125.GO7292@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=muller@ics.u-strasbg.fr \
    /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