public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: Frysk Hackers <frysk@sourceware.org>
Subject: Re: Watchpoint prorogation to child threads
Date: Tue, 26 Feb 2008 16:25:00 -0000	[thread overview]
Message-ID: <1204043093.3487.78.camel@dijkstra.wildebeest.org> (raw)
In-Reply-To: <47C43A38.4030407@redhat.com>

Hi Phil,

On Tue, 2008-02-26 at 16:11 +0000, Phil Muldoon wrote:
> Mark Wielaard wrote:
> > It would be nice if this is similar to the breakpoints. Low-level
> > breakpoints are the same on a clone (because they are really just
> > markers in the code segment which is the same), but they are cleared on
> > exec (because then the memory of the process is reset). 
> 
> I'm not sure I understand, are breakpoints propagated on clone or not? I 
> think they should, and I think I agree on the similarity.

Yes, the low-level breakpoints are propagated (by virtue of them being
actually inside the code segment that are shared between clones). But
higher-level Code observers still work per Task, so on that level you
need to register a new Code observer for a new Task to get notified when
they trigger (they still trigger of course, but if nobody is
listening...). I assume a Watch is similar to a Code, both being
TaskObservers (and the comments look funnily similar).

> To be honest, not thought about the exec issue, but yeah  I guess the 
> memory is reset.

The memory is, and for low-level breakpoints we reset the internal data
structures for that reason on an exec event. Since you are implementing
low-level watchpoints with hardware support in the cpu register you
might have to also clear those (if the kernel doesn't do that for you on
an exec).

Cheers,

Mark

  reply	other threads:[~2008-02-26 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 15:14 Phil Muldoon
2008-02-26 16:00 ` Mark Wielaard
2008-02-26 16:11   ` Phil Muldoon
2008-02-26 16:25     ` Mark Wielaard [this message]
2008-02-26 16:43       ` Phil Muldoon

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=1204043093.3487.78.camel@dijkstra.wildebeest.org \
    --to=mark@klomp.org \
    --cc=frysk@sourceware.org \
    --cc=pmuldoon@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).