From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15235 invoked by alias); 3 Feb 2006 13:56:50 -0000 Received: (qmail 15219 invoked by uid 22791); 3 Feb 2006 13:56:49 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-04.spheriq.net (HELO lon-del-04.spheriq.net) (195.46.50.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Feb 2006 13:56:48 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-04.spheriq.net with ESMTP id k13Dujjf017394 for ; Fri, 3 Feb 2006 13:56:45 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-01.spheriq.net with ESMTP id k13DuhTo015417 for ; Fri, 3 Feb 2006 13:56:44 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id k13DueJu031717 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 3 Feb 2006 13:56:42 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B6A9ADA46; Fri, 3 Feb 2006 13:56:35 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 868C7473CF; Fri, 3 Feb 2006 14:00:10 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CHE70381 (AUTH stubbsa); Fri, 3 Feb 2006 13:56:33 GMT Message-ID: <43E36080.4080503@st.com> Date: Fri, 03 Feb 2006 13:56:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Vladimir Prus Cc: Eli Zaretskii , gdb@sources.redhat.com Subject: Re: $thread convenience variable References: <200602031410.42115.ghost@cs.msu.su> <43E35434.4070201@st.com> <200602031610.12398.ghost@cs.msu.su> In-Reply-To: <200602031610.12398.ghost@cs.msu.su> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.01 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00023.txt.bz2 Vladimir Prus wrote: > Is that technically feasible? The $thread variable must be set before the call > to bpstat_stop_status, otherwise you can't use $thread in breakpoint > condition. Well, you can, but when evaluating breakpoint condition you'll use > the old value of $thread, not the number of the thread where we've stopped. > > Unless cli-script.c is somehow invoked from handle_inferior_event. You're quite right, cli-script.c probably isn't the place to put this stuff. It would convert it at the wrong time and wouldn't work. Somehow I got confused with attaching command scripts to the breakpoint, not conditions. In that case it would work. What I really meant to say was _like_ the ones in cli-script.c. The code might live somewhere else. My point was that a (read-only) substitution might be better than a generic convenience variable for this purpose. Anyway, it was just a suggestion, and, thinking about it again, it probably would be quite difficult to get it substituted in all the right places at all the right times without limiting its scope somehow. Andrew