From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10315 invoked by alias); 21 Apr 2003 20:55:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10304 invoked from network); 21 Apr 2003 20:55:35 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 21 Apr 2003 20:55:35 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3395C2B2F; Mon, 21 Apr 2003 16:55:18 -0400 (EDT) Message-ID: <3EA45AB6.1020104@redhat.com> Date: Mon, 21 Apr 2003 20:55:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Smita , gdb@sources.redhat.com Subject: Re: return value of a gdb command References: <16031.6671.349328.837129@casey.transmeta.com> <20030417231345.GA29425@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00238.txt.bz2 > On Thu, Apr 17, 2003 at 04:11:38PM -0700, Smita wrote: > >> Hi, >> Is it possible to capture return value of a gdb command (status=error or >> success)? >> What I want to do is: >> (gdb) >> (gdb) if status of == SUCCESS >> then >> do-something >> else >> do-something-else >> end >> (gdb) >> >> Is it posible to do this? > > > Not right now, no. There is a try/catch patch lurking though (which makes more sense). Someone should dust it off. Andrew