From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: GDB/MI reporting non-ASCII file names
Date: Wed, 30 Sep 2015 15:52:00 -0000 [thread overview]
Message-ID: <83a8s3c3c3.fsf@gnu.org> (raw)
In-Reply-To: <560BF686.1030400@redhat.com>
> Date: Wed, 30 Sep 2015 15:49:42 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: gdb@sourceware.org
>
> >> https://sourceware.org/ml/gdb/2010-08/msg00129.html
> >
> > Thanks. So it's hard-wired in MI, and the grammar requires that. Too
> > bad.
>
> We can always extend it. Maybe we just need to document that ascii is
> the default, and that frontends should
> issue -gdb-set print sevenbit-strings off if they want non-ascii?
> Seems like Eclipse ended up doing that.
But "-gdb-set print sevenbit-strings off" doesn't seem to work: I get
spurious "\200" strings which disrupt the whole sequence. I thought
that was because 7-bit strings were a requirement in MI, for some
reason.
But now I think the culprit is this part of printchar:
if (c < 0x20 ||
(c >= 0x7F && c < 0xA0) || <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
(sevenbit_strings && c >= 0x80))
This produces octal escapes for characters in 0x7F..0x8F regardless of
the value of sevenbit_strings, which does the wrong thing with
non-leading bytes of UTF-8 sequences.
If you compile a program from a source file whose name includes
non-ASCII characters, then debug that program with -i=mi, do you see
the file names correctly, after turning 7 bits off?
Btw, I see valid non-ASCII file names when I use CLI and the
annotations instead. So does this mean we don't use printchar for
emitting file names in that case?
next prev parent reply other threads:[~2015-09-30 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 9:18 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 [this message]
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
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=83a8s3c3c3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=palves@redhat.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox