From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19132 invoked by alias); 29 Jan 2005 02:57:48 -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 19058 invoked from network); 29 Jan 2005 02:57:43 -0000 Received: from unknown (HELO lakermmtao04.cox.net) (68.230.240.35) by sourceware.org with SMTP; 29 Jan 2005 02:57:43 -0000 Received: from white ([68.9.64.121]) by lakermmtao04.cox.net (InterMail vM.6.01.04.00 201-2131-117-20041022) with ESMTP id <20050129025743.TBTE22354.lakermmtao04.cox.net@white> for ; Fri, 28 Jan 2005 21:57:43 -0500 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1Cuinv-00016u-00 for ; Fri, 28 Jan 2005 21:57:43 -0500 Date: Sat, 29 Jan 2005 02:57:00 -0000 From: Bob Rossi To: GDB Subject: How do I get regexp from expect at gdb_expect? Message-ID: <20050129025743.GA4053@white> Mail-Followup-To: GDB Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2005-01/txt/msg00155.txt.bz2 Hi, I'm using expect with GDB and I've come across a problem. For instance, say I have, gdb_expect $tmt { -re "(Ending remote debugging.*$mi_gdb_prompt\[ \]*$)" { # at this point, how do I get the string that matched the above # regex? } } } I need to be able to get the string that matched the regex at the -re. If I can get this data, I think I will successfully be able to get the MI output parser to parse the output of GDB with the existing testsuite. This will at least ensure that the syntax is correct, and will stay correct. I hope it is possible to get the information that I need ... Any help would be greatly appreciated, Thanks, Bob Rossi