Variable: gdb-mi-decode-strings

gdb-mi-decode-strings is a customizable variable defined in gdb-mi.el.gz.

Value

t

Documentation

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 the bytes reconstructed from octal escapes. Any other non-nil value means to decode using the coding-system set for the GDB process.

This variable was added, or its default value changed, in Emacs 25.1.

View in manual

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
; The following grammar rules are not parsed directly by this GDBMI-BNF parser.
; The handling of those rules is currently done by the handlers registered
; in gdbmi-bnf-result-state-configs
;
; result ==>
;      variable "=" value
;
; variable ==>
;      string
;
; value ==>
;      const | tuple | list
;
; const ==>
;      c-string
;
; tuple ==>
;      "{}" | "{" result ( "," result )* "}"
;
; list ==>
;      "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"

;; FIXME: This is fragile: it relies on the assumption that all the
;; non-ASCII strings output by GDB, including names of the source
;; files, values of string variables in the inferior, etc., are all
;; encoded in the same encoding.

(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
the bytes reconstructed from octal escapes.  Any other non-nil value
means to decode using the coding-system set for the GDB process."
  :type '(choice
          (const :tag "Don't decode" nil)
          (const :tag "Decode using default coding-system" t)
          (coding-system :tag "Decode using this coding-system"))
  :group 'gdb
  :version "25.1")