public inbox for
 help / color / mirror / Atom feed
From: Aaron Merey <>
To: Tom Tromey <>
Cc: Aaron Merey via Gdb-patches <>
Subject: Re: [PATCH] gdb/debuginfod: Prevent prompt for continue during downloading.
Date: Mon, 30 Jan 2023 21:09:57 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Jan 28, 2023 at 10:01 AM Tom Tromey <> wrote:
> >>>>> "Aaron" == Aaron Merey via Gdb-patches <> writes:
> Aaron> In some cases the prompt "--Type <RET> for more, q to quit, c to
> Aaron> continue without paging--" can appear during a large series of
> Aaron> debuginfod downloads when lines_printed exceeds lines_allowed.
> Aaron> This is inconvenient plus ctrl-c during this prompt could leave some
> Aaron> of gdb's internal structures in a broken state.
> Aaron> Fix this by adding a bool count_lines_printed to control whether
> Aaron> lines_printed is incremented when a newline is printed.  Set this
> Aaron> value to false when performing a download.
> There's already pagination_disabled for this.  Or you can print to a
> stream other than gdb_stdout.
> However, my question is why pagination is even enabled at the likely
> spots where debuginfod might be called.  I thought infrun generally
> disabled it.

I was able to get a prompt to show up with the command

  gdb  -ex 'set height 25' -ex 'start' qemu-kvm

Setting pagination_enabled to false does stop the prompt in this case,
however during testing of the on-demand downloading feature that I'm
working on [1] I saw cases where this still didn't prevent the prompt.

For example 'list main.c:50' might trigger a number of downloads where
debuginfod-related output increases lines_printed past the lines_allowed
limit.  When the source lines actually print, the prompt immediately
shows up since pagination has been re-enabled and lines_allowed was

Adding a count_lines_printed toggle takes care of this case too.
However I didn't realise that printing to a stream besides gdb_stdout
should avoid this.  I'll try to implement this fix using another stream.



  reply	other threads:[~2023-01-31  2:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  4:06 Aaron Merey
2023-01-28 15:01 ` Tom Tromey
2023-01-31  2:09   ` Aaron Merey [this message]
2023-01-31 14:22     ` Tom Tromey
2023-01-31 20:41       ` Aaron Merey
2023-02-08 14:44         ` Tom Tromey
2023-02-11  2:02           ` Aaron Merey
2023-02-13 14:17             ` Tom Tromey
2023-02-13 20:23               ` Aaron Merey

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \

* 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).