From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57725 invoked by alias); 18 Oct 2017 18:37:00 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 57713 invoked by uid 89); 18 Oct 2017 18:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?Yes, score=7.2 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY1,LIKELY_SPAM_SUBJECT,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=No, n=c3=a3o, flawlessly, N=c3=a3o?= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Oct 2017 18:36:58 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v9IIapvL019530 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 18 Oct 2017 14:36:56 -0400 Received: by simark.ca (Postfix, from userid 112) id DE2B01E540; Wed, 18 Oct 2017 14:36:50 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 73A301E517; Wed, 18 Oct 2017 14:36:40 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 18 Oct 2017 18:37:00 -0000 From: Simon Marchi To: Dedeco Balaco Baco Cc: gdb@sourceware.org Subject: Re: How to debug with gdbtui and utf-8 source files? In-Reply-To: <1311475292.483858.1508348766742@mail.yahoo.com> References: <1311475292.483858.1508348766742.ref@mail.yahoo.com> <1311475292.483858.1508348766742@mail.yahoo.com> Message-ID: <63f3e4a1c9457f68f45e4401d5a1f14e@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 18 Oct 2017 18:36:51 +0000 X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00052.txt.bz2 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