* How to debug with gdbtui and utf-8 source files?
[not found] <1311475292.483858.1508348766742.ref@mail.yahoo.com>
@ 2017-10-18 17:50 ` Dedeco Balaco Baco via gdb
2017-10-18 18:37 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Dedeco Balaco Baco via gdb @ 2017-10-18 17:50 UTC (permalink / raw)
To: gdb
I have:
- a terminal set to UTF-8 in an OS where UTF-8 locales are installed: Mate Terminal 1.12.1 (does not matter, as long as its character encoding is utf-8)
- a C source file which contains (both) utf-8 comments and utf-8 strings
- gdbtui:
$ gdbtui --version
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
The program compiles and works flawlessly, with its output being correctly shown in the terminal.
gdbtui, on the other hand, does not show the comments correctly, making them hard to read and also braking the size and making a few lines occupy two screenlines. This makes strange things happen when we step-by-step through these lines.
For example, instead of showing:
"// Não temos nenhum nó, garante não ter um falso ponteiro"
in the source window, gdbtui shows:
"// NM-CM-#o temos nenhum nM-CM-3, garante nM-CM-#o ter um falso ponteiro"
The environment is correctly set:
$ set | grep -e 'LANG|LC_ALL'
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR.UTF-8:en_GB:en
LC_ALL=pt_BR.UTF-8
How can I make gdbtui work correctly? If no answer exist for this question, I may help filling a bug report about it. I will need a bit of help with that, please offer, if that is possible.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to debug with gdbtui and utf-8 source files?
2017-10-18 17:50 ` How to debug with gdbtui and utf-8 source files? Dedeco Balaco Baco via gdb
@ 2017-10-18 18:37 ` Simon Marchi
2017-10-19 2:22 ` Dedeco Balaco via gdb
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2017-10-18 18:37 UTC (permalink / raw)
To: Dedeco Balaco Baco; +Cc: gdb
On 2017-10-18 13:46, Dedeco Balaco Baco via gdb wrote:
> I have:
>
> - a terminal set to UTF-8 in an OS where UTF-8 locales are installed:
> Mate Terminal 1.12.1 (does not matter, as long as its character
> encoding is utf-8)
>
> - a C source file which contains (both) utf-8 comments and utf-8
> strings
>
> - gdbtui:
>
> $ gdbtui --version
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
>
> The program compiles and works flawlessly, with its output being
> correctly shown in the terminal.
>
> gdbtui, on the other hand, does not show the comments correctly,
> making them hard to read and also braking the size and making a few
> lines occupy two screenlines. This makes strange things happen when we
> step-by-step through these lines.
>
> For example, instead of showing:
>
> "// Não temos nenhum nó, garante não ter um falso ponteiro"
>
> in the source window, gdbtui shows:
>
> "// NM-CM-#o temos nenhum nM-CM-3, garante nM-CM-#o ter um falso
> ponteiro"
>
> The environment is correctly set:
>
> $ set | grep -e 'LANG|LC_ALL'
> LANG=pt_BR.UTF-8
> LANGUAGE=pt_BR.UTF-8:en_GB:en
> LC_ALL=pt_BR.UTF-8
>
> How can I make gdbtui work correctly? If no answer exist for this
> question, I may help filling a bug report about it. I will need a bit
> of help with that, please offer, if that is possible.
As discussed on IRC, this was likely fixed with this commit
Allow linking GDB with ncursesw
5007d765ae09c10c7f3b18bb16841b9d2d59e181
https://sourceware.org/ml/gdb-patches/2017-09/msg00356.html
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to debug with gdbtui and utf-8 source files?
2017-10-18 18:37 ` Simon Marchi
@ 2017-10-19 2:22 ` Dedeco Balaco via gdb
0 siblings, 0 replies; 3+ messages in thread
From: Dedeco Balaco via gdb @ 2017-10-19 2:22 UTC (permalink / raw)
Cc: gdb
Em 18-10-2017 16:36, Simon Marchi escreveu:
> On 2017-10-18 13:46, Dedeco Balaco Baco via gdb wrote:
>> I have:
>>
>> - a terminal set to UTF-8 in an OS where UTF-8 locales are installed:
>> Mate Terminal 1.12.1 (does not matter, as long as its character
>> encoding is utf-8)
>>
>> - a C source file which contains (both) utf-8 comments and utf-8 strings
>>
>> - gdbtui:
>>
>> $ gdbtui --version
>> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
>>
>> The program compiles and works flawlessly, with its output being
>> correctly shown in the terminal.
>>
>> gdbtui, on the other hand, does not show the comments correctly,
>> making them hard to read and also braking the size and making a few
>> lines occupy two screenlines. This makes strange things happen when we
>> step-by-step through these lines.
>>
>> For example, instead of showing:
>>
>> "// Não temos nenhum nó, garante não ter um falso ponteiro"
>>
>> in the source window, gdbtui shows:
>>
>> "// NM-CM-#o temos nenhum nM-CM-3, garante nM-CM-#o ter um falso
>> ponteiro"
>>
>> The environment is correctly set:
>>
>> $ set | grep -e 'LANG|LC_ALL'
>> LANG=pt_BR.UTF-8
>> LANGUAGE=pt_BR.UTF-8:en_GB:en
>> LC_ALL=pt_BR.UTF-8
>>
>> How can I make gdbtui work correctly? If no answer exist for this
>> question, I may help filling a bug report about it. I will need a bit
>> of help with that, please offer, if that is possible.
>
> As discussed on IRC, this was likely fixed with this commit
>
> Allow linking GDB with ncursesw
> 5007d765ae09c10c7f3b18bb16841b9d2d59e181
> https://sourceware.org/ml/gdb-patches/2017-09/msg00356.html
>
Ok, I will try that and report in this thread if it worked or not.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-19 2:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1311475292.483858.1508348766742.ref@mail.yahoo.com>
2017-10-18 17:50 ` How to debug with gdbtui and utf-8 source files? Dedeco Balaco Baco via gdb
2017-10-18 18:37 ` Simon Marchi
2017-10-19 2:22 ` Dedeco Balaco via gdb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox