From 1b9e159525409d6a1ad41686c34f66aa2effa71e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= 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 3e09f243226..91c749aa2d5 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1092,13 +1092,12 @@ code that has already executed, in order to examine its execution in 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 character encoding, set the variable +@code{gdb-mi-decode-strings} to the appropriate coding-system, or to +@code{nil} to leave non-ASCII characters as undecoded octal escapes. @node Breakpoints Buffer @subsubsection Breakpoints Buffer diff --git a/etc/NEWS b/etc/NEWS index 06a2864b7e3..8b5acafe319 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -855,6 +855,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 4bebf88d356..6e9b6830a01 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2455,7 +2455,7 @@ the end of the current result or async record is reached." ;; 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.39.2