From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5396 invoked by alias); 10 Nov 2005 13:43:46 -0000 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 Received: (qmail 5386 invoked by uid 22791); 10 Nov 2005 13:43:43 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 10 Nov 2005 13:43:43 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EaCiK-0005dn-PA; Thu, 10 Nov 2005 08:43:40 -0500 Date: Thu, 10 Nov 2005 13:43:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: convenience variables in "target remote" Message-ID: <20051110134340.GA21648@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-11/txt/msg00216.txt.bz2 On Thu, Nov 10, 2005 at 01:29:46PM +0300, Vladimir Prus wrote: > > Hi, > it looks like "target remote" command does not handle convenience variables > properly: > > (gdb) set $var=1234 > (gdb) target remote :$var > :$var: Connection refused. > (gdb) target remote :1234 > Remote debugging using :1234 > > When $var is used, it's not expanded, at gdb tries to connect to the wrong > port? > > Is this by design, or a bug? Convenience variables are expanded in roughly the same places that the (C) expression evaluator is used to parse expressions. Most places that take a number do not support them; that's by design, the full range of expressions are not supported for ports. -- Daniel Jacobowitz CodeSourcery, LLC