Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Andrew STUBBS <andrew.stubbs@st.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix 'Undefined command' error message
Date: Wed, 16 Nov 2005 23:28:00 -0000	[thread overview]
Message-ID: <20051116201300.GA23472@nevyn.them.org> (raw)
In-Reply-To: <u1x1h93u5.fsf@gnu.org>

On Tue, Nov 15, 2005 at 08:13:38PM +0200, Eli Zaretskii wrote:
> > Date: Tue, 15 Nov 2005 14:09:14 +0000
> > From: Andrew STUBBS <andrew.stubbs@st.com>
> > 
> > -	      while (isalnum (*p) || *p == '-')
> > +	      while (*p && (isalnum (*p) || *p == '-' || *p == '_' ||
> 
> Why is there a need for testing *p to be non-zero?  AFAIK, isalnum is
> well defined for a zero argument.

Just to clarify when the end of the loop is?  You're right, it should
not be necessary.

> > +#if defined(TUI)
> > +			    (tui_active &&
> > +			     (*p == '+' || *p == '<' || *p == '>' || *p == '$')) ||
> > +#endif
> 
> What is the reason for additional tests under TUI?

The TUI has commands which include these.  E.g. + is scroll forward;
search for add_com in tui/.

> > +			    (xdb_commands && (*p == '!' || *p == '/' || *p == '?'))))
> 
> Is this for some kind of compatibility with XDB?

And xdb has some commands which include these, which GDB emulates, I
presume.  ! is for an xdb-specific alias to shell.  (With a comment
from Andrew above it mentioning that using a different syntax would be
more useful.  Personally, I think we don't need to bind ! to that so
much as we need to bind it to bash-style command history.)

/ and ? are bound to forward and reverse search in the source file.

Found these with grep also, although it took me a little longer.

Does anyone use xdb compatibility any more?  I suspect we could remove
it, but I've no way to know.

The other characters could presumably be allowed unconditionally
without doing any harm, but I haven't tried that.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  parent reply	other threads:[~2005-11-16 20:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15 18:11 Andrew STUBBS
2005-11-16  4:52 ` Eli Zaretskii
2005-11-16 14:56   ` Andrew STUBBS
2005-11-16 20:19     ` Eli Zaretskii
2005-11-16 23:28   ` Daniel Jacobowitz [this message]
2005-11-17  0:10     ` Eli Zaretskii
2005-11-22  2:17       ` Andrew STUBBS
2005-11-22  2:31         ` Andreas Schwab
2005-11-23 18:58           ` Andrew STUBBS
2005-11-23 19:19             ` Eli Zaretskii
2005-11-23 21:07               ` Andrew STUBBS
2005-11-24  4:33                 ` Daniel Jacobowitz
2005-11-24 17:29                   ` Eli Zaretskii
2005-11-24 18:11                     ` Daniel Jacobowitz
2005-11-24 20:31                       ` Eli Zaretskii
2005-11-24 22:37                         ` Andrew STUBBS
2005-11-24 23:57                           ` Eli Zaretskii
2005-11-24 10:34                 ` Eli Zaretskii
2005-11-22  5:38         ` Eli Zaretskii

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=20051116201300.GA23472@nevyn.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.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