GNU bug report logs - #71522
29.2.50; Allow associating module symbols with defining files

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Spencer Baugh <sbaugh@HIDDEN>; dated Wed, 12 Jun 2024 15:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71522 <at> debbugs.gnu.org:


Received: (at 71522) by debbugs.gnu.org; 12 Jun 2024 16:54:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 12 12:54:18 2024
Received: from localhost ([127.0.0.1]:40042 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHREo-0001QT-7e
	for submit <at> debbugs.gnu.org; Wed, 12 Jun 2024 12:54:18 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34446)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sHREj-0001QD-Ar
 for 71522 <at> debbugs.gnu.org; Wed, 12 Jun 2024 12:54:16 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sHREe-0003OC-LX; Wed, 12 Jun 2024 12:54:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=hu03jOr6wj8+9BozFcg2bo4c4U8VzLWXG/nO2tMtKyQ=; b=J65HKF2BDDS+
 35nyPhk89q6AeSDBmdAhAULlQGqRZRKC8BEeQ+ki9rEQtWgvX4y3P735JjUirHWx/WpUlCP2MBvhX
 SaSuw0CMZxvlqoXFR3QtuZPLcG4I1Oy5HhU59E6KKLBhb3DzMgKElDRODaqq64/ULqpnleGcah/cL
 7BEr7zvplZaKt8U4PsTJ/bUffvoDyz97ryei2pWdk7i1utShpVTNXcHLsohiXA8viRaVs1jWn6nte
 We8N0s3xdwBoRaIX/vz23Q7PUUaXeCH5RqueAq1wPFbyGrIPqBaUNtDdJyCpoQZbOI0B/n8+UlXOF
 lZJApjnMNSUfvyCLyCr6xg==;
Date: Wed, 12 Jun 2024 19:54:05 +0300
Message-Id: <86v82eyudu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <iery17anqjl.fsf@HIDDEN> (message from Spencer Baugh on
 Wed, 12 Jun 2024 11:12:30 -0400)
Subject: Re: bug#71522: 29.2.50;
 Allow associating module symbols with defining files
References: <iery17anqjl.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71522
Cc: 71522 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Date: Wed, 12 Jun 2024 11:12:30 -0400
> 
> 
> It's currently impossible to associate a symbol defined by a module with
> the source file which actually defined that symbol.
> 
> 1. Make any native module whatsoever, defining any Lisp symbols at all
> 2. emacs -Q -l ./your-native-module.so
> 3. (symbol-file your-native-module-symbol) yields "your-native-module.so"
> 4. If it's a function:
>    C-h f your-native-module-symbol RET
> 5. Observe that it says "your-native-module.so" defines this function,
>    and that jumping to the source via the link or "s" drops you in
>    your-native-module.so.

I'm guessing that what Emacs knows is the directory and the file name
from which it loaded the module.  If we want to be able to find the
source file, that information needs to be recorded somewhere inside
the module, otherwise there's no way Emacs could reliably find the
sources, since the module could be stripped of all the symbolic debug
info.  Suggestions for how to implement that are welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71522; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jun 2024 15:14:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 12 11:14:51 2024
Received: from localhost ([127.0.0.1]:39954 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHPgZ-0007CJ-9n
	for submit <at> debbugs.gnu.org; Wed, 12 Jun 2024 11:14:51 -0400
Received: from lists.gnu.org ([209.51.188.17]:52104)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sbaugh@HIDDEN>) id 1sHPgV-0007C8-Qd
 for submit <at> debbugs.gnu.org; Wed, 12 Jun 2024 11:14:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1sHPeN-0002iB-S8
 for bug-gnu-emacs@HIDDEN; Wed, 12 Jun 2024 11:12:36 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1sHPeK-00007W-NR
 for bug-gnu-emacs@HIDDEN; Wed, 12 Jun 2024 11:12:35 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.2.50; Allow associating module symbols with defining files
Date: Wed, 12 Jun 2024 11:12:30 -0400
Message-ID: <iery17anqjl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1718205150;
 bh=g8Am1B65hcCnf5dNSFFaWYTBlnQh26RsJ/OMeRo9ThM=;
 h=From:To:Subject:Date;
 b=D3T842IULM2IUQcvnSyEEUAGlakcFAC2A5JC106U1qTF1xAqzAjdZNUFfTWQldxMu
 EwURWMo4piD/fL15yp2k80Q2puNTWNeLFCg/Feghhv5BxRCXh4Q0xTixyo7dV0TCNy
 NZjBgenwShxqRJ7h5KlMR3au/gdYEkCiyUmq6RzaOCDQzQYXO3js7aWfM0viburW3G
 v1EhtJdwO3f4/RON8XSTOcoV9g5mw2u0OZWAvkcxI3o6ZPA1UmR7G4115a138GuA77
 fmu1HFWwkbaWC41rh9zZpS+rhREKJ7XYu1pDqLsoy6ujVc+5ZPSXrwyKhh6dpUzPr6
 BssRWachBYGUg==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
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, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


It's currently impossible to associate a symbol defined by a module with
the source file which actually defined that symbol.

1. Make any native module whatsoever, defining any Lisp symbols at all
2. emacs -Q -l ./your-native-module.so
3. (symbol-file your-native-module-symbol) yields "your-native-module.so"
4. If it's a function:
   C-h f your-native-module-symbol RET
5. Observe that it says "your-native-module.so" defines this function,
   and that jumping to the source via the link or "s" drops you in
   your-native-module.so.

It should instead be possible for a module to express which files
defines a symbol, so that it's possible to jump to the source for that
symbol, if it's around.


In GNU Emacs 29.2.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-06-01 built on
 igm-qws-u22796a
Repository revision: fcef787a846f0c51f7443dfab6af6e18b476b166
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.9 (Green Obsidian)




Acknowledgement sent to Spencer Baugh <sbaugh@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71522; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 1 Mar 2025 02:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.