unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Catonano <catonano@gmail.com>
To: Fredrik Salomonsson <plattfot@posteo.net>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Debug setup in emacs
Date: Sun, 6 Sep 2020 09:19:49 +0200	[thread overview]
Message-ID: <CAJ98PDxH1tp_CQjLY_5Ot_wy9K1Fa1dSyyX=wZ=CAHohR+4kXw@mail.gmail.com> (raw)
In-Reply-To: <874kod3ygp.fsf@posteo.net>

Hi Fredrik,

Il giorno sab 5 set 2020 alle ore 02:53 Fredrik Salomonsson <
plattfot@posteo.net> ha scritto:

>
> Hi,
>
> I've been playing around with guile for awhile and really liking it. One
> thing I haven't figured out is how to setup a good debugging environment
> in emacs, similar to edebug for elisp or gdb i.e. have a buffer that
> shows me were I am in the code.
>
> The manual (from what I have found) only shows me how to run that in a
> REPL. And I didn't find much when searching in the mailing archive. Is
> there a way to set this up or is the REPL the way to go?
>
> I'm currently using guile-2.2.7 and I'm using guile-hall-0.3.1 [1] for
> building and running my tests.
>
> Thanks
>
> [1] https://gitlab.com/a-sassmannshausen/guile-hall
>
> --
> s/Fred[re]+i[ck]+/Fredrik/g
>
>
you already received an answer about the integration between the Guile
debugger and Emacs GUD

I'd like to illuminate a different point here

The Guile debugger currently isn't able to show local variables in many
cases

So even if you could achieve full integration between it and Emacs GUD, you
probably still wouldn't get full information in your GUD based human
interface

That is, the guile debugger in its current incarnation is broken, it
doesn't debug

The reason why this happens is explained, to some extent, in a post by Andy
Wingo on his blog about some tasks to improve the compiler he'd like to
have implemented,

it's here (read the "basic register allocation" task)
https://wingolog.org/archives/2016/02/04/guile-compiler-tasks

In a more recent post, Andy extended his argument on the implementation of
debugging
https://wingolog.org/archives/2018/02/07/design-notes-on-inline-caches-in-guile

This is a relevant paragraph

"Honestly I struggle a lot with the idea of debugging native code. GDB does
the least-overhead, most-generic thing, which is patching code directly;
but it runs from a separate process, and in Guile we need in-process
portable debugging. The debugging use case is a clear area where you want
adaptive optimization, so that you can emit debugging ceremony from the
hottest code, knowing that you can fall back on some earlier tier. Perhaps
Guile should bite the bullet and go this way too."

So there seem to be deep reasons that have to do with optimization, runtime
support for offering a full debugging experience in Guile

Anyway, the info I want to convey is that even of you manage to have the
communication between the Guile debugger and Emacs GUD set up, you still
might be disappointed by the result

I think it's important that you know this before pouring effort in having
your GUD based thing going


  parent reply	other threads:[~2020-09-06  7:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 23:37 Debug setup in emacs Fredrik Salomonsson
2020-09-05  6:23 ` Joshua Branson via General Guile related discussions
2020-09-05  7:27 ` Jan Nieuwenhuizen
2020-09-05 22:17   ` Fredrik Salomonsson
2020-09-06  5:43     ` Jan Nieuwenhuizen
2020-09-07 19:50       ` Fredrik Salomonsson
2020-09-06  7:19 ` Catonano [this message]
2020-09-07 20:01   ` Fredrik Salomonsson
2020-09-08  6:15     ` Catonano
2020-09-08  6:45       ` Zelphir Kaltstahl
2020-09-08 17:18         ` Fredrik Salomonsson
2020-09-08 17:07       ` Fredrik Salomonsson

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='CAJ98PDxH1tp_CQjLY_5Ot_wy9K1Fa1dSyyX=wZ=CAHohR+4kXw@mail.gmail.com' \
    --to=catonano@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=plattfot@posteo.net \
    /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).