From: Doug Evans <dje@sebabeach.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org, gdb-patches@sourceware.org
Subject: Re: guile scripting for gdb
Date: Sat, 9 Nov 2013 10:40:18 -0800 [thread overview]
Message-ID: <CAA8o+=Qhwj720CtfhUF=JuLs-GJ455uZ7gsRRripc=4vZDFWng@mail.gmail.com> (raw)
In-Reply-To: <87ob5vlr2s.fsf@gnu.org>
On Thu, Nov 7, 2013 at 3:39 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Hello,
>
> Doug Evans <dje@sebabeach.org> skribis:
>
>> fyi, I've uploaded my gdb-guile branch to github.
>>
>> https://github.com/dje42/gdb.git
>>
>> It's in branch gdb-guile.
>
> Nice piece of work from several angles (implementation strategy, test
> coverage, style, docstrings, comments, etc.)
To be fair, a lot of it derives from the Python version (gdb/python/*.[ch]).
>> It's still very preliminary, there's still lots to do, and there are
>> some open issues.
>
> As discussed on IRC, one possible issue is eq?-ness of SMOBs: one would
> usually expects pointer equality to be preserved at the Scheme level.
Yeah.
That'll require gdb maintaining its own table(s) for each kind of smob
we want to intern.
Definitely doable, though there are some issues.
E.g., while std::vector<int> may be the same type in two different programs,
if we want eq?-ness to survive across the lifetime of the underlying gdb object
then that would take extra effort to make that work.
Would it be ok to punt on eq?-ness until there's a compelling reason
to make it work?
At that point we'd have a better idea of the use-case involved, and data on
the speed improvement eq? would bring to the table in that instance.
And even then we might still have eq?-ness defined by the lifetime of the
underlying gdb object (until there's a compelling reason to then make
that work).
> Another question I had is the lifetime of Scheme objects vs. that of the
> underlying C objects. AIUI C objects cannot be forcefully kept alive
> when their Scheme representative is live, which is why the bindings have
> this notion of “invalid” object at the Scheme level. Is it also the way
> the Python bindings deal with the issue?
>
> Random remarks:
>
> • The disasm interface looks cool. I think it’d be more convenient if
> it used records to represent disassembled instructions.
Thanks. I wanted to make it general so that we could disassemble more
than just code from the program.
I wasn't sure which things to make as records or goops objects or ...
So I'm starting small.
Each disassembly is just immutable data so it's easy enough
to write wrappers to provide the API one wants.
> • It would be nice to wrap the iterator interface in SRFI-41 streams.
Yeah, I have a TODO to look into that.
> An interesting exercise would be to write pretty-printers for SCM values
> and tools to walk Guile’s VM stack (like Guile’s gdbinit attempts to do).
Agreed, excellent exercises.
gdb has a "frame filter" interface that's intended to be used to
implement multi-language backtraces.
Need to add a gdb/guile interface.
I'm not sure how Guile's new VM changes things - someone may want to
write one for 2.0 and one for 2.2.
next prev parent reply other threads:[~2013-11-09 18:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 16:00 guile scripting for gdb Doug Evans
2013-11-07 23:39 ` Ludovic Courtès
2013-11-09 18:40 ` Doug Evans [this message]
2013-11-09 19:50 ` Thien-Thi Nguyen
2013-11-09 20:33 ` Doug Evans
2013-11-11 0:19 ` Ludovic Courtès
2013-11-11 1:50 ` Doug Evans
2013-11-11 6:28 ` Doug Evans
2013-11-11 11:55 ` Ludovic Courtès
2013-11-11 11:47 ` Ludovic Courtès
2013-11-30 9:15 ` msematman
2013-12-02 3:49 ` Nala Ginrut
2013-12-02 12:10 ` extending guile programs thru python (or lua, or whatever ...) msematman
-- strict thread matches above, loose matches on Subject: below --
2013-11-04 15:57 guile scripting for gdb Doug Evans
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA8o+=Qhwj720CtfhUF=JuLs-GJ455uZ7gsRRripc=4vZDFWng@mail.gmail.com' \
--to=dje@sebabeach.org \
--cc=gdb-patches@sourceware.org \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
/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).