From: Andreas Schwab <schwab@suse.de>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: Andrew Cagney <ac131313@cygnus.com>,
Jason Molenda <jason-swarelist@molenda.com>,
gdb-patches@sources.redhat.com
Subject: Re: Minor off-by-one error in command_line_handler
Date: Wed, 27 Mar 2002 13:21:00 -0000 [thread overview]
Message-ID: <je4rj1lnap.fsf@sykes.suse.de> (raw)
In-Reply-To: <15522.13231.951795.389737@localhost.redhat.com> (Elena Zannoni's message of "Wed, 27 Mar 2002 16:03:43 -0500")
Elena Zannoni <ezannoni@redhat.com> writes:
|> Andreas Schwab writes:
|> >
|> > Btw., command_line_handler has this:
|> >
|> >
|> > if (*(p - 1) == '\\')
|> > {
|> > p--; /* Put on top of '\'. */
|> >
|> > if (*p == '\\')
|> >
|> > The condition in the last line is always true.
|> >
|>
|> Yes, thanks for catching this. Would you like to submit a fix?
I've checked this in as being obvious.
2002-03-27 Andreas Schwab <schwab@suse.de>
* event-top.c (command_line_handler): Remove useless if.
--- gdb/event-top.c.~1.19.~ 2002-01-18 09:37:57.000000000 +0100
+++ gdb/event-top.c 2002-03-27 22:12:23.000000000 +0100
@@ -685,20 +685,17 @@
{
p--; /* Put on top of '\'. */
- if (*p == '\\')
- {
- readline_input_state.linebuffer = savestring (linebuffer,
- strlen (linebuffer));
- readline_input_state.linebuffer_ptr = p;
-
- /* We will not invoke a execute_command if there is more
- input expected to complete the command. So, we need to
- print an empty prompt here. */
- more_to_come = 1;
- push_prompt ("", "", "");
- display_gdb_prompt (0);
- return;
- }
+ readline_input_state.linebuffer = savestring (linebuffer,
+ strlen (linebuffer));
+ readline_input_state.linebuffer_ptr = p;
+
+ /* We will not invoke a execute_command if there is more
+ input expected to complete the command. So, we need to
+ print an empty prompt here. */
+ more_to_come = 1;
+ push_prompt ("", "", "");
+ display_gdb_prompt (0);
+ return;
}
#ifdef STOP_SIGNAL
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2002-03-27 21:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-27 0:01 Jason Molenda
2002-03-27 8:34 ` Andrew Cagney
2002-03-27 10:11 ` Elena Zannoni
2002-03-27 11:54 ` Andreas Schwab
2002-03-27 13:31 ` Elena Zannoni
2002-03-27 13:21 ` Andreas Schwab [this message]
2002-03-27 9:40 ` Andrew Cagney
2002-03-28 23:54 ` Daniel Jacobowitz
2002-03-30 21:05 ` Andrew Cagney
2002-03-30 21:08 ` Daniel Jacobowitz
2002-04-03 19:27 ` Andrew Cagney
2002-04-09 13:52 ` Daniel Jacobowitz
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=je4rj1lnap.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=ac131313@cygnus.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jason-swarelist@molenda.com \
/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