* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
@ 2023-03-18 8:18 ` czgf2v at 163 dot com
2023-03-18 8:18 ` czgf2v at 163 dot com
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-18 8:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #1 from czgf2v <czgf2v at 163 dot com> ---
Created attachment 14757
--> https://sourceware.org/bugzilla/attachment.cgi?id=14757&action=edit
colors.gdb
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
2023-03-18 8:18 ` [Bug gdb/30242] " czgf2v at 163 dot com
@ 2023-03-18 8:18 ` czgf2v at 163 dot com
2023-03-18 8:19 ` czgf2v at 163 dot com
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-18 8:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #2 from czgf2v <czgf2v at 163 dot com> ---
Created attachment 14758
--> https://sourceware.org/bugzilla/attachment.cgi?id=14758&action=edit
colors.gdb
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
2023-03-18 8:18 ` [Bug gdb/30242] " czgf2v at 163 dot com
2023-03-18 8:18 ` czgf2v at 163 dot com
@ 2023-03-18 8:19 ` czgf2v at 163 dot com
2023-03-18 15:11 ` tromey at sourceware dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-18 8:19 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
czgf2v <czgf2v at 163 dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #14757|colors.gdb |colors.gdb accidentally
description| |duplicate;ignore this
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (2 preceding siblings ...)
2023-03-18 8:19 ` czgf2v at 163 dot com
@ 2023-03-18 15:11 ` tromey at sourceware dot org
2023-03-18 16:07 ` czgf2v at 163 dot com
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tromey at sourceware dot org @ 2023-03-18 15:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2023-03-18
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Could you say succinctly what you think is going wrong?
I don't understand what you expect to see and how it differs
from what you do see.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (3 preceding siblings ...)
2023-03-18 15:11 ` tromey at sourceware dot org
@ 2023-03-18 16:07 ` czgf2v at 163 dot com
2023-03-18 16:29 ` czgf2v at 163 dot com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-18 16:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #4 from czgf2v <czgf2v at 163 dot com> ---
sorry for so detailed information(originally for the purpose that you can
reproduce the bug so I give a lot information)
In a summary, the problem is that one shell command fails in gdb `shell cat
~/.gdb-color-pipe | sed ...`
and I wish that it can get the info indeed located in `~/.gdb-color-pipe` and
emit it in terminal.
However it fails in gdb but succeeds outside in a new tty without modifying the
file before launching a new tty.
additional information fotgot to send: bash version(which may help you to
reproduce)
```bash
$ bash --version
bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
...
```
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (4 preceding siblings ...)
2023-03-18 16:07 ` czgf2v at 163 dot com
@ 2023-03-18 16:29 ` czgf2v at 163 dot com
2023-03-20 11:11 ` czgf2v at 163 dot com
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-18 16:29 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #5 from czgf2v <czgf2v at 163 dot com> ---
more explicitly, I wish the output in gdb
```bash
(gdb) set trace-commands off
+set trace-commands off
(gdb) bt
#0 main (argc=1, argv=0x7fffffffd888) at basic.c:8
#0 main (argc=1, argv=0x7fffffffd888) at basic.c:8
(gdb) thread
[Current thread is 1 (Thread 0x7ffff7d58740 (LWP 5608))]
[Current thread is 1 (Thread 0x7ffff7d58740 (LWP 5608))] """""" I wish to
output this syntax highlighted line
(gdb)
```
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (5 preceding siblings ...)
2023-03-18 16:29 ` czgf2v at 163 dot com
@ 2023-03-20 11:11 ` czgf2v at 163 dot com
2023-03-20 15:32 ` czgf2v at 163 dot com
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-20 11:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #6 from czgf2v <czgf2v at 163 dot com> ---
I tried building gdb from source
---------------------------
$ git clone git://sourceware.org/git/binutils-gdb.git
$ sudo apt install -y texinfo bison flex
# inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1526617#c5
$ cd binutils-gdb/;./configure --disable-binutils --disable-ld --disable-gold
--disable-gas --disable-sim --disable-gprof;make;make install
# the version may be same with daily build of ubuntu-support-team ppa version
code because both has '14.0.50'
$ /usr/local/bin/gdb --version
GNU gdb (GDB) 14.0.50.20230320-git
---------------------------
then if I directly pass command when invoking gdb, 'shell cat
~/.gdb-color-pipe' with 'thread‘ command emit syntax highlighted line, the bug
temporarily disappeared. But then type 'thread', the info still fails to emit.
---------------------------
$ gcc -gdwarf-5 -g3 -ggdb3 basic.c -o basic;/usr/bin/gdb -q -nx -nh ./basic -ex
'source ./colors_RAttab_test.gdb' -ex "br 11" -ex "start" -ex "backtrace" -ex
"thread"
....
+++shell cat ~/.gdb-color-pipe | sed -r
"s_([^<])(\b([a-zA-Z0-9_]+::)?[a-zA-Z0-9_\.@]+)( ?)\(_\1$(tput setaf 6)$(tput
bold)\2$(tput sgr0)\4(_g" | sed -r "s_([a-zA-Z0-9_#]*)=_$(tput setaf
2)$(tput bold)\1$(tput sgr0)=_g" | sed -r "s_^(#[0-9]*)_$(tput setaf
1)$(tput bold)\1$(tput sgr0)_" | --Type <RET> for more, q to quit, c to
continue without paging--
sed -r "s_^([ \*]) ([0-9]+)_$(tput bold)$(tput setaf 6)\1 $(tput setaf
1)\2$(tput sgr0)_" | sed -r
"s_(\.*[/A-Za-z0-9\+_\.\-]*):([0-9]+)\$_$(tput setaf 4)\1$(tput sgr0):$(tput
setaf 3)\2$(tput sgr0)_"
[Current thread is 1 (Thread 0x7ffff7d58740 (LWP 123960))]
++do-generic-colors
....
(gdb) thread
+++shell cat ~/.gdb-color-pipe | sed -r
"s_([^<])(\b([a-zA-Z0-9_]+::)?[a-zA-Z0-9_\.@]+)( ?)\(_\1$(tput setaf 6)$(tput
bold)\2$(tput sgr0)\4(_g" | sed -r "s_([a-zA-Z0-9_#]*)=_$(tput setaf
2)$(tput bold)\1$(tput sgr0)=_g" | sed -r "s_^(#[0-9]*)_$(tput setaf
1)$(tput bold)\1$(tput sgr0)_" | sed -r "s_^([ \*]) ([0-9]+)_$(tput
bold)$(tput setaf 6)\1 $(tput setaf 1)\2$(tput sgr0)_" | sed -r
"s_(\.*[/A-Za-z0-9\+_\.\-]*):([0-9]+)\$_$(tput setaf 4)\1$(tput sgr0):$(tput
setaf 3)\2$(tput sgr0)_"
++cleanup-color-pipe
....
---------------------------
the possible bug shown in above comment still happens when run 'thread' after
the gdb prompt.
A little weird
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (6 preceding siblings ...)
2023-03-20 11:11 ` czgf2v at 163 dot com
@ 2023-03-20 15:32 ` czgf2v at 163 dot com
2023-03-21 14:57 ` tromey at sourceware dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-20 15:32 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
czgf2v <czgf2v at 163 dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simark at simark dot ca
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (7 preceding siblings ...)
2023-03-20 15:32 ` czgf2v at 163 dot com
@ 2023-03-21 14:57 ` tromey at sourceware dot org
2023-03-22 8:11 ` czgf2v at 163 dot com
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tromey at sourceware dot org @ 2023-03-21 14:57 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
I didn't look into it yet but I'm moving it out of WAIT.
Also I wonder if perhaps gdb should just be colorizing thread
display internally.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (8 preceding siblings ...)
2023-03-21 14:57 ` tromey at sourceware dot org
@ 2023-03-22 8:11 ` czgf2v at 163 dot com
2023-07-05 14:22 ` brobecker at gnat dot com
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-03-22 8:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #8 from czgf2v <czgf2v at 163 dot com> ---
Yes, gdb colorizing the output at least in main branch(Sorry I forgot whether
this features exists in ubuntu 22 default gdb 12 version), although a little
different in colorized format.
Thanks, maybe thinking about the bug is a little like chasing dead ends.
My fault, using fifo and run 'cat ...' in background can solve, sorry for
having made a unnecessary bug report.
maybe it's a bad habit to use plain text as tunnel because it would emit
nothing if nothing input(NONBLOCK).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (9 preceding siblings ...)
2023-03-22 8:11 ` czgf2v at 163 dot com
@ 2023-07-05 14:22 ` brobecker at gnat dot com
2023-07-12 7:44 ` czgf2v at 163 dot com
2023-07-31 16:30 ` tromey at sourceware dot org
12 siblings, 0 replies; 14+ messages in thread
From: brobecker at gnat dot com @ 2023-07-05 14:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |brobecker at gnat dot com
--- Comment #9 from Joel Brobecker <brobecker at gnat dot com> ---
I don't think this PR qualifies as blocking for GDB 14.1 release, does it? If
not, we should unset the Target Milestone field.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (10 preceding siblings ...)
2023-07-05 14:22 ` brobecker at gnat dot com
@ 2023-07-12 7:44 ` czgf2v at 163 dot com
2023-07-31 16:30 ` tromey at sourceware dot org
12 siblings, 0 replies; 14+ messages in thread
From: czgf2v at 163 dot com @ 2023-07-12 7:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
--- Comment #10 from czgf2v <czgf2v at 163 dot com> ---
Just as [comment 7](https://sourceware.org/bugzilla/show_bug.cgi?id=30242#c7)
says, at least with `gdb 13.1` which I use now, it has built-in color
highlight. So it is fine to remove the blocking, although the milestone is not
set by me.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
2023-03-18 8:11 [Bug gdb/30242] New: gdb weird one specific command with specific input not valid to run czgf2v at 163 dot com
` (11 preceding siblings ...)
2023-07-12 7:44 ` czgf2v at 163 dot com
@ 2023-07-31 16:30 ` tromey at sourceware dot org
12 siblings, 0 replies; 14+ messages in thread
From: tromey at sourceware dot org @ 2023-07-31 16:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30242
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|14.1 |---
--- Comment #11 from Tom Tromey <tromey at sourceware dot org> ---
Removing the milestone.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 14+ messages in thread