From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Subject: GDB ui word wrapping broken/interferes with 'set style' ?
Date: Sun, 30 Dec 2018 14:51:00 -0000 [thread overview]
Message-ID: <1546181481.12900.10.camel@skynet.be> (raw)
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=<optimized out>, width=<optimiz
    ed out>, align=ui_noalign, fldname=<optim
    ized out>, 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=<optimized out>, width=<optimized out>, align=ui_noalign,
fldname=<optimized out>, 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=<optimized out>, widt
h=<optimized out>, align=ui_noalign, fl
dname=<optimized out>, 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=
<optimized out>, width=<optimized out>, align=ui_noalign, f
ldname=<optimized out>, 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
next reply other threads:[~2018-12-30 14:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-30 14:51 Philippe Waroquiers [this message]
2018-12-30 20:26 ` Tom Tromey
2018-12-30 23:45 ` Tom Tromey
2018-12-31 8:13 ` Philippe Waroquiers
2019-01-06 23:40 ` Tom Tromey
2019-01-07 13:46 ` Philippe Waroquiers
2019-01-07 14:49 ` Tom Tromey
2019-01-07 16:56 ` Philippe Waroquiers
2019-01-12 17:03 ` Tom Tromey
2019-01-12 17:55 ` Philippe Waroquiers
2019-01-12 21:08 ` Philippe Waroquiers
2019-01-14 3:55 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546181481.12900.10.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox