From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20682 invoked by alias); 12 Feb 2008 19:41:53 -0000 Received: (qmail 20641 invoked by uid 22791); 12 Feb 2008 19:41:53 -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 19:41:35 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id A85D03C2D7; Tue, 12 Feb 2008 11:41:33 -0800 (PST) Subject: Re: substitute gdb convenience variable into gdb command From: Michael Snyder To: Yakov Lerner Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Date: Tue, 12 Feb 2008 19:41:00 -0000 Message-Id: <1202845293.19253.97.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/msg00075.txt.bz2 On Tue, 2008-02-12 at 17:54 +0200, Yakov Lerner wrote: > How do I substitute value of gdb convenience variable into gdb command ? > > For example: > set $thread_num=5 > thread apply $thread_num where > Error parsing $thread_num where > eval thread apply $thread_num where > Undefined command: "eval". Try "help". > > Thanks > Y.L. Hmm! That's a bit of an oversight... thread_apply_command calls strtol. It ought to call one of the built-in expression parsing functions. Somebody should fix that... ;-)