From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Catonano Newsgroups: gmane.lisp.guile.user Subject: Re: Debug setup in emacs Date: Sun, 6 Sep 2020 09:19:49 +0200 Message-ID: References: <874kod3ygp.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Fredrik Salomonsson Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Sep 06 09:20:16 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 1kEoyF-00011g-LH for guile-user@m.gmane-mx.org; Sun, 06 Sep 2020 09:20:15 +0200 Original-Received: from localhost ([::1]:32846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEoyE-00083V-Nf for guile-user@m.gmane-mx.org; Sun, 06 Sep 2020 03:20:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEoy4-00083G-W6 for guile-user@gnu.org; Sun, 06 Sep 2020 03:20:05 -0400 Original-Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]:45848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEoy2-00087A-UI for guile-user@gnu.org; Sun, 06 Sep 2020 03:20:04 -0400 Original-Received: by mail-io1-xd2d.google.com with SMTP id u126so11010615iod.12 for ; Sun, 06 Sep 2020 00:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NRCbjgc79Q2dYirKYZNrD5Llk9sz+ldXMe4WNFAj2fE=; b=LqNtOiRyTKcx+QSz/qPXw0wEG1PS7T7m03Ep0cWLbjb6TbVrKMrpK4lZPr3+CTdOMZ QkgX+2kRhneZmXaKMx2HXjNENyzudLbQGxEwLLDru8S/5Cb2DbrXF2PCRmVbPQgC5dej IvgQmg80dj67FXYCrXvCoNMr/FSNiKvLAcOkapM3TCcGVn+jn7/SSxPAAJh7n9JLnBxC GWllu1rOys9g+pCfDfC4OHg9nhiHZSE+IJ94yGHB+cEw+OVEUcao2a+SNDtR92Fd+JXt hIxVRpPHtVWM9tAhcfo3Dokf1LjIpl8K1XrycTJKplBy4BFItPIzHwUJBdad2ykV9rSr tfpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NRCbjgc79Q2dYirKYZNrD5Llk9sz+ldXMe4WNFAj2fE=; b=N0X97JhwqDksWT5pGYgWvH/7OXVz006JN4vugSi+NFPGMXtOMuPbj2e2lxXutyWv3Q FOdIY7r1S6iTwyflA4av4MkFdWtplj/ko0Sg9sMWB/rcc1JjDB1xbZq562xRACq0R9HX d8gEmGRHHRCN9qdR345UQwhKESkGUoP6yJZJ8K17ySrQvY7d+y44N4GfooeBUOj7mJbQ GyyvIWNT9HseZhNtWtdblLx/CyXsQOK0BxwvhlX7kEKUq8LIzMmtDX4nbquJCce0FJJX Dx8/tlUexZ6zp8feOoRthKgXpOlFXkr1kJBOY+0uF4+nR58uanpX7pkDpb6vWkvahmmM l9Ag== X-Gm-Message-State: AOAM532/0gUmGIwXym4tbxyTYuKhNdJbah3iRRoZhXqw4F7RibsShMIB 5PvHN46qed/sDcRQpvT+CiPmUmdNzuZi61RCvg== X-Google-Smtp-Source: ABdhPJwByXon+Mt9m2Q504uC2ao4c18mORButcTWzs8qVG/WFPq0+G24T1aM/OyApAjLYydfWzNSPT8JH3B6E0G7Fug= X-Received: by 2002:a05:6602:2d55:: with SMTP id d21mr13322513iow.134.1599376801261; Sun, 06 Sep 2020 00:20:01 -0700 (PDT) In-Reply-To: <874kod3ygp.fsf@posteo.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2d; envelope-from=catonano@gmail.com; helo=mail-io1-xd2d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:16868 Archived-At: 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