From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Vladimir Nikishkin Newsgroups: gmane.emacs.bugs Subject: bug#40271: Fwd: bug#40271: 26.3; gdb-mode fails to initialize if the target executable is built without symbols Date: Sat, 28 Mar 2020 20:39:34 +0800 Message-ID: References: <87mu80k88j.fsf@delllaptop.lockywolf.net> <83mu807k7k.fsf@gnu.org> <83k1347jc3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="54796"; mail-complaints-to="usenet@ciao.gmane.io" To: 40271@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 28 13:40:13 2020 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 1jIAl3-000E8y-DO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Mar 2020 13:40:13 +0100 Original-Received: from localhost ([::1]:52826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIAl2-0004TK-64 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Mar 2020 08:40:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51280) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIAku-0004T1-AU for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 08:40:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIAks-0007NQ-Us for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 08:40:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIAks-0007MY-R1 for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 08:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIAks-0003dd-Ku for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 08:40:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87mu80k88j.fsf@delllaptop.lockywolf.net> Resent-From: Vladimir Nikishkin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Mar 2020 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40271 X-GNU-PR-Package: emacs Original-Received: via spool by 40271-submit@debbugs.gnu.org id=B40271.158539919713964 (code B ref 40271); Sat, 28 Mar 2020 12:40:02 +0000 Original-Received: (at 40271) by debbugs.gnu.org; 28 Mar 2020 12:39:57 +0000 Original-Received: from localhost ([127.0.0.1]:33724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jIAkn-0003dA-5q for submit@debbugs.gnu.org; Sat, 28 Mar 2020 08:39:57 -0400 Original-Received: from mail-ed1-f50.google.com ([209.85.208.50]:38040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jIAkl-0003cw-0c for 40271@debbugs.gnu.org; Sat, 28 Mar 2020 08:39:55 -0400 Original-Received: by mail-ed1-f50.google.com with SMTP id e5so14893455edq.5 for <40271@debbugs.gnu.org>; Sat, 28 Mar 2020 05:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:from:date:message-id:subject:to :content-transfer-encoding; bh=e799fVRP/emkCfJMp9Ca4/Pv+KXOgb59ELm3uA8rQyw=; b=F5/xZ0LBJ20BXl8PmTibEdL+rB02iqB/QSWskz5ZPOdguKY4HJ8LyUIgjjHGQUq1OJ gYXaj6dhQZo0le9HXHSdkA5KQ9OTLdQj4bpd9DgA+2zJcSTR7pCZ5zEWTQ6sB8SNh9h3 3Dj1+DcMtfmagd0RsVamRKzrX9RBboJLPo59CprxcePLT+fFbcz0Bdvy9MVX08Ax32wP c4yQjp7kRyxeiR/yyFi/VxyHrsft7MVkFE2MohDgmZKuf5R8MkG4dqc5JqUYKoPuRDMA oLKZTM9rd/NoQWVzLG/3FGwJC7pUi9mQEsHZTGc4LvThdhcCaBp+uwy3drzjL4DDZ3b7 Cqow== 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:from:date:message-id :subject:to:content-transfer-encoding; bh=e799fVRP/emkCfJMp9Ca4/Pv+KXOgb59ELm3uA8rQyw=; b=XxLdGumD6bHU1TBACmNPowJpYclpa1kzTKgBc23J7MxZqESeQE98Hcg2gsT7I2ZEhD AAIL7kG0CjJTyNe+vnCN40fyM7cdXP7HzAR8/l+Lo6JKzQ5ib5liztSTsl/dqCNqqm55 +t+gVFgqx3h5gL/WRi1nw0eoyDHab9Qx57SeY7eqqTJtie1X5bP5NBwSqOG2jrS6DM+7 LUI19Cle7YCJIL9gkp1lFW65cwnVV5Ok5NzlRyySsO8B/lZ8HRi57CV0NEtvWVdov9GW leRG9NLkGTASN0dWbqxqlBKcX5EM0nBiGRjMMPzCjE4n8FmImb/p48vHiSLJFnTOthpJ q8pQ== X-Gm-Message-State: ANhLgQ3yYuoD13xSwtv80ltcEE6wnYprSYZZlJ7/wtoCag26RbABKioT bNlb/gjoZB0bq4q/ZRWPLOMAMFRJik3gtwdmV62GsA== X-Google-Smtp-Source: ADFU+vu1R3tfaTKyH/r9uiF76jH1KWMWB9tKVgpQyImd+dZF10nYtsWeO6UYScl7XZ0N4XuHaU0xtsuji8qf5zTgYgw= X-Received: by 2002:a50:8e08:: with SMTP id 8mr3539155edw.153.1585399188542; Sat, 28 Mar 2020 05:39:48 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:177807 Archived-At: ---------- Forwarded message --------- =D0=9E=D1=82: Vladimir Nikishkin Date: =D1=81=D0=B1, 28 =D0=BC=D0=B0=D1=80. 2020 =D0=B3. =D0=B2 20:38 Subject: Re: bug#40271: 26.3; gdb-mode fails to initialize if the target executable is built without symbols To: Eli Zaretskii I am not super sure how to debug this. Firsly, regarding your question: lockywolf@delllaptop:~/DevLinux/chibi-sicp$ gdb -i=3Dmi a.out =3Dthread-group-added,id=3D"i1" ~"GNU gdb (GDB) 9.1\n" ~"Copyright (C) 2020 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law." ~"\nType \"show copying\" and \"show warranty\" for details.\n" ~"This GDB was configured as \"x86_64-slackware-linux\".\n" ~"Type \"show configuration\" for configuration details.\n" ~"For bug reporting instructions, please see:\n" ~".\n" ~"Find the GDB manual and other documentation resources online at:\n ." ~"\n\n" ~"For help, type \"help\".\n" ~"Type \"apropos word\" to search for commands related to \"word\"...\n" =3Dcmd-param-changed,param=3D"logging file",value=3D"/home/lockywolf/gdb-lo= g.log" =3Dcmd-param-changed,param=3D"print pretty",value=3D"on" =3Dcmd-param-changed,param=3D"print array-indexes",value=3D"on" =3Dcmd-param-changed,param=3D"print array",value=3D"on" =3Dcmd-param-changed,param=3D"print symbol-filename",value=3D"on" =3Dcmd-param-changed,param=3D"print object",value=3D"on" =3Dcmd-param-changed,param=3D"print vtbl",value=3D"on" =3Dcmd-param-changed,param=3D"history save",value=3D"on" ~"Reading symbols from a.out...\n" (gdb) Secondly: The place where gdb-mode fail, IMO, is line 4688 in the gdb-mi.el, function gdb-get-source-file I inserted (write-file "/home/lockywolf/debugging-buffer.txt") right after (goto-char (min-point)), and the contents of the file are: lockywolf@delllaptop:~$ cat debugging-buffer.1.txt line=3D"1",file=3D"../sysdeps/x86_64/start.S",fullname=3D"/root/glibc-2a0c6= 5c5167af50893952729ba38cc68/glibc-2.30/csu/../sysdeps/x86_64/start.S",macro= -info=3D"0" /root/glibc-* is the place where Slackware developers compile glibc. Doesn't seem like the correct file. The correct file is called "second.f90", and is in the same directory. =D1=81=D0=B1, 28 =D0=BC=D0=B0=D1=80. 2020 =D0=B3. =D0=B2 20:30, Eli Zaretsk= ii : > > > Date: Sat, 28 Mar 2020 15:11:27 +0300 > > From: Eli Zaretskii > > Cc: 40271@debbugs.gnu.org > > > > > From: Vladimir Nikishkin > > > Date: Sat, 28 Mar 2020 19:51:40 +0800 > > > > > > The way to reproduce would be the following: > > > 1)printf "program main\nend" > test.f90 > > > 2)gfortran test.f90 > > > 3)emacs -q > > > 4)M-: (setq gdb-many-windows t) RET > > > 5)gdb RET a.out RET > > > > > > Observe that gdb-mode fails to initialize. > > > > I cannot reproduce this on my system, debugging one of the programs in > > the public /usr/bin/ directory (which are all stripped of the > > debugging symbols). > > > > > This happens because in gdb-mi.el.gz, line 4689, gdb-main-file gets > > > a completely unrelated .S file name relative to the directory where > > > distro authors compile glibc. > > > > Please show all the related details (what regexp search fails, what > > does it find, and what it ought to find instead), since otherwise it > > will be very hard to fix this problem. > > Also, if you start GDB from the shell prompt, like this: > > $ gdb -i=3Dmi ./a.out > > and then issue the -file-list-exec-source-file command, what do you > see? --=20 Yours sincerely, Vladimir Nikishkin --=20 Yours sincerely, Vladimir Nikishkin