From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22905 invoked by alias); 10 Dec 2004 19:10:23 -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 22849 invoked from network); 10 Dec 2004 19:10:20 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 10 Dec 2004 19:10:20 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Ccq9f-0006Yp-HZ; Fri, 10 Dec 2004 14:10:15 -0500 Date: Fri, 10 Dec 2004 20:03:00 -0000 From: Daniel Jacobowitz To: Jeff Johnston Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Modified Watchthreads Patch Message-ID: <20041210191015.GA18430@nevyn.them.org> Mail-Followup-To: Jeff Johnston , gdb-patches@sources.redhat.com References: <41B8E16D.6070505@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41B8E16D.6070505@redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00272.txt.bz2 On Thu, Dec 09, 2004 at 06:36:13PM -0500, Jeff Johnston wrote: > The following is a modified version of my thread watchpoint patch from > October/November. It removes the code I had used to switch between lwp > ptids and thread ptids now that Daniel's lwp patch is in place. It uses > the former version of my observer that is linux-specific and is activated > in attach_thread in linux-thread-db.c. Eli, I renamed the observer as > asked to indicate this. > > I also addressed Ulrich's comments regarding simplifying the S390 code and > using the s390_fix_watch_points call to actually put the watchpoints on the > new thread. > > Ulrich/Daniel can you take a look to verify everything is in place. > Daniel, I realize that this touches files that are currently in patch state > for you. I have no problem waiting for your latest patch to apply and > retrofitting my changes at check-in if necessary. > > As I mentioned before, more is required to get ia64 threaded watchpoints to > work. For S390, this change allows it to set and recognize threaded > watchpoints. Two formatting comments: please replace "linux" in comments with "GNU/Linux", and please check copyright years on the modified files. On the technical side, two questions: 1) I can see that it will be a bit of work to rearrange i386-linux to use this, but it should be doable. Do you know offhand of any i386-specific problems other than inserting watchpoints for all threads? 2) What should to_stopped_by_watchpoint do in the presence of multiple threads? It looks like it relies on inferior_ptid being the thread which stopped at a watchpoint; I'm worried that that may not be consistently true in a heavily threaded application. Maybe it should iterate over all threads. The to_stopped_data_address has its own problems with threads; but the case of handling hitting two watchpoints at once, I think, we can leave for another day. This is looking very good so far! -- Daniel Jacobowitz