From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11507 invoked by alias); 9 Nov 2004 20:48:44 -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 11442 invoked from network); 9 Nov 2004 20:48:38 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Nov 2004 20:48:38 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iA9KmXZ9012112 for ; Tue, 9 Nov 2004 15:48:38 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iA9KmWr06634; Tue, 9 Nov 2004 15:48:32 -0500 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id iA9KmWoS032384; Tue, 9 Nov 2004 15:48:32 -0500 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 5A75780035F; Tue, 9 Nov 2004 15:48:32 -0500 (EST) Message-ID: <41912D20.6090706@redhat.com> Date: Tue, 09 Nov 2004 20:48:00 -0000 From: Jeff Johnston User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Andrew Cagney , Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFA]: Watchpoints per thread patch References: <01c4bca9$Blat.v2.2.2$adcffb00@zahav.net.il> <418A741C.4080306@redhat.com> <20041105044917.GA13554@nevyn.them.org> <418BAFC9.6050705@gnu.org> <20041105182850.GA22533@nevyn.them.org> <418FE5E7.3070501@gnu.org> <20041109010425.GA31431@nevyn.them.org> <4190292D.5070103@gnu.org> <20041109023306.GA1797@nevyn.them.org> <4191151F.6070607@redhat.com> <20041109193124.GA4085@nevyn.them.org> In-Reply-To: <20041109193124.GA4085@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00178.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Nov 09, 2004 at 02:06:07PM -0500, Jeff Johnston wrote: > >>Time out here for a second. I have been modifying this patch according to >>"your" comments. I have had a design that had no observers and one that >>kept the observation isolated to the linux code. > > > The design without observers had plenty of other problems, e.g. it also > broke remote debugging. > > My suggestion about putting the observer in add_thread was a bad one. > I've never claimed to be an infallible lord of development. A > new_thread observer does indeed belong in add_thread, but is not > suitable for your use; and I didn't understand why until later. > Fair enough, but it was certainly uncalled for to categorize my patch(s) as "crap" as I was attempting to implement your suggested changes. > We could use a Linux native specific observer, or handle this through > the target stack. I think handling it through the target stack makes > more sense, but I haven't sketched out what the target method would > look like. If other GDB developers think that the precedent of a > native-code-only observer isn't a bad one, then maybe we should go back > to your previous placement of the observer and give it a Linux specific > name. This will be aided by renaming thread-db to be clearly Linux > native code. > Ok. I'll wait and see if anybody else has objections. Eli, I understand that I would have to rename the observer and change its definition appropriately. > >>One key issue of my latest patch you seem to object to is the fact that I >>now have to massage the ptid. This was not necessary in the previous >>design where I was observing within the linux code where the lwp was >>readily available. We both know the low-level code is fundamentally wrong >>in its assumption regarding the ptids. They cannot be assumed to be in >>PID, LWP, 0 format. We get lucky with register accesses only because the >>thread-db code is flushing registers in the lwp format. It is not >>documented and when low-level code accesses ptids outside of thread-db, it >>is wrong. Watchpoints are in the this boat because they are accessed by >>breakpoint.c and infrun.c where the ptid is in the wrong format (PID, 0, >>TID). >> >>I feel your objection to temporarily massaging these ptids as thread-db.c >>does is unreasonable. We need to think of the end-user. The amount of >>code added is small and it is trivial to remove this code once the >>preferred solution is in place. There is currently no work-around to >>solving thread bugs involving memory corruption. >> >>If you have a fix planned soon regarding the ptid format, I have absolutely >>no objection to waiting for it. However, if you can't get around to this >>for a while due to other commitments or it is going to take some hashing >>out on the list, let's stop punishing the end-user and do something helpful >>while we work things out proper. > > > Jeff, I've already posted the thread-db change to make this > unnecessary. I was asked to rename the file first, and I've posted > that too. > Ok, my misunderstanding. Like I said, if something is currently in the works, I have no problem in waiting. -- Jeff J.