Subject: bug#10765: 24.0.93; gdb-mi cannot transmit commands containing double quotes

From: Jim Blandy <[email-masked]>
Date: Wed, 8 Feb 2012 12:56:59 -0800

When I start debugging a program with M-x gdb, and type the command:

(gdb) print "fleen"

The following message appears in the minibuffer:

Problem parsing arguments: interpreter-exec console "print "fleen""

This problem occurs because gdb-send fails to properly quote the
arguments to the "-interpreter-exec console" MI packet it sends.

In GNU Emacs 24.0.93.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2012-02-08 on fyodor
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Configured using:
 `configure '--prefix=/home/jimb/emacs' 'CFLAGS=-g3 -O0''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-ring-mode: t
  erc-notify-mode: t
  erc-networks-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-match-mode: t
  erc-list-mode: t
  erc-pcomplete-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: 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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> <switch-frame> <switch-frame> <switch-frame>
C-x C-f e m a c s / e m a c s / . g i t / c o n f i
g <return> <switch-frame> <switch-frame> M-x m a n
<return> g i t - p u s h <return> C-x 0 <switch-frame>
<switch-frame> q <switch-frame> <switch-frame> <switch-frame>
<switch-frame> q <switch-frame> <switch-frame> C-x
C-y C-x C-y <switch-frame> <switch-frame> <switch-frame>
<switch-frame> <switch-frame> <switch-frame> C-x C-f
e m a c s <tab> e m a s c <tab> l i <backspace> <backspace>
<backspace> <backspace> c s / l i s <tab> p r o <tab>
g <backspace> g m <tab> g d b - m <tab> <return> C-v
C-v C-v C-s - g d b - q u <backspace> <backspace> <backspace>
<backspace> C-a C-s g d b - m i - q u o t e C-s C-a
<switch-frame> <switch-frame> C-x C-v <return> C-s
g d b - m i - q u o t e C-a M-x e v a l - b u f f <tab>
<return> <switch-frame> M-x g d b <return> <M-backspace>
<M-backspace> ~ / m o z / d b g / j s / s r c / o b
j ~ / j s <return> p r i n t SPC " f l e e n " <return>
C-x 2 C-x o C-x b * M e s <tab> <return> <switch-frame>
M-x m <backspace> e m a c s - r e <tab> <M-backspace>
<M-backspace> r e p o <tab> r t - e m <tab> <return>
C-g M-x e m a c s - r e <tab> <backspace> <backspace>
<tab> b u <tab> <tab> <M-backspace> <M-backspace> b
u g <tab> <M-backspace> r e p o r t <tab> <return>

Recent messages:
Loading vc-git...done
Invoking man git-push in the background
Please wait: formatting the git-push man page...
git-push man page formatted
Making completion list...
Mark saved where search started [3 times]
Problem parsing arguments: interpreter-exec console "print "fleen""
Making completion list...
Quit
Making completion list... [2 times]

Load-path shadows:
/home/jimb/elisp/psvn hides /usr/share/emacs/site-lisp/psvn
/home/jimb/moz/elisp/diff-mode hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/vc/diff-mode
/home/jimb/elisp/rst hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/textmodes/rst
/home/jimb/.emacs.d/org-7.5/lisp/org-faces hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-faces
/home/jimb/.emacs.d/org-7.5/lisp/ob-keys hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-keys
/home/jimb/.emacs.d/org-7.5/lisp/org-taskjuggler hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-taskjuggler
/home/jimb/.emacs.d/org-7.5/lisp/ob-C hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-C
/home/jimb/.emacs.d/org-7.5/lisp/org-capture hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-capture
/home/jimb/.emacs.d/org-7.5/lisp/org-freemind hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-freemind
/home/jimb/.emacs.d/org-7.5/lisp/org-datetree hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-datetree
/home/jimb/.emacs.d/org-7.5/lisp/org-publish hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-publish
/home/jimb/.emacs.d/org-7.5/lisp/ob-exp hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-exp
/home/jimb/.emacs.d/org-7.5/lisp/ob-js hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-js
/home/jimb/.emacs.d/org-7.5/lisp/ob-ocaml hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-ocaml
/home/jimb/.emacs.d/org-7.5/lisp/org-ctags hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-ctags
/home/jimb/.emacs.d/org-7.5/lisp/ob-R hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-R
/home/jimb/.emacs.d/org-7.5/lisp/org-footnote hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-footnote
/home/jimb/.emacs.d/org-7.5/lisp/ob-gnuplot hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-gnuplot
/home/jimb/.emacs.d/org-7.5/lisp/org-remember hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-remember
/home/jimb/.emacs.d/org-7.5/lisp/org-irc hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-irc
/home/jimb/.emacs.d/org-7.5/lisp/org-clock hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-clock
/home/jimb/.emacs.d/org-7.5/lisp/ob-calc hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-calc
/home/jimb/.emacs.d/org-7.5/lisp/org-docbook hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-docbook
/home/jimb/.emacs.d/org-7.5/lisp/org-timer hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-timer
/home/jimb/.emacs.d/org-7.5/lisp/ob-emacs-lisp hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-emacs-lisp
/home/jimb/.emacs.d/org-7.5/lisp/org-table hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-table
/home/jimb/.emacs.d/org-7.5/lisp/ob-ruby hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-ruby
/home/jimb/.emacs.d/org-7.5/lisp/org-info hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-info
/home/jimb/.emacs.d/org-7.5/lisp/org-vm hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-vm
/home/jimb/.emacs.d/org-7.5/lisp/org-pcomplete hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-pcomplete
/home/jimb/.emacs.d/org-7.5/lisp/ob-css hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-css
/home/jimb/.emacs.d/org-7.5/lisp/ob-tangle hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-tangle
/home/jimb/.emacs.d/org-7.5/lisp/org-install hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-install
/home/jimb/.emacs.d/org-7.5/lisp/ob-ledger hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-ledger
/home/jimb/.emacs.d/org-7.5/lisp/org-archive hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-archive
/home/jimb/.emacs.d/org-7.5/lisp/org hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org
/home/jimb/.emacs.d/org-7.5/lisp/org-beamer hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-beamer
/home/jimb/.emacs.d/org-7.5/lisp/org-colview hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-colview
/home/jimb/.emacs.d/org-7.5/lisp/org-latex hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-latex
/home/jimb/.emacs.d/org-7.5/lisp/org-wl hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-wl
/home/jimb/.emacs.d/org-7.5/lisp/org-habit hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-habit
/home/jimb/.emacs.d/org-7.5/lisp/ob-lob hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-lob
/home/jimb/.emacs.d/org-7.5/lisp/org-bibtex hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-bibtex
/home/jimb/.emacs.d/org-7.5/lisp/ob-python hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-python
/home/jimb/.emacs.d/org-7.5/lisp/org-exp hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-exp
/home/jimb/.emacs.d/org-7.5/lisp/org-indent hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-indent
/home/jimb/.emacs.d/org-7.5/lisp/ob-scheme hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-scheme
/home/jimb/.emacs.d/org-7.5/lisp/ob-sh hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-sh
/home/jimb/.emacs.d/org-7.5/lisp/org-mobile hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mobile
/home/jimb/.emacs.d/org-7.5/lisp/ob hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob
/home/jimb/.emacs.d/org-7.5/lisp/org-gnus hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-gnus
/home/jimb/.emacs.d/org-7.5/lisp/org-compat hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-compat
/home/jimb/.emacs.d/org-7.5/lisp/org-mhe hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mhe
/home/jimb/.emacs.d/org-7.5/lisp/org-w3m hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-w3m
/home/jimb/.emacs.d/org-7.5/lisp/org-src hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-src
/home/jimb/.emacs.d/org-7.5/lisp/ob-lisp hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-lisp
/home/jimb/.emacs.d/org-7.5/lisp/org-docview hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-docview
/home/jimb/.emacs.d/org-7.5/lisp/ob-screen hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-screen
/home/jimb/.emacs.d/org-7.5/lisp/org-list hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-list
/home/jimb/.emacs.d/org-7.5/lisp/ob-eval hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-eval
/home/jimb/.emacs.d/org-7.5/lisp/ob-haskell hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-haskell
/home/jimb/.emacs.d/org-7.5/lisp/org-exp-blocks hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-exp-blocks
/home/jimb/.emacs.d/org-7.5/lisp/org-id hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-id
/home/jimb/.emacs.d/org-7.5/lisp/org-attach hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-attach
/home/jimb/.emacs.d/org-7.5/lisp/org-rmail hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-rmail
/home/jimb/.emacs.d/org-7.5/lisp/ob-latex hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-latex
/home/jimb/.emacs.d/org-7.5/lisp/org-mouse hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mouse
/home/jimb/.emacs.d/org-7.5/lisp/ob-octave hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-octave
/home/jimb/.emacs.d/org-7.5/lisp/ob-comint hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-comint
/home/jimb/.emacs.d/org-7.5/lisp/ob-ref hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-ref
/home/jimb/.emacs.d/org-7.5/lisp/org-special-blocks hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-special-blocks
/home/jimb/.emacs.d/org-7.5/lisp/ob-sql hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-sql
/home/jimb/.emacs.d/org-7.5/lisp/ob-table hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-table
/home/jimb/.emacs.d/org-7.5/lisp/org-mks hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mks
/home/jimb/.emacs.d/org-7.5/lisp/org-plot hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-plot
/home/jimb/.emacs.d/org-7.5/lisp/ob-mscgen hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-mscgen
/home/jimb/.emacs.d/org-7.5/lisp/org-mew hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mew
/home/jimb/.emacs.d/org-7.5/lisp/org-icalendar hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-icalendar
/home/jimb/.emacs.d/org-7.5/lisp/ob-clojure hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-clojure
/home/jimb/.emacs.d/org-7.5/lisp/org-inlinetask hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-inlinetask
/home/jimb/.emacs.d/org-7.5/lisp/ob-dot hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-dot
/home/jimb/.emacs.d/org-7.5/lisp/org-agenda hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-agenda
/home/jimb/.emacs.d/org-7.5/lisp/org-protocol hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-protocol
/home/jimb/.emacs.d/org-7.5/lisp/org-entities hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-entities
/home/jimb/.emacs.d/org-7.5/lisp/ob-asymptote hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-asymptote
/home/jimb/.emacs.d/org-7.5/lisp/ob-sqlite hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-sqlite
/home/jimb/.emacs.d/org-7.5/lisp/org-feed hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-feed
/home/jimb/.emacs.d/org-7.5/lisp/org-ascii hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-ascii
/home/jimb/.emacs.d/org-7.5/lisp/ob-matlab hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-matlab
/home/jimb/.emacs.d/org-7.5/lisp/ob-org hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-org
/home/jimb/.emacs.d/org-7.5/lisp/org-bbdb hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-bbdb
/home/jimb/.emacs.d/org-7.5/lisp/org-xoxo hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-xoxo
/home/jimb/.emacs.d/org-7.5/lisp/org-macs hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-macs
/home/jimb/.emacs.d/org-7.5/lisp/org-mac-message hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-mac-message
/home/jimb/.emacs.d/org-7.5/lisp/ob-ditaa hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-ditaa
/home/jimb/.emacs.d/org-7.5/lisp/org-html hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-html
/home/jimb/.emacs.d/org-7.5/lisp/org-jsinfo hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-jsinfo
/home/jimb/.emacs.d/org-7.5/lisp/ob-sass hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-sass
/home/jimb/.emacs.d/org-7.5/lisp/org-crypt hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/org-crypt
/home/jimb/.emacs.d/org-7.5/lisp/ob-perl hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-perl
/home/jimb/.emacs.d/org-7.5/lisp/ob-plantuml hides
/home/jimb/emacs/share/emacs/24.0.93/lisp/org/ob-plantuml

Features:
(shadow sort gnus-cite mail-extr gnus-msg gnus-art mm-uu mml2015
epg-config mm-view mml-smime smime dig gnus-sum nnoo gnus-group
gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range
gnus-win message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus gnus-ems
nnheader emacsbug gdb-mi help-fns derived bindat json gud easy-mmode
multi-isearch help-mode view tabify man vc-git conf-mode newcomment
gnutls network-stream starttls tls erc-track erc-ring erc-notify
erc-networks erc-netsplit erc-menu easymenu erc-match erc-pcomplete
pcomplete comint ring erc-button erc-fill erc-stamp wid-edit erc-join
erc-goodies erc erc-backend erc-compat format-spec thingatpt pp sendmail
rfc2047 rfc2045 ietf-drums mail-utils patchutils jimb-patch page-ext
server alt-dired-view dired diff-find-mq-file mozilla-c-style
google-c-style cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt
jimb-frames ffap org-install bugzilla url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-util url-parse
auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc
gnus-util password-cache url-vars mm-util mail-prsvr mailcap jimb-js
edmacro kmacro mercurial-queues cl js2-mode-autoloads package reporter
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)