From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13761 invoked by alias); 24 Mar 2008 04:03:34 -0000 Received: (qmail 13748 invoked by uid 22791); 24 Mar 2008 04:03:33 -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 04:03:00 +0000 Received: from kahikatea.snap.net.nz (106.60.255.123.dynamic.snap.net.nz [123.255.60.106]) by viper.snap.net.nz (Postfix) with ESMTP id 5B8EF3DA9CF; Mon, 24 Mar 2008 17:02:53 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 791E28FC6D; Mon, 24 Mar 2008 16:02:49 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <18407.10216.545852.450467@kahikatea.snap.net.nz> Date: Mon, 24 Mar 2008 07:05:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Thread bound variable objects [was: Re: MI non-stop mode spec] In-Reply-To: <200803231225.31593.vladimir@codesourcery.com> References: <200803190016.02072.vladimir@codesourcery.com> <200803222033.11760.vladimir@codesourcery.com> <18405.57137.166048.407495@kahikatea.snap.net.nz> <200803231225.31593.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/msg00198.txt.bz2 > > + =A0 do_cleanups (old_cleanups); > > +=20 > > =A0 =A0 return NULL; > > =A0 } >=20 > I think the use of cleanups above is wrong. You basically have: >=20 > struct cleanups *old_cleanups =3D NULL; > if (whatever) > old_cleanups =3D ... > do_cleanups (old_cleanups); >=20 > so, if 'whatever' evaluates to false, all cleanups, including those set > in parent, will be executed. OK, it should be: + if (old_cleanups !=3D NULL) + do_cleanups (old_cleanups); > That's what we get for using a language that does not have exceptions > and proper destructors. I'll fix this too. I see now from the ChangeLog that you've committed your own change without posting to the list first or explaining what it does. 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? --=20 Nick http://www.inet.net.nz/~nick= rob