From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90929 invoked by alias); 30 Dec 2018 14:51:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 90918 invoked by uid 89); 30 Dec 2018 14:51:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=green, playing, colored, HContent-Transfer-Encoding:8bit X-HELO: mailsec106.isp.belgacom.be Received: from mailsec106.isp.belgacom.be (HELO mailsec106.isp.belgacom.be) (195.238.20.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 30 Dec 2018 14:51:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1546181486; x=1577717486; h=message-id:subject:from:to:date:mime-version: content-transfer-encoding; bh=vDAHVWMBjA05UbZ6Y2ZhSXaBojz0jHokCv/AKyRj9B8=; b=KiH9iLCY7uhXjyOjLb8G8kqkzFyuh4C8hH//znyD77i2w+bXbbS33cL0 QkXO5ScZKeQEC2ekIay5VFuGlqUkVg==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 30 Dec 2018 15:51:21 +0100 Message-ID: <1546181481.12900.10.camel@skynet.be> Subject: GDB ui word wrapping broken/interferes with 'set style' ? From: Philippe Waroquiers To: gdb-patches@sourceware.org Date: Sun, 30 Dec 2018 14:51:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00435.txt.bz2 Since some days, it looks like the word wrapping of GDB is broken. I have not investigated where it comes from, but it looks related to the 'set style' patch. When setting a breakpoint at cli-out.c:174 in a recent GDB master, this is what I see in emacs/gud-gdb buffer top-gdb (master) to debug itself: (top-gdb) c Continuing. Breakpoint 3, cli_ui_out::do_field_string (this=0x55cb92eaf4     20, fldno=, width=, align=ui_noalign, fldname=, string=0x7ffdadedc6c8 "#0  proc_in_     c", style=ui_out_style_kind     ::FUNCTION) at ../../binutils-gdb/gdb/cli-out.    c:174 (the above is obtained by debugging gdb.ada/info_auto_lang/proc_in_ada, setting a breakpoint in proc_in_c, continue, and then doing backtrace). So, wrapping happens in the middle of words/addresses/filenames/funnames. After using set style enabled off in the top-gdb, no change: word wrapping is still done at strange places. When debugging with GDB 8.2, a similar gud-gdb/top-gdb gives: (top-gdb) c Continuing. Breakpoint 3, cli_ui_out::do_field_string (this=0x55cb92eaf420, fldno=, width=, align=ui_noalign, fldname=, string=0x7ffdadedc6c8 "#0 proc_in_c", style=ui_out_style_kind::FUNCTION) at ../../binutils-gdb/gdb/cli-out.c:174 In a terminal (xfce4-terminal), the layout in a top-gdb (master) is similarly strange: (top-gdb) c Continuing. Breakpoint 3, cli_ui_out::do_field_string (this=0x55 cb92eaf420, fldno=, widt h=, align=ui_noalign, fl dname=, string=0x55cb92f59c d0 "#1 \033[34m0x0000555555555477\033[m in proc_in_ada", style=ui_out_style_kind::FUNCTION) at ../../binu tils-gdb/gdb/cli-out.c:174 174 fstyle = function_name_style.style (); Note that in the above, 'Breakpoint 3, cli_ui_out::do_field_string', this, fldno, widt, h, align, fl, dname, string, style, ../../binu, tils-gdb/gdb/cli-out.c are all colored. In the same terminal, after 'set style enabled off' in the top-gdb, same strange wrapping, but no color anymore. When playing with 'set width', it looks like the wrapping interferes with the coloring: Breakpoint 3, cli_ui_out::do_field_string (this=0x55cb92eaf420, fldno= , width=, align=ui_noalign, f ldname=, string=0x7ffdadedc6c8 "#0 proc_in_c", style [ m=ui_out_style_kind::FUNCTION) at ../../binutils-gdb/gdb/cli-out.c:174 174 fstyle = function_name_style.style (); In the above, there is a new line after style, then a strange character (I think from the color control sequence broken by wrapping), and the blue color used for 'style' continues till and including the 'at', when the filename is colored in green. Philippe