From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17526 invoked by alias); 31 Jan 2004 03:42:33 -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 17445 invoked from network); 31 Jan 2004 03:42:32 -0000 Received: from unknown (HELO demos.bsdclusters.com) (69.55.225.36) by sources.redhat.com with SMTP; 31 Jan 2004 03:42:32 -0000 Received: from demos.bsdclusters.com (demos [69.55.225.36]) by demos.bsdclusters.com (8.12.8p1/8.12.8) with ESMTP id i0V3gUkT054564 for ; Fri, 30 Jan 2004 19:42:30 -0800 (PST) (envelope-from kmacy@fsmware.com) Received: from localhost (kmacy@localhost) by demos.bsdclusters.com (8.12.8p1/8.12.8/Submit) with ESMTP id i0V3gU6j054561 for ; Fri, 30 Jan 2004 19:42:30 -0800 (PST) X-Authentication-Warning: demos.bsdclusters.com: kmacy owned process doing -bs Date: Sat, 31 Jan 2004 03:42:00 -0000 From: Kip Macy X-X-Sender: kmacy@demos.bsdclusters.com To: gdb@sources.redhat.com Subject: Re: gdb + perl In-Reply-To: <20040130153706.N34716@demos.bsdclusters.com> Message-ID: <20040130193848.B41210@demos.bsdclusters.com> References: <20040130153706.N34716@demos.bsdclusters.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-01/txt/msg00344.txt.bz2 I know it is bad form to follow-up on one's own messages, but since I took the time to pull the changes into 6.0 I thought I'd make them available to anyone who might be curious about it. Documentation: http://www.fsmware.com/gdb/gdb_ffi.html Tarball: http://www.fsmware.com/gdb/gdb-6.0-perl.tgz perl support can be turned on by passing --enable-ffiperl to configure. Even if it isn't deemed appropriate for mainline inclusion, I'm eager to hear any feedback. Thanks. -Kip On Fri, 30 Jan 2004, Kip Macy wrote: > In order to increase the amount of triage that could be fully automated > by developers I recently added support to my company's in-house GDB > tree for writing macros using external scripting languages. Because > perl is the most popular scripting language in-house, that is the > language I've gone with for the initial implementation. To the base GDB > command set I've added three commands: runperl, sourceperl, and > resetperl. "runperl" runs a perl script from gdb using a non-persistent > interpreter. "sourceperl" runs a perl script from gdb that uses > a persistent interpreter. This allows one to register callbacks with > GDB to add to the command set, much like "define" for gdb macro > language. "resetperl" destroys and rebuilds the persistent interpreter. > All communication between perl and gdb (except for callback > registration) goes through the MI interface, so the changes to GDB are > quite minimal. I've written a perl parser for demarshalling the MI > output and a library on top of that that users can use to define > GDB scripts. I've also converted a number of in-house GDB macros > to perl to demonstrate to others how it is done. > > I'm posting this to the list to ask if this is something that people > would like to see incorporated into the base GDB. > > > > -Kip >