Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB/MI reporting non-ASCII file names
@ 2015-09-29  9:18 Eli Zaretskii
  2015-09-30 11:52 ` Pedro Alves
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2015-09-29  9:18 UTC (permalink / raw)
  To: gdb

It seems that "gdb -i=mi" reports non-ASCII characters in filenames as
octal escapes.  Here's an example from a GNU/Linux system whose
locale's codeset is UTF-8:

  (gdb)
  -file-list-exec-source-file
  ^done,line="1",file="/home/e/eliz/\320\277\321\200\320\276\320\262\320\265\321\200\320\272\320\260.c",fullname="/srv/data/home/e/eliz/\320\277\321\200\320\276\320\262\320\265\321\200\320\272\320\260.c",macro-info="1"

Each of these \nnn is a string of literal ASCII characters, not a
single byte whose octal value is nnn.  Why does MI do this?  Where in
GDB do we convert bytes into this representation, and is there any way
of asking MI not to make these conversions?

The reason for these questions is that Emacs's GDB interface fails to
recognize the original file name that hides behind these escapes, and
the result is that debugging a program whose source file names include
non-ASCII characters fails to display the source files through which
GDB steps.

It is, of course, possible to decode these escapes on Emacs's side.
But since many MI output records include file-name fields, doing so
everywhere is quite a PITA.  So if there's a way to avoid the need for
decoding in the first place, it's preferable.

TIA


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-09 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29  9:18 GDB/MI reporting non-ASCII file names Eli Zaretskii
2015-09-30 11:52 ` Pedro Alves
2015-09-30 14:34   ` Eli Zaretskii
2015-09-30 14:49     ` Pedro Alves
2015-09-30 15:52       ` Eli Zaretskii
2015-10-09 11:12         ` Pedro Alves
2015-10-09 13:31           ` Eli Zaretskii
2015-10-09 16:48             ` Pedro Alves
2015-10-09 17:11               ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox