GNU bug report logs -
#25488
25.1; gdb package interpreter problem
Previous Next
Reported by: Randy Yates <randyy <at> garnerundergroundinc.com>
Date: Thu, 19 Jan 2017 20:37:01 UTC
Severity: normal
Tags: confirmed, patch
Found in version 25.1
Fixed in version 27.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25488 in the body.
You can then email your comments to 25488 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Thu, 19 Jan 2017 20:37:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Randy Yates <randyy <at> garnerundergroundinc.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 19 Jan 2017 20:37:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
this bug is for the gdb package, when debugging remotely. an extraneous
space is appended to the <path-to-exe> given in a "set remote exec-file
<path-to-exe>" command. this is causing the subsequent debug commands
(start, run, etc.) to fail.
presumably this is a bug in the interpreter adding an extraneous space.
note that the same commands issued to a command-line gdb instance work
fine.
Step-by-step
------------
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.
In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.11804000
Configured using:
'configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
--with-gpm=no --with-xwidgets build_alias=x86_64-redhat-linux-gnu
host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-m64 -mtune=generic' LDFLAGS=-Wl,-z,relro
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: rcirc
Minor modes in effect:
diff-auto-refine-mode: t
shell-dirtrack-mode: t
show-paren-mode: t
display-time-mode: t
tooltip-mode: t
global-eldoc-mode: t
mouse-wheel-mode: t
use-hard-newlines: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
nnimap read 17k from localhost
nnimap read 25k from localhost
nnimap read 34k from localhost
Mark set
Quit [2 times]
Making completion list...
Quit [2 times]
Making completion list...
Quit [2 times]
Mark set
Quit
Load-path shadows:
/usr/share/emacs/25.1/lisp/progmodes/cpp hides ./cpp
Features:
(shadow emacsbug dictionary link connection eieio-opt speedbar sb-image
ezimage dframe find-func rcirc gdb-mi bindat json map gud search-utils
sd-src-utils tramp-sh browse-url filecache cus-edit jka-compr info
tabify imenu man dired-aux vc-bzr vc-src vc-sccs flow-fill tramp-cache
tramp tramp-compat tramp-loaddefs trampver ucs-normalize advice
conf-mode vc-git diff-mode whitespace pulse make-mode pcmpl-unix qp
mm-archive rect thingatpt ggtags etags xref project ewoc edmacro kmacro
cscope c-comment-edit cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs log-edit easy-mmode
pcvs-util add-log vc-cvs vc-rcs pp misearch multi-isearch vc-svn
tex-mode compile shell pcomplete comint ring latexenc server mailalias
nnir sort ansi-color gnus-cite mail-extr gnus-async gnus-bcklg gnus-ml
disp-table nndraft nnmh utf-7 nnfolder network-stream nsm starttls
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache
gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message idna dired format-spec rfc822 mml mml-sec epg
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader gnus-win gnus gnus-ems nnheader wid-edit paren time delsel
cus-start cus-load vc vc-dispatcher derived my-keys mailrc invoices
my-easl-utils my-slime my-color-theme my-tags my-programming-utils
my-packages my-grep-find-file my-dictionary my-compile my-project
my-ggtags my-git ido smtpmail sendmail rfc2047 rfc2045 ietf-drums
mail-utils url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs gnus-util mm-util help-fns mail-prsvr password-cache url-vars
my-utils my-gnus email-html cl finder-inf package epg-config seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 1085807 195400)
(symbols 48 164211 94)
(miscs 40 8539 3854)
(strings 32 222707 17481)
(string-bytes 1 6015145)
(vectors 16 62826)
(vector-slots 8 1069367 52625)
(floats 8 613 2889)
(intervals 56 97658 1231)
(buffers 976 273)
(heap 1024 269956 169705))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Fri, 20 Jan 2017 19:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 25488 <at> debbugs.gnu.org (full text, mbox):
(Nick doesn't maintain gdb.el any more, so I removed him from the cc)
Randy Yates 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.
Added tag(s) confirmed.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 20 Jan 2017 19:26:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Fri, 20 Jan 2017 19:34:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 25488 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
Cheers,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Sun, 15 Sep 2019 01:22:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 25488 <at> debbugs.gnu.org (full text, mbox):
Sergio Durigan Junior <sergiodj <at> 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?
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Mon, 16 Sep 2019 13:33:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 25488 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Saturday, September 14 2019, Stefan Kangas wrote:
> Sergio Durigan Junior <sergiodj <at> 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 <at> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Mon, 16 Sep 2019 13:45:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 25488 <at> debbugs.gnu.org (full text, mbox):
tags 25488 + patch
quit
Sergio Durigan Junior <sergiodj <at> sergiodj.net> writes:
> 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?
Thanks for reporting back and providing a patch. Could someone more
familiar with this code please help test and review this?
Best regards,
Stefan Kangas
Added tag(s) patch.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 16 Sep 2019 13:45:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Mon, 23 Sep 2019 13:04:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 25488 <at> debbugs.gnu.org (full text, mbox):
> Sergio Durigan Junior <sergiodj <at> sergiodj.net> writes:
>
>> 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 for reporting back and providing a patch. Could someone more
> familiar with this code please help test and review this?
I'm not very familiar with the code, but looking around, it seems quite
likely that the extra " " was just due to a copy paste error.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Mon, 23 Sep 2019 13:20:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 25488 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> gmail.com> writes:
> > Sergio Durigan Junior <sergiodj <at> sergiodj.net> writes:
> >
> >> 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 for reporting back and providing a patch. Could someone more
> > familiar with this code please help test and review this?
>
> I'm not very familiar with the code, but looking around, it seems quite
> likely that the extra " " was just due to a copy paste error.
Thanks. Sergio has also tested this, and it worked for him. If no
one objects perhaps we could go ahead and install his patch.
I'm assuming that we have his assignment on file since his
contributions already seem to exceed the 15 line limit for trivial
changes.
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Mon, 23 Sep 2019 16:20:02 GMT)
Full text and
rfc822 format available.
Message #33 received at 25488 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Mon, 23 Sep 2019 15:18:56 +0200
> Cc: "yates <at> ieee.org" <yates <at> ieee.org>, 25488 <at> debbugs.gnu.org,
> Randy Yates <randyy <at> garnerundergroundinc.com>,
> Sergio Durigan Junior <sergiodj <at> sergiodj.net>
>
> I'm assuming that we have his assignment on file
We do.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25488
; Package
emacs
.
(Wed, 02 Oct 2019 13:13:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 25488 <at> debbugs.gnu.org (full text, mbox):
close 25488 27.1
quit
> Thanks. Sergio has also tested this, and it worked for him. If no
> one objects perhaps we could go ahead and install his patch.
No objections in 9 days, so I've now pushed this as commit 77207ca841. Closing.
Best regards,
Stefan Kangas
bug marked as fixed in version 27.1, send any further explanations to
25488 <at> debbugs.gnu.org and Randy Yates <randyy <at> garnerundergroundinc.com>
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Wed, 02 Oct 2019 13:13:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 31 Oct 2019 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.