From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4150 invoked by alias); 3 Dec 2002 21:46:48 -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 4131 invoked from network); 3 Dec 2002 21:46:40 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 3 Dec 2002 21:46:40 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18JMkm-00064r-00; Tue, 03 Dec 2002 17:47:00 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18JKsi-00080y-00; Tue, 03 Dec 2002 16:47:04 -0500 Date: Tue, 03 Dec 2002 13:46:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Mark Kettenis , msnyder@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [Fwd: Re: [Fwd: Re: gdb/725: Crash using debug target and regcaches (in 5.3 branch?)]] Message-ID: <20021203214704.GA30752@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Mark Kettenis , msnyder@redhat.com, gdb-patches@sources.redhat.com References: <3DE3F135.6030605@redhat.com> <3DE53144.3020502@redhat.com> <200211301613.gAUGDInq000267@elgar.kettenis.dyndns.org> <3DE8E9F8.5000902@redhat.com> <3DECE58A.6090001@redhat.com> <20021203171926.GA10631@nevyn.them.org> <3DED03F1.6070601@redhat.com> <20021203193322.GA19891@nevyn.them.org> <3DED24E1.70403@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DED24E1.70403@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00089.txt.bz2 On Tue, Dec 03, 2002 at 04:40:49PM -0500, Andrew Cagney wrote: > > > >It's not an assumption at this point. proc-service.c:230 to > >thread_db_fetch_registers is the only path into lin_lwp_fetch_registers. > >And that does: > > inferior_ptid = BUILD_LWP (lwpid, ph->pid); > > > >So at this point we _know_ that the thread we're querying has its > >registers in the LWP. That's the whole point. > > To just to clarify something, I'm being critical of the overall design > here, not your patch. The comment is for sparc-nat.c (which also gets > used on sun-4 and free bsd systems). Oh :) Sparc-nat is, um, a mess. I was just cleaning it up for completeness here. > The target/*-nat interface shouldn't be be making assumptions such as > this (global state, only ever one LWP / thread active, ...). Doing so > is poor design, it leads to bugs just like the one being discussed here. > > If, instead, the code had been correctly implemented (what 5 years ago?) > this bug, and these on-going problems, wouldn't have occured. If the comment's for sparc-nat then I've got no objection to your revision - I'd still really like to see this patch in 5.3. I'm kind of curious why it causes killed.exp to fail for you, since I've never once seen killed.exp _pass_. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer