This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB/MI reporting non-ASCII file names
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb at sourceware dot org
- Date: Fri, 09 Oct 2015 12:11:57 +0100
- Subject: Re: GDB/MI reporting non-ASCII file names
- Authentication-results: sourceware.org; auth=none
- References: <83a8s5d1nw dot fsf at gnu dot org> <560BCCF9 dot 2040202 at redhat dot com> <83bnckasck dot fsf at gnu dot org> <560BF686 dot 1030400 at redhat dot com> <83a8s3c3c3 dot fsf at gnu dot org>
Hi Eli,
Sorry for the delay.
On 09/30/2015 04:51 PM, Eli Zaretskii wrote:
> 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?
>
Looks like I see the same as you. With a file named "ÃÃÃ.c":
(gdb)
set print sevenbit-strings on
&"set print sevenbit-strings on\n"
=cmd-param-changed,param="print sevenbit-strings",value="on"
^done
(gdb) start
...
*stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={addr="0x00000000004004fb",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd838"}],file="\303\247\303\252\303\241.c",fullname="/home/pedro/gdb/tests/\303\247\303\252\303\241.c",line="5"},thread-id="1",stopped-threads="all",core="2"
(gdb)
(gdb)
set print sevenbit-strings off
&"set print sevenbit-strings off\n"
=cmd-param-changed,param="print sevenbit-strings",value="off"
^done
(gdb) start
...
*stopped,reason="breakpoint-hit",disp="del",bkptno="3",frame={addr="0x00000000004004fb",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd838"}],file="ÃÃÃ.c",fullname="/home/pedro/gdb/tests/ÃÃÃ.c",line="5"},thread-id="1",stopped-threads="all",core="2"
But with a file named "ÎÎÏÏÏÎ.c" + "set print sevenbit-strings off":
*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x00000000004004fb",func="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffd808"}],file="ÎÎï\216ï\203ï\203Î.c",fullname="/home/pedro/gdb/tests/ÎÎï\216ï\203ï\203Î.c",line="5"},thread-id="1",stopped-threads="all",core="3"
=breakpoint-deleted,id="1"
(gdb)
> 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?
>
I don't know.
Thanks,
Pedro Alves