public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "czgf2v at 163 dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/30242] gdb weird one specific command with specific input not valid to run
Date: Mon, 20 Mar 2023 11:11:47 +0000	[thread overview]
Message-ID: <bug-30242-4717-l6c7sqs2PQ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30242-4717@http.sourceware.org/bugzilla/>

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.

  parent reply	other threads:[~2023-03-20 11:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  8:11 [Bug gdb/30242] New: " 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
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 [this message]
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
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

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=bug-30242-4717-l6c7sqs2PQ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).