guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debug setup in emacs


From: Fredrik Salomonsson
Subject: Re: Debug setup in emacs
Date: Mon, 07 Sep 2020 13:01:35 -0700

Hi Catonano,

Catonano <catonano@gmail.com> writes:

> 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
>

Thank you for pointing this out to me and the links to the blog posts.

> 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

Yeah, I didn't expect it to be that complicated to have that setup. I'll
put my focus on learning the language first, and leave the perfect debug
setup for later. Right now sprinkling (format #t) in the code kind of
works.

And as a follup question. What do people use when debugging guile code?

Thanks again.

-- 
s/Fred[re]+i[ck]+/Fredrik/g



reply via email to

[Prev in Thread] Current Thread [Next in Thread]