From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6340 invoked by alias); 24 Mar 2008 07:05:25 -0000 Received: (qmail 6331 invoked by uid 22791); 24 Mar 2008 07:05:24 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Mar 2008 07:04:57 +0000 Received: from kahikatea.snap.net.nz (117.60.255.123.dynamic.snap.net.nz [123.255.60.117]) by viper.snap.net.nz (Postfix) with ESMTP id 4A9273DAA8A; Mon, 24 Mar 2008 20:04:54 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id EA4BE8FC6D; Mon, 24 Mar 2008 18:57:24 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18407.20692.28713.106315@kahikatea.snap.net.nz> Date: Mon, 24 Mar 2008 11:04:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Thread bound variable objects [was: Re: MI non-stop mode spec] In-Reply-To: <200803240843.54604.vladimir@codesourcery.com> References: <200803190016.02072.vladimir@codesourcery.com> <200803231225.31593.vladimir@codesourcery.com> <18407.10216.545852.450467@kahikatea.snap.net.nz> <200803240843.54604.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.1.92.2 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00200.txt.bz2 > > OK, it should be: > > > > + if (old_cleanups != NULL) > > + do_cleanups (old_cleanups); > > I think that's also wrong. In the event that no cleanups were installed > before calling this function, this code will fail to run the > cleanups installed by this function. In the event that a cleanup > should be really installed conditionally, the right code is: > > struct cleanups *back_to = make_cleanup (null_cleanup, NULL); > > if (...) > make_cleanup (); > > do_cleanups (back_to); I don't really see that: if nothing is added to cleanup_chain then no cleanups are done. >... > > I see now from the ChangeLog that you've committed your own change without > > posting to the list first or explaining what it does. > > Sorry, no: > 1. I've checked in two changes, not one. > 2. Both are posted to gdb-patches. OK, my mistake. I saw the first one. > 3. Both are general cleanups, and don't implement anything that your patch > tries to implement. It's just that the second one includes changes in and overlaps with my patch so I thought it was part of that thread. I'm not sure where that leaves things now. > > My patch does two things: > > > > 1) It stops a variable object from being considered automatically out of > > scope when the selected thread changes. > > 2) It associates a thread-id field with the variable object so that the > > front end can organise the display of watch expressions accordingly. > > > > AFAICS your patch does neither of these. Could you please say what it > > does do? > > Please see my gdb-patches posts. With regard to the second patch, why you are using make_cleanup_restore_current_thread when you aren't switching the thread in the first place? -- Nick http://www.inet.net.nz/~nickrob