all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
To: Stefan Kangas <stefan@marxist.se>
Cc: "yates@ieee.org" <yates@ieee.org>,
	25488@debbugs.gnu.org,
	Randy Yates <randyy@garnerundergroundinc.com>
Subject: bug#25488: 25.1; gdb package interpreter problem
Date: Mon, 16 Sep 2019 09:32:27 -0400	[thread overview]
Message-ID: <87impsnz84.fsf@paluero> (raw)
In-Reply-To: <CADwFkmmNrdTSjXYw_rWK+CPqg69DOgKwTf+KwHgjJVVXzbv-Fw@mail.gmail.com> (Stefan Kangas's message of "Sun, 15 Sep 2019 03:21:20 +0200")

[-- Attachment #1: Type: text/plain, Size: 3210 bytes --]

On Saturday, September 14 2019, Stefan Kangas wrote:

> Sergio Durigan Junior <sergiodj@sergiodj.net> writes:
>
>> On Friday, January 20 2017, Glenn Morris wrote:
>>
>>>> 1. configure remote system by running "gdbserver --multi localhost:<port>"
>>>>
>>>> 2. on host system, run emacs, then "M-x gdb <ret> -i=mi"
>>>>
>>>> 3. at the gdb prompt:
>>>>
>>>>   file <path-to-exe>
>>>>   target extended-remote <remote-host-ip-addr>:<port>
>>>>   set remote exec-file <path-to-exe>
>>>>   start
>>>>
>>>> 4.on the remote side, note the message:
>>>>
>>>>   "Cannot exec <path-to-exe> : No such file or directory."
>>>>
>>>> specifically, note the space between "<path-to-exe>" and ":", which
>>>> should not be there. this is the extraneous space.
>>>
>>>
>>> Confirmed on rhel 7.
>>>
>>> This seems to be due to the " " in:
>>>
>>> (concat gdb-continuation string " ")
>>>
>>> in gdb-send, which was added in bug#14847. I've cc'd the author of that change.
>>
>> Heh, I helped the reporter diagnose this issue, and as it turns out I
>> was the culprit!
>>
>> Thanks for the report, I'll take a look at this later today.
>
> Hi Sergio,
>
> I see that the latest update here was in January 2017.  Did you ever get
> a chance to look into this issue?

Wow, what a strange concept of "later today"!  Sorry about that.

Yeah, I had the chance to look into it, and even though I don't remember
the details now, I have a patch here that seems to work for me.  I'm
attaching it to this message; can you check if it fixes the problem for
you, please?

It seems strange that the extra whitespace was added by mistake there.
I'm a bit afraid that there is a case which I haven't envisioned and
which requires that whitespace, but I couldn't come up with a testing
scenario that triggers the error.  I tested this by debugging a binary
with and without arguments (i.e., "/bin/true" and "/bin/true --help"),
and both worked fine.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

From cad0deb10f2dbdc7b3dd7d3c6f4347da9cb1f557 Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Sun, 15 Sep 2019 14:50:17 -0400
Subject: [PATCH] [gdb-mi.el] Don't add trailing whitespace when passing
 argument to GDB

This fixes bug #25488.

* lisp/progmodes/gdb-mi.el (gdb-send): Don't append whitespace to
'gdb-continuation'.
---
 lisp/progmodes/gdb-mi.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 48c7dde9f51..cf54207337d 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1827,7 +1827,7 @@ gdb-send
 		      " "))
       (setq gdb-first-done-or-error t)
       (let ((to-send (concat "-interpreter-exec console "
-                             (gdb-mi-quote (concat gdb-continuation string " "))
+                             (gdb-mi-quote (concat gdb-continuation string))
                              "\n")))
         (if gdb-enable-debug
             (push (cons 'mi-send to-send) gdb-debug-log))
-- 
2.20.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-09-16 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 20:33 bug#25488: 25.1; gdb package interpreter problem Randy Yates
2017-01-20 19:24 ` Glenn Morris
2017-01-20 19:33   ` Sergio Durigan Junior
2019-09-15  1:21 ` Stefan Kangas
2019-09-16 13:32   ` Sergio Durigan Junior [this message]
2019-09-16 13:44     ` Stefan Kangas
2019-09-23 13:03     ` Noam Postavsky
2019-09-23 13:18       ` Stefan Kangas
2019-09-23 16:19         ` Eli Zaretskii
2019-10-02 13:12         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87impsnz84.fsf@paluero \
    --to=sergiodj@sergiodj.net \
    --cc=25488@debbugs.gnu.org \
    --cc=randyy@garnerundergroundinc.com \
    --cc=stefan@marxist.se \
    --cc=yates@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.