From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71522: 29.2.50; Allow associating module symbols with defining files Date: Wed, 12 Jun 2024 19:54:05 +0300 Message-ID: <86v82eyudu.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38358"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71522@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 12 18:55:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sHRFi-0009kG-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jun 2024 18:55:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHRFY-0002uz-I2; Wed, 12 Jun 2024 12:55:04 -0400 Original-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 ) id 1sHRFX-0002rX-OJ for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 12:55:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHRFX-0003W3-8u for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 12:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sHRFW-0001Rq-0m for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 12:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jun 2024 16:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71522 X-GNU-PR-Package: emacs Original-Received: via spool by 71522-submit@debbugs.gnu.org id=B71522.17182112585489 (code B ref 71522); Wed, 12 Jun 2024 16:55:01 +0000 Original-Received: (at 71522) by debbugs.gnu.org; 12 Jun 2024 16:54:18 +0000 Original-Received: from localhost ([127.0.0.1]:40042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHREo-0001QT-7e for submit@debbugs.gnu.org; Wed, 12 Jun 2024 12:54:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHREj-0001QD-Ar for 71522@debbugs.gnu.org; Wed, 12 Jun 2024 12:54:16 -0400 Original-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 ) 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==; In-Reply-To: (message from Spencer Baugh on Wed, 12 Jun 2024 11:12:30 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287165 Archived-At: > From: Spencer Baugh > 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.