GNU bug report logs - #39408
Breakpoints don't work with M-x gdb under TRAMP

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; Reported by: Timo Lilja <timo.lilja@HIDDEN>; Keywords: patch; dated Mon, 3 Feb 2020 19:11:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 39408) by debbugs.gnu.org; 21 Aug 2020 14:08:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 21 10:08:59 2020
Received: from localhost ([127.0.0.1]:47929 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k97j0-000389-PU
	for submit <at> debbugs.gnu.org; Fri, 21 Aug 2020 10:08:59 -0400
Received: from mout.gmx.net ([212.227.17.22]:60967)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1k97iv-00037q-L0
 for 39408 <at> debbugs.gnu.org; Fri, 21 Aug 2020 10:08:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1598018917;
 bh=7pZwsubGuQc1QZQEzAIyD+nX4JPGEL9U1L8G78QgMZw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=UtBJG6lNRI6TzAXBYEYgAHrFd0xly1QqzYMuoDXybOFFSeyLS6Db+L7n9H8neGJ/S
 o1ifwB63aMdMx3kX1mHqDZQkqwIc7X0sl+J2p7lebOwDszndSVSmDQsKWp9f3XMBDy
 KnhTEV5aOx8NMUd7gwK+A349q5ZybKwK91yOulGM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([212.86.50.208]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8hVB-1k4QlA0Xlh-004j7q; Fri, 21
 Aug 2020 16:08:37 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#39408: Breakpoints don't work with M-x gdb under TRAMP
References: <CAFsu5Z2nPRXbedpT_6WJ+F6YYZ3WA2V304PpaiqsEGkm=PYwUg@HIDDEN>
 <87mu2o6wzn.fsf@HIDDEN>
Date: Fri, 21 Aug 2020 16:08:35 +0200
In-Reply-To: <87mu2o6wzn.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 21 Aug 2020 13:48:12 +0200")
Message-ID: <87d03khz18.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:8RyYwLW/pyo8HelNUGSTA5IOa+balwDytWN8iYQOwVCc3S52/Tg
 MDk6xP4lTLANOYl3urjWcDOLCU+2G/IuY1/xhMF5GYxQM3QX0MYZIG61X6DPc/6X70M0UCk
 mOB8frDcAW3L0e3WKnSlU8uxVmGPEwH0tC6zDCCk6ZehGEGCo59CPtAgu9A8A5bV+iXeqVU
 8nLAx9MHbfGpT6XOSzspA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:R0JrqcdpJNI=:7GcQHQr+xygmWznaqV6ldv
 72l58GQWTfz3JXbs9Fg+BGBnyhS2cGSNPxTPiY14DqGHTY5/gz/PjhxVpv7WkzOWgEPpxQeeY
 rJtCc7sNqnK5A5YtQUwI4IXMUEkJ9HPgBP/wBhNfoxnS1N2euxPsd4OgG5xF+4dX73xWQdLsH
 JWoh6hLLnvDTLHZC61WOraFNWE7qH2m3mCoGD3OqAp+UpeITpkDOjxw++pU/SGvsVFqwo2bs6
 PsHkRKQrCgU6TwDDCyTK3E771aldb+CimNLoK+QSBgnvXHsAdal8348NcBwEIL+iFch+QFx7+
 a0vSsjl6vILcJai19gddFjKUdgeao+Vgb1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N>
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: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

Hi Lars,

> Michael, there's tramp-related patch for gdb-mi/gud in this bug report
> that I think looks reasonable, if I'm reading it correctly.  Do you have
> any opinions on this?

Somehow, I've missed that bug report :-(

I have no objection to apply the patch, but wouldn't it be better to
understand, why bindat-get-field returns file names like
/ssh:vagrant@debug:/vagrant/"/vagrant/hello.c" ? Just patching the
obscure result doesn't look error prone to me.

Furthermore,

-  (setq f (concat (or (file-remote-p default-directory) "") f))
+  (unless (file-remote-p f)
+    (setq f (concat (or (file-remote-p default-directory) "") f)))

could be simplified to

   (setq f (concat (file-remote-p default-directory) f))

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39408; Package emacs. Full text available.
Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 39408) by debbugs.gnu.org; 21 Aug 2020 11:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 21 07:48:26 2020
Received: from localhost ([127.0.0.1]:45207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k95X0-0008GJ-5Z
	for submit <at> debbugs.gnu.org; Fri, 21 Aug 2020 07:48:26 -0400
Received: from quimby.gnus.org ([95.216.78.240]:41498)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1k95Wx-0008G1-Ug
 for 39408 <at> debbugs.gnu.org; Fri, 21 Aug 2020 07:48:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=HzyO5jKcndiRi/LjNUoHA6cO0uyaL2vnCPDiQzPh5w4=; b=nq8f9bgHKocCRwjBIj0pqZ+uuB
 jC9kkAUFvDq9LcWh5yxuLQ+gtxJaqnjeetn4Y30jFY6XtStNSxULxhxtuR4aUT3XFhOhjp12TQqBC
 pVBxXSks9Q5IBTao8zDowtG/4ELVl3nj1DdoNEGcRzWcC/orP3pery4OwCGGrPIj4m8Y=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1k95Wo-00039b-Dg; Fri, 21 Aug 2020 13:48:17 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Timo Lilja <timo.lilja@HIDDEN>
Subject: Re: bug#39408: Breakpoints don't work with M-x gdb under TRAMP
References: <CAFsu5Z2nPRXbedpT_6WJ+F6YYZ3WA2V304PpaiqsEGkm=PYwUg@HIDDEN>
X-Now-Playing: Move D & Pete Namlook's _Reissued 001_: "Stranger"
Date: Fri, 21 Aug 2020 13:48:12 +0200
In-Reply-To: <CAFsu5Z2nPRXbedpT_6WJ+F6YYZ3WA2V304PpaiqsEGkm=PYwUg@HIDDEN>
 (Timo Lilja's message of "Mon, 3 Feb 2020 21:07:05 +0200")
Message-ID: <87mu2o6wzn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Timo Lilja <timo.lilja@HIDDEN> writes: [...] > 5. Switch back
 to source window > C-x b hello.c RET > > 6. Add another breakpoint > C-x
 C-a c-b > > Emacs becomes unresponsive and the minibuffer is flooded with
 the > following error message: > > ~ [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39408
Cc: 39408 <at> debbugs.gnu.org, Michael Albinus <michael.albinus@HIDDEN>
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: -1.0 (-)

Timo Lilja <timo.lilja@HIDDEN> writes:

[...]

> 5. Switch back to source window
>    C-x b hello.c RET
>
> 6. Add another breakpoint
>    C-x C-a c-b
>
> Emacs becomes unresponsive and the minibuffer is flooded with the
> following error message:
>
> ~File /ssh:vagrant@debug:/vagrant/"/vagrant/hello.c" no longer exists!~
>
> *** Fix
>
> 1. Apply patch gdb-tramp-fix.diff
>    $ zcat /usr/share/emacs/26.1/lisp/progmodes/gdb-mi.el.gz >gdb-mi.el
>    $ zcat /usr/share/emacs/26.1/lisp/progmodes/gud.el.gz >gud.el
>    $ patch <gdb-tramp-fix.diff

Michael, there's tramp-related patch for gdb-mi/gud in this bug report
that I think looks reasonable, if I'm reading it correctly.  Do you have
any opinions on this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

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


Received: (at submit) by debbugs.gnu.org; 3 Feb 2020 19:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 14:10:21 2020
Received: from localhost ([127.0.0.1]:42217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iyh6z-00059i-2J
	for submit <at> debbugs.gnu.org; Mon, 03 Feb 2020 14:10:21 -0500
Received: from lists.gnu.org ([209.51.188.17]:41435)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tjjlilja@HIDDEN>) id 1iyh49-00055V-QN
 for submit <at> debbugs.gnu.org; Mon, 03 Feb 2020 14:07:26 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:44983)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tjjlilja@HIDDEN>) id 1iyh46-0001me-6n
 for bug-gnu-emacs@HIDDEN; Mon, 03 Feb 2020 14:07:25 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE, RCVD_IN_DNSWL_NONE,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tjjlilja@HIDDEN>) id 1iyh44-0004n3-5U
 for bug-gnu-emacs@HIDDEN; Mon, 03 Feb 2020 14:07:21 -0500
Received: from mail-yw1-f68.google.com ([209.85.161.68]:44359)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <tjjlilja@HIDDEN>) id 1iyh43-0004jL-JK
 for bug-gnu-emacs@HIDDEN; Mon, 03 Feb 2020 14:07:19 -0500
Received: by mail-yw1-f68.google.com with SMTP id t141so14891028ywc.11
 for <bug-gnu-emacs@HIDDEN>; Mon, 03 Feb 2020 11:07:17 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=5en7Eiav0zWzMBw39vVn5cYXTtXWcY7SgMvlSJriT9A=;
 b=SysPUoRQbPV3IhaxyfR9++5kF7GkiH9KGeh3aGRtnk/zk3wzBnEH/0w+haZcilNoIY
 x3CJOIo8H2/+Q77LSlkChrnwGeqoenI9nGo4jc7dDyegMRTC4Ai3lSXsZeJ2WQjqeU7O
 G7/lcsIoPF3NRCaDvRFJ5uZpfv4EJkrLqdp3qiuPVBxJATBSg0Di2PEGDzGZ46yBEAgn
 kb7zUFsHZuu4R7Rr44m3Bhpi1h97xfajLxb7iBIuuU9Wl1MwO28FWmxgGy0BTA6dJ2fY
 C9ovRYxMaGkSXobO/g8CrZCOuLgrvppF3engHJqI2qz4c8Sx0QGT+y5e8SCyhJOfoEm0
 RZBA==
X-Gm-Message-State: APjAAAUSOOHfeVDIm/IW3RfsC0SuBjNF7a2Hp4HbgmMZe/WHESzq0bGm
 ny0TpIxncqZm4gaSMK5qKqu7ys6kFFuLUzzkYoYymPf2
