From: Kip Macy <kmacy@fsmware.com>
To: gdb@sources.redhat.com
Subject: gdb + perl
Date: Sat, 31 Jan 2004 00:05:00 -0000 [thread overview]
Message-ID: <20040130153706.N34716@demos.bsdclusters.com> (raw)
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
next reply other threads:[~2004-01-31 0:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-31 0:05 Kip Macy [this message]
2004-01-31 3:42 ` Kip Macy
2004-02-03 21:06 ` Kevin Buettner
2004-02-04 3:31 ` Kip Macy
2004-02-04 4:13 ` Daniel Jacobowitz
2004-02-04 5:44 ` Kip Macy
2004-02-04 6:01 ` Eli Zaretskii
2004-02-04 17:00 ` Andrew Cagney
2004-02-04 17:36 ` Kip Macy
2004-02-04 17:48 ` Bob Rossi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040130153706.N34716@demos.bsdclusters.com \
--to=kmacy@fsmware.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox