GNU bug report logs - #21572
24.5; Gud gdb doesn't load source files with utf-8 chars in the file name

Previous Next

Package: emacs;

Reported by: Augusto Fraga Giachero <augustofg96 <at> gmail.com>

Date: Sun, 27 Sep 2015 16:16:01 UTC

Severity: normal

Merged with 21940

Found in version 24.5

Fixed in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Augusto Fraga <augustofg96 <at> gmail.com>
To: 21572 <at> debbugs.gnu.org
Subject: bug#21572: Fwd: bug#21572: 24.5; Gud gdb doesn't load source files with utf-8 chars in the file name
Date: Wed, 30 Sep 2015 21:37:33 -0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Date: Wed, 30 Sep 2015 20:52:24 +0300
>
> Actually, it's not very simple.  GDB outputs octal escapes in every
> string, not just in file names, so decoding should be done on a very
> low level, where we don't yet know what is a file name and what is
> some other string (like a value of some string variable).

The only string that needs to be converted back to UTF-8 is the
sources file names string (couldn't it be done by hacking the
gdb-get-source-file-list function?).

> We can decode that if we assume that all the strings output by GDB are
> encoded the same (in your case, probably UTF-8), and keeping fingers
> crossed that the communications channel between GBD and Emacs never
> breaks the 3-digit sequence due to buffering issues.

I think that would be a nice option if gdb had a flag to disable these
octal sequences for the mi protocol. It would make everything easier.

> I have a prototype fix along the above-mentioned lines which I will
> commit soon, unless someone has a better idea.  You could then patch
> your gdb-mi.el and use it with those source files.

Nice! I'll try it out when you commit.

> Alternatively, you can invoke GDB via "M-x gud-gdb RET", which doesn't
> have this problem in the first place.

Well, but I wouldn't have a good source debugging interface. In fact
the "M-x gdb RET" doesn't fails, it only doesn't load the buffer for
the source code (it behaves like standard gdb without tui).

Thank you!




This bug report was last modified 9 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.