From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15365 invoked by alias); 12 Feb 2008 22:09:21 -0000 Received: (qmail 15348 invoked by uid 22791); 12 Feb 2008 22:09:19 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Feb 2008 22:08:56 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id D74503C34B; Tue, 12 Feb 2008 14:08:54 -0800 (PST) Subject: Re: substitute gdb convenience variable into gdb command From: Michael Snyder To: Daniel Jacobowitz Cc: Yakov Lerner , gdb@sourceware.org In-Reply-To: <20080212160327.GA13985@caradoc.them.org> References: <20080212160327.GA13985@caradoc.them.org> Content-Type: text/plain Date: Tue, 12 Feb 2008 22:09:00 -0000 Message-Id: <1202854134.19253.103.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit 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-02/txt/msg00080.txt.bz2 On Tue, 2008-02-12 at 11:03 -0500, Daniel Jacobowitz wrote: > On Tue, Feb 12, 2008 at 05:54:33PM +0200, Yakov Lerner wrote: > > How do I substitute value of gdb convenience variable into gdb command ? > > Sorry, there's no way to do this. It's really dependent on the command. Command arguments come in as a string, and each command has to parse them. It's just that in this particular case, the command tries to parse the string by using strtol. Nicer commands use one of gdb's built-in parsing functions, which take into account things like expressions and convenience variables.