From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13459 invoked by alias); 27 Oct 2004 22:41:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13408 invoked from network); 27 Oct 2004 22:41:56 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 27 Oct 2004 22:41:56 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CMwUN-0001Sy-4J; Wed, 27 Oct 2004 18:41:55 -0400 Date: Wed, 27 Oct 2004 22:41:00 -0000 From: Daniel Jacobowitz To: Jeff Johnston Cc: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [RFA]: Watchpoints per thread patch Message-ID: <20041027224155.GA3485@nevyn.them.org> Mail-Followup-To: Jeff Johnston , Andrew Cagney , gdb-patches@sources.redhat.com References: <4175A9C9.8040300@redhat.com> <41769FF3.7010801@gnu.org> <20041020173035.GA26622@nevyn.them.org> <418022DE.204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <418022DE.204@redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00460.txt.bz2 On Wed, Oct 27, 2004 at 06:36:14PM -0400, Jeff Johnston wrote: > + /* For every active watchpoint, we need to insert the watchpoint on > + the new thread. */ > + if ((b->loc_type == bp_loc_hardware_watchpoint > + || b->owner->type == bp_watchpoint)) Do you need bp_watchpoint here? That's going to be a software watchpoint. > @@ -757,11 +759,16 @@ attach_thread (ptid_t ptid, const td_thr > if (ti_p->ti_state == TD_THR_UNKNOWN || ti_p->ti_state == TD_THR_ZOMBIE) > return; /* A zombie thread -- do not attach. */ > > + new_ptid = BUILD_LWP (ti_p->ti_lid, GET_PID (ptid)); > + > /* Under GNU/Linux, we have to attach to each and every thread. */ > #ifdef ATTACH_LWP > - ATTACH_LWP (BUILD_LWP (ti_p->ti_lid, GET_PID (ptid)), 0); > + ATTACH_LWP (new_ptid, 0); > #endif > > + /* Inform any observers of new attached thread. */ > + observer_notify_new_thread (new_ptid); > + > /* Enable thread event reporting for this thread. */ > err = td_thr_event_enable_p (th_p, 1); > if (err != TD_OK) Is there somewhere in the core threading code we could do this, rather than in a GNU/Linux target file? -- Daniel Jacobowitz