public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Can gdb display the source code lines with comments in other  languages?
@ 2010-05-23 16:52 Yongtao Yang
  2010-05-24  2:28 ` Hui Zhu
  0 siblings, 1 reply; 3+ messages in thread
From: Yongtao Yang @ 2010-05-23 16:52 UTC (permalink / raw)
  To: gdb

Can gdb display the source code lines correctly with comments in other
languages, such as Chinese?

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

* Re: Can gdb display the source code lines with comments in other  languages?
  2010-05-23 16:52 Can gdb display the source code lines with comments in other languages? Yongtao Yang
@ 2010-05-24  2:28 ` Hui Zhu
       [not found]   ` <AANLkTimP5I5dcTTTzMvv8Yu1Q_au7k6Fr0TcO2zkPt_d@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Hui Zhu @ 2010-05-24  2:28 UTC (permalink / raw)
  To: Yongtao Yang; +Cc: gdb

On Mon, May 24, 2010 at 00:51, Yongtao Yang <yongtao.y@gmail.com> wrote:
>
> Can gdb display the source code lines correctly with comments in other
> languages, such as Chinese?

gdb ./a.out
GNU gdb (GDB) 7.1.50.20100524-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/teawater/gdb/a.out...done.
(gdb) start
Temporary breakpoint 1 at 0x8048428: file 1.c, line 21.
Starting program: /home/teawater/gdb/a.out

Temporary breakpoint 1, main (argc=1, argv=0xbffff5a4,
envp=0xbffff5ac) at 1.c:21
21		if (argc < 2) /* 为什么不支持? */

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

* Re: Can gdb display the source code lines with comments in other  languages?
       [not found]   ` <AANLkTimP5I5dcTTTzMvv8Yu1Q_au7k6Fr0TcO2zkPt_d@mail.gmail.com>
@ 2010-05-25  3:26     ` Hui Zhu
  0 siblings, 0 replies; 3+ messages in thread
From: Hui Zhu @ 2010-05-25  3:26 UTC (permalink / raw)
  To: Yongtao Yang, gdb

On Mon, May 24, 2010 at 20:33, Yongtao Yang <yongtao.y@gmail.com> wrote:
> I think the encoding of your source file is UTF-8. I have tested that
> gdb do support the UTF-8 encoded chinese characters, but it can't
> display the chinese characters correctly in a GB2132 encoded source
> file (e.g., source files edited by notepad.exe under windows). How to
> configure gdb to support GB2132?

I think this because you terminal didn't set to decode GB2132.

You can try cat youcode.c
If this comments cannot be display too.  That is the reason.

You can set your terminal to decode GB2132.



GNU gdb (GDB) 7.1.50.20100524-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/teawater/gdb/a.out...done.
(gdb) start
Temporary breakpoint 1 at 0x8048428: file 1.c, line 21.
Starting program: /home/teawater/gdb/a.out

Temporary breakpoint 1, main (argc=1, argv=0xbffff5a4,
envp=0xbffff5ac) at 1.c:21
21		if (argc < 2) /* 改了中端设置 什么都能显示 */


Thanks,
Hui


>
> On Mon, May 24, 2010 at 10:27 AM, Hui Zhu <teawater@gmail.com> wrote:
>> On Mon, May 24, 2010 at 00:51, Yongtao Yang <yongtao.y@gmail.com> wrote:
>>>
>>> Can gdb display the source code lines correctly with comments in other
>>> languages, such as Chinese?
>>
>> gdb ./a.out
>> GNU gdb (GDB) 7.1.50.20100524-cvs
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "i686-pc-linux-gnu".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>...
>> Reading symbols from /home/teawater/gdb/a.out...done.
>> (gdb) start
>> Temporary breakpoint 1 at 0x8048428: file 1.c, line 21.
>> Starting program: /home/teawater/gdb/a.out
>>
>> Temporary breakpoint 1, main (argc=1, argv=0xbffff5a4,
>> envp=0xbffff5ac) at 1.c:21
>> 21              if (argc < 2) /* 为什么不支持? */
>>
>

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

end of thread, other threads:[~2010-05-25  3:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-23 16:52 Can gdb display the source code lines with comments in other languages? Yongtao Yang
2010-05-24  2:28 ` Hui Zhu
     [not found]   ` <AANLkTimP5I5dcTTTzMvv8Yu1Q_au7k6Fr0TcO2zkPt_d@mail.gmail.com>
2010-05-25  3:26     ` Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).