Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>, gdb-patches@sourceware.org
Subject: Re: [PATCH] tui: don't overwrite a subprompt line that was given no input
Date: Fri, 21 Aug 2015 18:04:00 -0000	[thread overview]
Message-ID: <55D7682B.5050805@redhat.com> (raw)
In-Reply-To: <1440175538-8021-1-git-send-email-patrick@parcs.ath.cx>

On 08/21/2015 05:45 PM, Patrick Palka wrote:
> This patch fixes the following bug in TUI:
> 
>   (gdb) break foo
>   No symbol table is loaded.  Use the "file" command.
>   Make breakpoint pending on future shared library load? (y or [n]) <ENTER>
> 
> By submitting an empty command line to a subprompt, the subprompt line
> is undesirably cleared and overwritten.  Outside of a subprompt,
> clearing the prompt line after submitting an empty command line is
> intended behavior which complements GDB's repeat-command shorthand.  But
> inside a subprompt, this behavior is undesired since the shorthand is
> not applicable in that case.  We should retain the subprompt line even
> when it's given to input.
> 
> This patch makes sure that a prompt given an empty command line is
> cleared and overwritten only if it's not a subprompt.  To acheive this,
> a new predicate is defined which informs us whether the current input
> handler is a subprompt.
> 
> gdb/ChangeLog:
> 
> 	* top.h (gdb_in_subprompt_p): Declare.
> 	* top.c (gdb_subprompt_depth): Define.
> 	(gdb_in_subprompt_p): Define.
> 	(gdb_readline_wrapper_cleanup): Decrement gdb_subprompt_depth.
> 	(gdb_readline_wrapper): Increment gdb_subprompt_depth.
> 	* tui/tui-io.c (tui_getc): Don't clear the prompt line if we
> 	are in a subprompt.

OK, but should really be s/subprompt/secondary prompt/ everywhere.

Thanks,
Pedro Alves


  reply	other threads:[~2015-08-21 18:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 16:45 Patrick Palka
2015-08-21 18:04 ` Pedro Alves [this message]
2015-08-21 19:07   ` Patrick Palka

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=55D7682B.5050805@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=patrick@parcs.ath.cx \
    /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