Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: tromey@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: confusion in the `b' command
Date: Mon, 22 Apr 2002 13:13:00 -0000	[thread overview]
Message-ID: <2593-Mon22Apr2002231326+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <87d6wrmsdt.fsf@creche.redhat.com> (message from Tom Tromey on 22 Apr 2002 13:43:10 -0600)

> From: Tom Tromey <tromey@redhat.com>
> Date: 22 Apr 2002 13:43:10 -0600
> 
> Now try to set a breakpoint like this:
> 
>     b 'x.main<TAB>
> 
> gdb just beeps at me.

What version of GDB is that?  Head? branch? released version?

> So close the quotes and press enter:
> 
>     (gdb) b 'x.main'
>     the class x does not have any method named main
>     Hint: try 'x.main'<TAB> or 'x.main'<ESC-?>
>     (Note leading single quote.)
> 
> Now try again:
> 
>     b 'x.main<TAB>
> 
> I get:
> 
>     (gdb) b 'x.main(java.lang.String[])' 
> 
> I think this must be a bug.  I expected:
> 
> * First, that TAB would work correctly the first time.

This is probably another manifestation of a known problem with
completion: different types of objects (files, symbols, commands,
etc.) need different sets of delimiter characters to make completion
DTRT, but Readline doesn't give GDB a chance to set the delimiters
before the first completion attempt.  Thus, GDB gets the user input
after breakup into words, but the notion of ``a word'' does not match
what it should be for the object on which GDB is completing.

We currently try to work around this nuisance, but there's no way to
do that for the first completion attempt on a given object type.z

What we need is a hook from Readline that would be called _before_
Readline breaks up input into ``words''.

> * Second, that b 'x.main' would work anyway, since it is unambiguous.

I'm not sure what you mean here.  Do you mean that GDB shouldn't have
forced you to quote the string "x.main(java.lang.String[])"?


  reply	other threads:[~2002-04-22 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22 12:37 Tom Tromey
2002-04-22 13:13 ` Eli Zaretskii [this message]
2002-04-22 13:38   ` Tom Tromey
2002-04-22 22:58     ` Eli Zaretskii
2002-05-12 19:22 ` 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=2593-Mon22Apr2002231326+0300-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    --cc=tromey@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