public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/26786] New: Gdb styles render garbage on terminal if it is not ANSI-like
@ 2020-10-24 13:33 martin at NetBSD dot org
2020-11-01 16:25 ` [Bug gdb/26786] " tromey at sourceware dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: martin at NetBSD dot org @ 2020-10-24 13:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26786
Bug ID: 26786
Summary: Gdb styles render garbage on terminal if it is not
ANSI-like
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: martin at NetBSD dot org
Target Milestone: ---
Gdb does the fancy visual styles - but it does not even try to check if the
$TERM in use does support the color changing escape sequences.
It is easy to disable the styles with:
set style enabled off
in ~/.gdbinit - but it should not be necessary, as the terminal capabilities
can should be checked before enabling them by default.
Worse: even if disabled, some messages still use the broken escape sequences
and render garbage on the screen:
00000000 5b 2f 74 6d 70 5d 20 6d 61 72 74 69 6e 40 6d 61 |[/tmp] martin@ma|
00000010 72 74 69 6e 73 20 3e 20 67 64 62 0d 0d 0a 1b 5b |rtins > gdb....[|
00000020 33 35 3b 31 6d 1b 5b 33 35 3b 31 6d 47 4e 55 20 |35;1m.[35;1mGNU |
00000030 67 64 62 20 1b 5b 6d 1b 5b 33 35 3b 31 6d 28 47 |gdb .[m.[35;1m(G|
00000040 44 42 29 20 1b 5b 6d 1b 5b 33 35 3b 31 6d 31 31 |DB) .[m.[35;1m11|
00000050 2e 30 2e 35 30 2e 32 30 32 30 30 39 31 34 2d 67 |.0.50.20200914-g|
00000060 69 74 1b 5b 6d 1b 5b 33 35 3b 31 6d 0d 0a 1b 5b |it.[m.[35;1m...[|
00000070 6d 1b 5b 6d 43 6f 70 79 72 69 67 68 74 20 28 43 |m.[mCopyright (C|
Another issue with the styles is that the defaults are unusable (or at least
very hard to read) on terminals with dark backgrounds, but I'm not sure that
would be easy to auto-detect.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/26786] Gdb styles render garbage on terminal if it is not ANSI-like
2020-10-24 13:33 [Bug gdb/26786] New: Gdb styles render garbage on terminal if it is not ANSI-like martin at NetBSD dot org
@ 2020-11-01 16:25 ` tromey at sourceware dot org
2020-11-01 16:39 ` martin at NetBSD dot org
2020-11-18 16:47 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2020-11-01 16:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26786
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-11-01
CC| |tromey at sourceware dot org
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Confirmed. Curious what terminal you use.
FWIW I use a dark background and the colors seem ok to me.
There was a bug in GNU source highlight where the function
names would be black, but this problem was fixed there.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/26786] Gdb styles render garbage on terminal if it is not ANSI-like
2020-10-24 13:33 [Bug gdb/26786] New: Gdb styles render garbage on terminal if it is not ANSI-like martin at NetBSD dot org
2020-11-01 16:25 ` [Bug gdb/26786] " tromey at sourceware dot org
@ 2020-11-01 16:39 ` martin at NetBSD dot org
2020-11-18 16:47 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: martin at NetBSD dot org @ 2020-11-01 16:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26786
--- Comment #2 from Martin Husemann <martin at NetBSD dot org> ---
term type: usualy urxvt (where the ansi colors work), but sometimes (ancient)
sun consoles (where they don't).
The colors "work" but eg. in:
Breakpoint 1 at 0x4b0a: file test.c, line 48.
the 0x4b0a is printed in dark blue, which is (for me, maybe age + eyes +
whathaveyou) barely readable on black background.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/26786] Gdb styles render garbage on terminal if it is not ANSI-like
2020-10-24 13:33 [Bug gdb/26786] New: Gdb styles render garbage on terminal if it is not ANSI-like martin at NetBSD dot org
2020-11-01 16:25 ` [Bug gdb/26786] " tromey at sourceware dot org
2020-11-01 16:39 ` martin at NetBSD dot org
@ 2020-11-18 16:47 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2020-11-18 16:47 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26786
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Figuring out if a terminal is ANSI-capable is surprisingly difficult.
Also maybe gdb ought to support NO_COLOR: https://no-color.org/
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-18 16:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24 13:33 [Bug gdb/26786] New: Gdb styles render garbage on terminal if it is not ANSI-like martin at NetBSD dot org
2020-11-01 16:25 ` [Bug gdb/26786] " tromey at sourceware dot org
2020-11-01 16:39 ` martin at NetBSD dot org
2020-11-18 16:47 ` tromey at sourceware dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).