Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* GDB ui word wrapping broken/interferes with 'set style'  ?
@ 2018-12-30 14:51 Philippe Waroquiers
  2018-12-30 20:26 ` Tom Tromey
  0 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-30 14:51 UTC (permalink / raw)
  To: gdb-patches

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



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

end of thread, other threads:[~2019-01-14  3:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30 14:51 GDB ui word wrapping broken/interferes with 'set style' ? Philippe Waroquiers
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox