From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26653 invoked by alias); 6 Nov 2009 09:11:07 -0000 Received: (qmail 26638 invoked by uid 22791); 6 Nov 2009 09:11:05 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from port-185.xxx.th.newnet.co.uk (HELO mail.codeplay.com) (80.175.148.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Nov 2009 09:10:59 +0000 Received: from [192.168.1.66] (c-1769e155.77-6-64736c14.cust.bredbandsbolaget.se [85.225.105.23]) (authenticated bits=0) by mail.codeplay.com (8.14.3/8.14.3/Debian-6) with ESMTP id nA69ArKP003753 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 6 Nov 2009 09:10:55 GMT Message-ID: <4AF3E817.7090203@codeplay.com> Date: Fri, 06 Nov 2009 10:28:00 -0000 From: George Russell User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: fpga CC: gdb@sourceware.org Subject: Re: controlling gdb via python's pexpect References: <26227761.post@talk.nabble.com> In-Reply-To: <26227761.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2009-11/txt/msg00058.txt.bz2 fpga wrote: > fpga wrote: > >> Can someone please give me an example of how this is done. >> I'm afraid the documentation is not helping me. >> Thx >> >> > > Thx George > You've got further than I have! > I tried to use subprocess before trying pexpect but failed. > pexpect was suggested by experts on the python forum. > Unfortuntely they appear incapable of correcting my trivial example of > opening a terminal and sending the command 'gdb' to it. > Any snippets most welcome. > Looking at my repositories I see libdevel-gdb-perl. > I like python's orderliness but have noticed that when python fails perl > usually delivers. > See http://www.dalkescientific.com/writings/diary/archive/2005/04/12/wrapping_command_line_programs.html http://www.dalkescientific.com/writings/diary/archive/2005/04/15/wrapping_command_line_programs_II.html http://www.dalkescientific.com/writings/diary/archive/2005/04/17/wrapping_command_line_programs_III.html http://www.dalkescientific.com/writings/diary/archive/2005/04/18/wrapping_command_line_programs_IV.html http://www.dalkescientific.com/writings/diary/archive/2005/04/18/wrapping_command_line_programs_V.html for an assortment of tips on control of external processes from Python. Cheers, George