From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Show source code from .debug_info section (Was Re: [PATCH] Add inspection command "source (, src)" which shows Scheme code of loaded module) Date: Tue, 23 Apr 2013 15:26:33 +0800 Organization: HFG Message-ID: <1366701993.12294.7.camel@Renee-desktop.suse> References: <1364651860.2730.71.camel@Renee-desktop.suse> <87zjxk7fjy.fsf@tines.lan> <87txnqcbf7.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366702001 5664 80.91.229.3 (23 Apr 2013 07:26:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 07:26:41 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 23 09:26:46 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UUXcj-00063j-0L for guile-devel@m.gmane.org; Tue, 23 Apr 2013 09:26:45 +0200 Original-Received: from localhost ([::1]:50903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUXci-0008I4-IW for guile-devel@m.gmane.org; Tue, 23 Apr 2013 03:26:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUXcd-0008Hx-NQ for guile-devel@gnu.org; Tue, 23 Apr 2013 03:26:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUXcc-0004mp-AQ for guile-devel@gnu.org; Tue, 23 Apr 2013 03:26:39 -0400 Original-Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]:60497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUXcc-0004ml-4h for guile-devel@gnu.org; Tue, 23 Apr 2013 03:26:38 -0400 Original-Received: by mail-pb0-f43.google.com with SMTP id md4so91765pbc.16 for ; Tue, 23 Apr 2013 00:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:date:in-reply-to:references :organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=E4toCgwErhDnel2Y6WkqolPAdV61CVtoo1UDfPEd0CQ=; b=Z+TluEiN3HQV8eik26yc2XAdgLtx0lZWQTE8W7nhOj+/dIihEiS7M6tNjJ7zymSIVY yQ2QzhGTOb2ljiMAIefbwrIGdjjwT7u1XAuVN6ikGgZVWCeEVKZQCGkcEV31O6ykiWR+ udSQ2nJOedmC1rRaPswykInksnUCqS9CNALi4MLKNI1MpCGTM2ULakBThvp8QEgDv4zM BC76vKUglgkZYzsy9hTpfbpj2vv4U+nB7ibzWMNynk7BzO/vmFF3l4ZiKmOgZLys7sQb j+FXOYAGBWRNcxPgL9fFP8m7h62fky41hYLofc63URf7gODhIDWSHOQsrD38iRFPI47z v4lQ== X-Received: by 10.68.226.106 with SMTP id rr10mr37694343pbc.127.1366701997073; Tue, 23 Apr 2013 00:26:37 -0700 (PDT) Original-Received: from [147.2.147.112] ([61.14.130.226]) by mx.google.com with ESMTPS id ag4sm12099194pbc.20.2013.04.23.00.26.34 (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 23 Apr 2013 00:26:35 -0700 (PDT) In-Reply-To: <87txnqcbf7.fsf@pobox.com> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22b X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16290 Archived-At: On Mon, 2013-04-01 at 21:12 +0200, Andy Wingo wrote: > On Sat 30 Mar 2013 22:17, Mark H Weaver writes: > > > I'd be glad to see something like this in Guile core. This code is a > > great demonstration, but it has some problems. > > It would be nice to reify the original source as a compressed string in > the debug section of the ELF file. One day... > > Andy I've checked out our latest wip-rtl and found .debug_info is on the TODO list. So I think the better solution to show source code is to take advantage of this. But this feature depends on our future RTL, so my previous patch could be useful for the 'older' guile2 user, since our REPL is well extensible, that ',src' could be a plugin for that. Thanks!