From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18860 invoked by alias); 15 May 2006 21:52:57 -0000 Received: (qmail 18850 invoked by uid 22791); 15 May 2006 21:52:57 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 21:52:56 +0000 Received: (qmail 3576 invoked from network); 15 May 2006 21:52:54 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 May 2006 21:52:54 -0000 To: pgilliam@us.ibm.com Cc: Eli Zaretskii , Fabio De Bona , gdb@sources.redhat.com Subject: Re: conditional breakpoint with (char* ) string condition References: <44645774.8060503@gmx.net> <44645774.8060503@gmx.net> <20060512124527.GB3460@nevyn.them.org> <20060512135420.GA6349@nevyn.them.org> <1147446332.3672.51.camel@dufur.beaverton.ibm.com> <20060515145842.GB28447@nevyn.them.org> <20060515191808.GB5918@nevyn.them.org> From: Jim Blandy Date: Mon, 15 May 2006 22:44:00 -0000 In-Reply-To: <20060515191808.GB5918@nevyn.them.org> (Daniel Jacobowitz's message of "Mon, 15 May 2006 15:18:08 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-05/txt/msg00230.txt.bz2 Daniel Jacobowitz writes: > On Mon, May 15, 2006 at 11:50:30AM -0700, Jim Blandy wrote: >> >> Daniel Jacobowitz writes: >> > On Fri, May 12, 2006 at 11:00:16AM -0700, Jim Blandy wrote: >> >> Should we establish a convention of starting GDB-provided convenience >> >> variable names with _, to avoid conflicting with script variables? >> >> Thus, $_strcmp and $_strlen? >> > >> > Or should they have a $gdb_ prefix? Or $_gdb_? >> >> Or $this_is_a_gdb_variable_20060515_GNU_prvt_ISO_IEC_9989:1999_? :) >> (There must be some way to get a UUID and 'http' in there...) > > Hey, I was serious about $gdb_... Oh. Sorry. I thought you were mocking my suggestion. I guess I feel like we're encroaching on the user's space no matter what we do, so we might as well make it terse. And there are are $_ variables defined by GDB already, I think. But I'd be happy with '_' or 'gdb_'. >> Hey, maybe we could just take over some prefix like $- that doesn't >> conflict with the user and register namespace at all. > > Nice try :-) > > (gdb) p 2 > $1 = 2 > (gdb) p $-1 > $2 = 1 Darn. I'd forgotten $ is a token all by itself.