From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44173@debbugs.gnu.org
Subject: bug#44173: 28.0.50; gdb-mi mangles strings with octal escapes
Date: Sat, 31 Oct 2020 14:57:01 +0100 [thread overview]
Message-ID: <F0CBB1B3-1291-4AAE-BBB8-EFCCB8F5E0C4@acm.org> (raw)
In-Reply-To: <83wnz6hkin.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
31 okt. 2020 kl. 09.22 skrev Eli Zaretskii <eliz@gnu.org>:
> Yes, thanks.
Thank you, pushed.
The attached patch changes the default value of gdb-mi-decode-strings from nil to t.
I think we agree that it's probably a good idea, but leave the patch here in case there are comments on the documentation.
[-- Attachment #2: 0001-Change-the-default-value-of-gdb-mi-decode-strings-to.patch --]
[-- Type: application/octet-stream, Size: 2950 bytes --]
From 0b94246450d524a748dba28aefc2611c53ddf30c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Sat, 31 Oct 2020 14:44:58 +0100
Subject: [PATCH] Change the default value of gdb-mi-decode-strings to t
(bug#44173)
This is likely to be a more commonly wanted default value today.
* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Change default.
* doc/emacs/building.texi (Source Buffers): Update manual.
* etc/NEWS: Announce.
---
doc/emacs/building.texi | 13 ++++++-------
etc/NEWS | 5 +++++
lisp/progmodes/gdb-mi.el | 2 +-
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 3e09f24322..23e22f46fb 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1092,13 +1092,12 @@ Source Buffers
more detail.
@vindex gdb-mi-decode-strings
- If the file names of the source files are shown with octal escapes,
-set the variable @code{gdb-mi-decode-strings} to the appropriate
-coding-system, most probably @code{utf-8}. (This is @code{nil} by
-default because GDB may emit octal escapes in situations where
-decoding is undesirable, and also because the program being debugged
-might use an encoding different from the one used to encode non-ASCII
-file names on your system.)
+ By default, source file names and non-ASCII strings in the program
+being debugged are decoded using the default coding-system. If you
+prefer a different decoding, perhaps because the program being
+debugged uses a different encoding, set the variable
+@code{gdb-mi-decode-strings} to the appropriate coding-system, or to
+@code{nil} to leave such characters as undecoded octal escapes.
@node Breakpoints Buffer
@subsubsection Breakpoints Buffer
diff --git a/etc/NEWS b/etc/NEWS
index a52122bcea..23b4deddf8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -806,6 +806,11 @@ Now GDB only uses one source window to display source file by default.
Customize 'gdb-max-source-window-count' to use more than one window.
Control source file display by 'gdb-display-source-buffer-action'.
++++
+*** The default value of gdb-mi-decode-strings is now t.
+This means that the default coding-system is now used to decode strings
+and source file names from GDB.
+
** Gravatar
---
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 4bebf88d35..6e9b6830a0 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2455,7 +2455,7 @@ gdbmi-bnf-incomplete-record-result
;; files, values of string variables in the inferior, etc., are all
;; encoded in the same encoding.
-(defcustom gdb-mi-decode-strings nil
+(defcustom gdb-mi-decode-strings t
"When non-nil, decode octal escapes in GDB output into non-ASCII text.
If the value is a coding-system, use that coding-system to decode
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2020-10-31 13:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 11:50 bug#44173: 28.0.50; gdb-mi mangles strings with octal escapes Mattias Engdegård
2020-10-23 12:01 ` Eli Zaretskii
2020-10-23 12:41 ` Mattias Engdegård
2020-10-23 13:19 ` Eli Zaretskii
2020-10-23 14:21 ` Mattias Engdegård
2020-10-23 14:44 ` Eli Zaretskii
2020-10-23 17:31 ` Mattias Engdegård
2020-10-23 18:20 ` Eli Zaretskii
2020-10-24 16:21 ` Mattias Engdegård
2020-10-24 17:23 ` Eli Zaretskii
2020-10-24 18:27 ` Mattias Engdegård
2020-10-24 18:44 ` Eli Zaretskii
2020-10-24 19:41 ` Mattias Engdegård
2020-10-27 18:16 ` Mattias Engdegård
2020-10-31 8:22 ` Eli Zaretskii
2020-10-31 13:57 ` Mattias Engdegård [this message]
2020-11-06 13:01 ` Mattias Engdegård
2020-10-25 12:47 ` Mattias Engdegård
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=F0CBB1B3-1291-4AAE-BBB8-EFCCB8F5E0C4@acm.org \
--to=mattiase@acm.org \
--cc=44173@debbugs.gnu.org \
--cc=eliz@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.