all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Augusto Fraga <augustofg96@gmail.com>
To: 21572@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	[thread overview]
Message-ID: <CAD1u=nMhGtGRRcwbmEKiRJFt9Vr=3LgfoQfN7LsdiNSF9ecJeQ@mail.gmail.com> (raw)
In-Reply-To: <CAD1u=nOrGAjZ8Qpr2bt09h5PR-B_Wht_P7EUJdEdvDuXmtrR+Q@mail.gmail.com>

> 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!





  parent reply	other threads:[~2015-10-01  0:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 15:26 bug#21572: 24.5; Gud gdb doesn't load source files with utf-8 chars in the file name Augusto Fraga Giachero
2015-09-30 17:52 ` Eli Zaretskii
     [not found]   ` <CAD1u=nOrGAjZ8Qpr2bt09h5PR-B_Wht_P7EUJdEdvDuXmtrR+Q@mail.gmail.com>
2015-10-01  0:37     ` Augusto Fraga [this message]
2015-10-01 12:14       ` bug#21572: Fwd: " Eli Zaretskii
2015-10-01 13:00         ` Augusto Fraga Giachero
2015-10-01 11:53   ` Eli Zaretskii

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='CAD1u=nMhGtGRRcwbmEKiRJFt9Vr=3LgfoQfN7LsdiNSF9ecJeQ@mail.gmail.com' \
    --to=augustofg96@gmail.com \
    --cc=21572@debbugs.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.