public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vimacs.hacks at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29787] New: Using "set debug infrun on" and "set logging enabled" breaks GDB prompt and makes GDB crash
Date: Wed, 16 Nov 2022 03:53:14 +0000	[thread overview]
Message-ID: <bug-29787-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29787

            Bug ID: 29787
           Summary: Using "set debug infrun on" and "set logging enabled"
                    breaks GDB prompt and makes GDB crash
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vimacs.hacks at gmail dot com
  Target Milestone: ---

The use of readline in GDB is broken in commit
a715464cd2e25c8bf46190cc8bde9267c9ab6ac0 when using "set debug infrun on" and
"set logging enabled".

GDB 12.1 doesn't have this bug, but GDB 12.1 doesn't have paging for the debug
messages, so I don't know if this bug is only in the versions after GDB 12.1.

Steps to produce this bug:

1. build a simple program:

$ cat main.c 
int main()
{
}
$ gcc -g -O0 main.c

2. debug it and use the following commands:

$ ./gdb/gdb ./a.out
(gdb) b main
Breakpoint 1 at 0x1122: file main.c, line 3.
(gdb) set debug infrun on 
(gdb) set logging enabled 
Copying output to gdb.txt.
Copying debug output to gdb.txt.
(gdb) r

3. just type <RET> until the debug message finishes, and type <RET> once more,
GDB will crash with "readline: readline_callback_read_char() called with no
handler!"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-11-16  3:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16  3:53 vimacs.hacks at gmail dot com [this message]
2022-11-16  3:57 ` [Bug gdb/29787] " simark at simark dot ca
2022-11-16 18:11 ` tromey at sourceware dot org
2022-11-16 18:40 ` tromey at sourceware dot org
2022-11-17 16:27 ` tromey at sourceware dot org
2022-11-17 16:34 ` tromey at sourceware dot org
2022-11-17 16:48 ` tromey at sourceware dot org
2022-11-17 18:11 ` tromey at sourceware dot org
2022-11-17 18:29 ` tromey at sourceware dot org
2022-11-28 20:41 ` cvs-commit at gcc dot gnu.org
2022-11-28 20:42 ` 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-29787-4717@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).