From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fredrik Salomonsson Newsgroups: gmane.lisp.guile.user Subject: Re: Debug setup in emacs Date: Mon, 07 Sep 2020 13:01:35 -0700 Message-ID: <87v9gpicf4.fsf@posteo.net> References: <874kod3ygp.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33705"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Catonano Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Sep 07 22:02:00 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFNKx-0008aG-HX for guile-user@m.gmane-mx.org; Mon, 07 Sep 2020 22:01:59 +0200 Original-Received: from localhost ([::1]:58356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFNKw-0001jf-Jq for guile-user@m.gmane-mx.org; Mon, 07 Sep 2020 16:01:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFNKi-0001hg-Up for guile-user@gnu.org; Mon, 07 Sep 2020 16:01:44 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:54353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFNKg-00082J-4L for guile-user@gnu.org; Mon, 07 Sep 2020 16:01:44 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E3202240100 for ; Mon, 7 Sep 2020 22:01:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1599508898; bh=DHIztAWXrNh9gVVp6WX16XcwL7IGhvNCxP94F0QMGtA=; h=From:To:Cc:Subject:Date:From; b=Uj8MMMOSrBFoOKvu22U7WS8761t23TL6yivPMTzSg3V1Z1lG75ny6TKnZIXVUcKov UkC3LwIuqiw7BoUWSqILQsBBHWKr57NuW+mDcGMGgxpp6ytTfvqBQNeLoJEfvHZ+CL zXQsEeNFbysPGveJTp4PUWgepAjNmndokbiimnnV7uFo3tMiy+iFwR0GnkC56nRYak N0KX8ACSqRcEhF3dxc9F0HA7GJRYq4fttgPqTge+bNrz3aqDM6PJlehA3+AgletmUt MGhcJXStsLb1Gxnerx5GVXq/xrgIrX9RC2PYneApnKE/q2HOv/fLB1xdptN8iX0hgT bfb+W4igbRwSg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BlfLT6LgYz6tmZ; Mon, 7 Sep 2020 22:01:37 +0200 (CEST) In-Reply-To: Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/07 13:19:38 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16882 Archived-At: Hi Catonano, Catonano 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