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

Mark Wielaard wrote:
> 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).
>
>   

Yep, sure will. The comments/code is based entirely of the breakpoint 
code. So far the only operational difference is the length attribute, 
and that watchpoints are inserted/removed/trapped via register bit 
shifting instead of the memory insertions that the code breakpoints do 
at set-up. If the similarity continues throughout implementation I might 
very well refactor them to one common interface. We'll see.

>> 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).
>   

Uknown at the moment, but fixing to find out.

Regards

Phil

      reply	other threads:[~2008-02-26 16:43 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
2008-02-26 16:43       ` Phil Muldoon [this message]

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