X-Google-Smtp-Source: APXvYqynMY8zrZyZmqyb3RL41kgW1K8J9oQcAv4TF6cBkkJIj2tPegq2jWXgXgxtaCVobo+bh+rGvGLG4+uMy5QY5ik=
X-Received: by 2002:a5b:5cf:: with SMTP id w15mr9692189ybp.490.1580756836716; 
 Mon, 03 Feb 2020 11:07:16 -0800 (PST)
MIME-Version: 1.0
From: Timo Lilja <timo.lilja@HIDDEN>
Date: Mon, 3 Feb 2020 21:07:05 +0200
Message-ID: <CAFsu5Z2nPRXbedpT_6WJ+F6YYZ3WA2V304PpaiqsEGkm=PYwUg@HIDDEN>
Subject: Breakpoints don't work with M-x gdb under TRAMP
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="000000000000bab899059db0a148"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 209.85.161.68
X-Spam-Score: 2.8 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  *** Environment - GNU Emacs 26.1 (build 2,
 x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-23,
 modified by Debian - The code looks identical
 on the relevant parts in Emacs git master *** Steps to reproduce 
 Content analysis details:   (2.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: gnu.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [209.51.188.17 listed in list.dnswl.org]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (tjjlilja[at]gmail.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 HTML_MESSAGE           BODY: HTML included in message
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 03 Feb 2020 14:10:20 -0500
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: -0.2 (/)

--000000000000bab899059db0a148
Content-Type: multipart/alternative; boundary="000000000000bab897059db0a146"

--000000000000bab897059db0a146
Content-Type: text/plain; charset="UTF-8"

*** Environment

- GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of
  2019-09-23, modified by Debian
- The code looks identical on the relevant parts in Emacs git master

*** Steps to reproduce

1. Run emacs
   $ emacs -q

2. Start remote debugging session
   M-x gdb RET gdb -i=mi /ssh:vagrant@debug:/vagrant/hello

3. Set a breakpoint in *gud-hello* buffer
   (gdb) break main
   Breakpoint 1 at 0x1149: file hello.c, line 6.

4. Run the program to the breakpoint
   (gdb) run

5. Switch back to source window
   C-x b hello.c RET

6. Add another breakpoint
   C-x C-a c-b

Emacs becomes unresponsive and the minibuffer is flooded with the
following error message:

~File /ssh:vagrant@debug:/vagrant/"/vagrant/hello.c" no longer exists!~

*** Fix

1. Apply patch gdb-tramp-fix.diff
   $ zcat /usr/share/emacs/26.1/lisp/progmodes/gdb-mi.el.gz >gdb-mi.el
   $ zcat /usr/share/emacs/26.1/lisp/progmodes/gud.el.gz >gud.el
   $ patch <gdb-tramp-fix.diff

2. run emacs with modified gdb-mi.el and gud.el
   $ emacs -q -l el/gdb-mi.el -l el/gud.el

3. Setting breakpoints with C-x C-a C-b should work now

The changes in ~gdb-mi.el~ fix the problem with the "no longer exist"
error message.

The change in ~gud.el~ makes the fringe mark work a bit better and also
the source buffer to pop up when a break point is hit.

The problem seems to be that not all filename information goes through
(gdb-jsonify-buffer) but gdb-mi.el and gud.el read them directly from
gdb's buffers. These patches check wheter a gdb buffer is remote, and
wrap the file names accordingly.

There is probably a better way to fix the problem, but my knowledge
of gdb-mi.el is limited.

Relates to bug #23608.

*** Affected functions
(gdb-place-breakpoints)
(gdb-get-location)
(gdb-goto-breakpoint)
(gdb-frame-handler)
(gud-file-name)

*** References
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23608

--000000000000bab897059db0a146
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">*** Environment<br><br>- GNU Emacs 26.1 (build 2, x86_64-p=
c-linux-gnu, GTK+ Version 3.24.5) of<br>=C2=A0 2019-09-23, modified by Debi=
an<br>- The code looks identical on the relevant parts in Emacs git master<=
br><br>*** Steps to reproduce<br><br>1. Run emacs<br>=C2=A0 =C2=A0$ emacs -=
q<br><br>2. Start remote debugging session<br>=C2=A0 =C2=A0M-x gdb RET gdb =
-i=3Dmi /ssh:vagrant@debug:/vagrant/hello<br><br>3. Set a breakpoint in *gu=
d-hello* buffer<br>=C2=A0 =C2=A0(gdb) break main<br>=C2=A0 =C2=A0Breakpoint=
 1 at 0x1149: file hello.c, line 6.<br><br>4. Run the program to the breakp=
oint<br>=C2=A0 =C2=A0(gdb) run<br><br>5. Switch back to source window<br>=
=C2=A0 =C2=A0C-x b hello.c RET<br><br>6. Add another breakpoint<br>=C2=A0 =
=C2=A0C-x C-a c-b<br><br>Emacs becomes unresponsive and the minibuffer is f=
looded with the<br>following error message:<br><br>~File /ssh:vagrant@debug=
:/vagrant/&quot;/vagrant/hello.c&quot; no longer exists!~<br><div><br></div=
><div>*** Fix<br><br>1. Apply patch gdb-tramp-fix.diff<br>=C2=A0 =C2=A0$ zc=
at /usr/share/emacs/26.1/lisp/progmodes/gdb-mi.el.gz &gt;gdb-mi.el<br>=C2=
=A0 =C2=A0$ zcat /usr/share/emacs/26.1/lisp/progmodes/gud.el.gz &gt;gud.el<=
br>=C2=A0 =C2=A0$ patch &lt;gdb-tramp-fix.diff<br><br>2. run emacs with mod=
ified gdb-mi.el and gud.el<br>=C2=A0 =C2=A0$ emacs -q -l el/gdb-mi.el -l el=
/gud.el<br><br>3. Setting breakpoints with C-x C-a C-b should work now<br><=
br>The changes in ~gdb-mi.el~ fix the problem with the &quot;no longer exis=
t&quot;<br>error message.<br><br>The change in ~gud.el~ makes the fringe ma=
rk work a bit better and also<br>the source buffer to pop up when a break p=
oint is hit.<br><br>The problem seems to be that not all filename informati=
on goes through<br>(gdb-jsonify-buffer) but gdb-mi.el and gud.el read them =
directly from<br>gdb&#39;s buffers. These patches check wheter a gdb buffer=
 is remote, and<br>wrap the file names accordingly.<br><br>There is probabl=
y a better way to fix the problem, but my knowledge=C2=A0</div><div>of gdb-=
mi.el is limited.</div><div><br>Relates to bug #23608.<br><br>*** Affected =
functions<br>(gdb-place-breakpoints)<br>(gdb-get-location)<br>(gdb-goto-bre=
akpoint)<br>(gdb-frame-handler)<br>(gud-file-name)<br><br>*** References<br=
>- <a href=3D"https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23608">https:=
//debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23608</a><br></div><div><br></div=
><div><br></div></div>

--000000000000bab897059db0a146--

--000000000000bab899059db0a148
Content-Type: text/x-patch; charset="US-ASCII"; name="gdb-tramp-fix.diff"
Content-Disposition: attachment; filename="gdb-tramp-fix.diff"
Content-Transfer-Encoding: base64
Content-ID: <f_k66tploi0>
X-Attachment-Id: f_k66tploi0

LS0tIGdkYi1taS5lbC5vcmlnCTIwMjAtMDEtMjYgMTg6NDY6MzUuMzUxNzQxNTI1ICswMjAwCisr
KyBnZGItbWkuZWwJMjAyMC0wMS0yMiAwOTo1ODowMS40NDU4MzQwMDcgKzAyMDAKQEAgLTI2OTMs
NyArMjY5Myw3IEBACiAgICAgKGxldCAoKHJlbW90ZSAoZmlsZS1yZW1vdGUtcCBkZWZhdWx0LWRp
cmVjdG9yeSkpKQogICAgICAgKHdoZW4gcmVtb3RlCiAgICAgICAgIChnb3RvLWNoYXIgKHBvaW50
LW1pbikpCi0gICAgICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndhcmQgIltcXFssXWZ1bGxuYW1l
PVwiXFwoLitcXClcIiIgbmlsIHQpCisgICAgICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndhcmQg
IixmdWxsbmFtZT1cIlxcKC4rXFwpXCIiIG5pbCB0KQogICAgICAgICAgIChyZXBsYWNlLW1hdGNo
IChjb25jYXQgcmVtb3RlICJcXDEiKSBuaWwgbmlsIG5pbCAxKSkpKQogICAgIChnb3RvLWNoYXIg
K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dC1nZXQtZmllbGQgZnJhbWUg
J2xldmVsKSkKICAgICAgIChzZXRxIGdkYi1mcmFtZS1hZGRyZXNzIChiaW5kYXQtZ2V0LWZpZWxk
IGZyYW1lICdhZGRyKSkKICAgICAgIChsZXQgKChsaW5lIChiaW5kYXQtZ2V0LWZpZWxkIGZyYW1l
ICdsaW5lKSkpCi0tLSBndWQuZWwub3JpZwkyMDIwLTAxLTI2IDE4OjQ2OjQxLjU2Mzc4OTE4OSAr
MDIwMAorKysgZ3VkLmVsCTIwMjAtMDEtMjYgMjI6Mjk6MzguMDUzOTc1MzQ2ICswMjAwCkBAIC0z
MDEsNyArMzAxLDggQEAKICAgOzsgcmVtb3RlIHBhcnQgdG8gZiwgd2hpY2ggaXMgdGhlIGxvY2Fs
IGZpbGUgbmFtZS4gIEZvcnR1bmF0ZWx5LAogICA7OyBgZmlsZS1yZW1vdGUtcCcgcmV0dXJucyBl
eGFjdGx5IHRoaXMgcmVtb3RlIGZpbGUgbmFtZSBwYXJ0IChvcgogICA7OyBuaWwgb3RoZXJ3aXNl
KS4KLSAgKHNldHEgZiAoY29uY2F0IChvciAoZmlsZS1yZW1vdGUtcCBkZWZhdWx0LWRpcmVjdG9y
eSkgIiIpIGYpKQorICAodW5sZXNzIChmaWxlLXJlbW90ZS1wIGYpCisgICAgKHNldHEgZiAoY29u
Y2F0IChvciAoZmlsZS1yZW1vdGUtcCBkZWZhdWx0LWRpcmVjdG9yeSkgIiIpIGYpKSkKICAgKGlm
IChmaWxlLWV4aXN0cy1wIGYpIChleHBhbmQtZmlsZS1uYW1lIGYpCiAgICAgKGxldCAoKGRpcmVj
dG9yaWVzIChndWQtdmFsICdkaXJlY3RvcmllcykpCiAJICAocmVzdWx0IG5pbCkpCg==
--000000000000bab899059db0a148--




Acknowledgement sent to Timo Lilja <timo.lilja@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#39408; 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: Fri, 21 Aug 2020 14:15:02 UTC

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