public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Ingham <jingham@apple.com>
To: David Lamy-Charrier <david.lamy@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: How to access files (open/read/close) from gdb script ?
Date: Mon, 26 Sep 2005 17:27:00 -0000	[thread overview]
Message-ID: <E6033596-F04B-4155-86B0-9ED54E078E5C@apple.com> (raw)
In-Reply-To: <6541ed4c05092608534877c12@mail.gmail.com>

The gdb testsuites are an example of how to do this.  They use  
"expect" to drive gdb and parse it's output.  There are also a lot of  
Tcl helper libraries in the testsuite/lib directory that manage  
stepping, etc.  So one pretty easy option is to use the dejagnu harness.

In any case, you can run the gdb testsuite (using "make check") to  
get an example of how to use Tcl & Expect to script gdb.

Also, if you can get the Insight debugger, that has a Tcl Interpreter  
build into gdb, and you can write scripts and just "source" them in  
Insight.  At that point, you can do anything you could do in plain  
Tcl...

I think DanielJ also has mentioned working on scripting bindings  
using the MI in the past, but I don't know the state of this.  That  
is a little bit more work, but would allow you to run gdb under  
another scripting language if you wanted.

Jim


On Sep 26, 2005, at 8:53 AM, David Lamy-Charrier wrote:

>> Maybe you can integrate this with an expect / tcl script  ? AFAIK gdb
>> scripting
>> does not allow such stuff.
>>
>
> I am not sure to understand correclty:
> you mean that I can write a tcl script to do that, but how can I then
> launch the tcl script ?
>
> Thanks,
> David
>

  parent reply	other threads:[~2005-09-26 17:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6541ed4c050926074274c08518@mail.gmail.com>
2005-09-26 14:45 ` David Lamy-Charrier
2005-09-26 14:51   ` Ramana Radhakrishnan
2005-09-26 15:53     ` David Lamy-Charrier
2005-09-26 17:03       ` Joel Brobecker
2005-09-26 17:22         ` Jim Ingham
2005-09-26 17:34           ` David Lamy-Charrier
2005-09-26 17:36             ` Daniel Jacobowitz
2005-09-27 13:57               ` David Lamy-Charrier
2005-09-27 13:59                 ` Daniel Jacobowitz
2005-09-26 17:35           ` Daniel Jacobowitz
2005-09-26 17:42             ` Jim Ingham
2005-09-26 21:48               ` Joel Brobecker
2005-09-26 17:27       ` Jim Ingham [this message]
2005-09-26 17:33         ` Daniel Jacobowitz

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=E6033596-F04B-4155-86B0-9ED54E078E5C@apple.com \
    --to=jingham@apple.com \
    --cc=david.lamy@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).