all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <rcopley@gmail.com>
To: 14127@debbugs.gnu.org
Subject: bug#14127: 24.3.50; gdb-mode error when formatting error message containing "%"
Date: Tue, 2 Apr 2013 23:29:10 +0000	[thread overview]
Message-ID: <515b6d0a.e724b40a.5985.ffffca0d@mx.google.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2494 bytes --]

In gdb interaction mode, in situations where entering “p %rdx” should print “A syntax error in expression, near `%rdx'”, instead, it signals an error “Not enough arguments for format string”. Part of a user-entered string is used as a format string in the call to `message’. See attached for a fix.


In GNU Emacs 24.3.50.1 (i386-mingw-nt6.2.9200)
 of 2013-03-28 on MACHINE
Bzr revision: 112162 yamaoka@jpl.org-20130327221236-v7x05yocnh6vsqel
Windowing system distributor `Microsoft Corp.', version 6.2.9200
Configured using:
 `configure --with-gcc (4.7) --cflags -I c:/gnuwin32/include --ldflags
 -L c:/gnuwin32/lib'

 

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

 

Major mode: Emacs-Lisp

 

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-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:
C-x C-f g : / e m a c s / t r u n k / l i s p / p r 
o g m o d e s / g d b - m i . e l <return> M-g M-g 
2 4 1 2 <return> M-x r e p o r t - e m a c s - b u g <return>

 

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

 

Load-path shadows:
None found.

 

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils vc-bzr time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns
disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment 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 button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process w32notify w32 multi-tty emacs)

[-- Attachment #1.2: Type: text/html, Size: 3884 bytes --]

[-- Attachment #2: gdb-mi-message-format.patch --]
[-- Type: application/octet-stream, Size: 892 bytes --]

=== modified file 'lisp/progmodes/gdb-mi.el'
*** lisp/progmodes/gdb-mi.el	2013-03-11 17:13:39 +0000
--- lisp/progmodes/gdb-mi.el	2013-04-02 23:24:43 +0000
***************
*** 2409,2415 ****
  	;; MI error - send to minibuffer
  	(when (eq type 'error)
            ;; Skip "msg=" from `output-field'
!           (message (read (substring output-field 4)))
            ;; Don't send to the console twice.  (If it is a console error
            ;; it is also in the console stream.)
            (setq output-field nil)))
--- 2409,2415 ----
  	;; MI error - send to minibuffer
  	(when (eq type 'error)
            ;; Skip "msg=" from `output-field'
!           (message "%s" (read (substring output-field 4)))
            ;; Don't send to the console twice.  (If it is a console error
            ;; it is also in the console stream.)
            (setq output-field nil)))


             reply	other threads:[~2013-04-02 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 23:29 rcopley [this message]
2013-07-18 16:56 ` bug#14127: 24.3.50; gdb-mode error when formatting error message containing "%" Glenn Morris

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=515b6d0a.e724b40a.5985.ffffca0d@mx.google.com \
    --to=rcopley@gmail.com \
    --cc=14127@debbugs.gnu.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.