Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Matt Rice <ratmice@gmail.com>, gdb-patches@sourceware.org
Subject: Re: gdb.objc/objcdecode.exp test error..
Date: Tue, 13 Oct 2009 00:44:00 -0000	[thread overview]
Message-ID: <m37hv0p1gj.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20090924005319.GD5134@adacore.com> (Joel Brobecker's message of 	"Wed, 23 Sep 2009 17:53:19 -0700")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

[...]

Joel> I really think that allowing the above shortcut is a mis-feature
Joel> that we should consider removing. We could possibly think about
Joel> introducing another syntax meaning all "create" methods in all
Joel> classes, if it really is needed by ObjC developers.

Joel> Another, more compromising approach, might be to start searching
Joel> ObjC method only when we did not find a symbol with that name.
Joel> In other words, do a pure C/C++ match first, and if nothing found,
Joel> then try objective-C.  We could conditionalize that to the current
Joel> language being objective-c, but I have the feeling that this is
Joel> contrary to the spirit of the current code.

I tend to think that the results should depend a bit on the current
language.

If the current language is C, I think we should require full
qualification of the name.  So, "break foo" would just find a function
named "foo", but "break x::y" would look at various C++ functions.

However, we could give languages a method that could short-circuit this
search a bit.  That way something like "break func" in C++ could
consider the current context and do C++-style name lookup.  I think this
would yield a natural result for C++ programmers.

If we did this, then "break create" in C mode would only find the C
function of that name, but the ObjC code would be free to make
"break create" do whatever searching ObjC programmers deem reasonable.

Whether other languages accept all the forms accepted by C is open to
debate.  I think C must be a special case because it is the default
language, and we want users to be able to start gdb and set a breakpoint
without an intervening "set language".

What do you think?

Tom


  parent reply	other threads:[~2009-10-13  0:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06  1:31 Matt Rice
2009-03-06 17:33 ` Joel Brobecker
2009-03-06 19:13   ` Pedro Alves
2009-03-07 12:07     ` Matt Rice
2009-03-08 14:16       ` Matt Rice
2009-03-09  2:10         ` Matt Rice
2009-09-11 11:43           ` Matt Rice
2009-09-24  0:53             ` Joel Brobecker
2009-09-24  8:24               ` Matt Rice
2009-09-24 18:28                 ` Tom Tromey
2009-09-24 22:07                   ` Matt Rice
2009-09-24 22:29                 ` Matt Rice
2009-09-24 22:51                   ` Matt Rice
2009-09-25  4:03               ` Matt Rice
2009-10-13  0:44               ` Tom Tromey [this message]
2009-10-14  1:59                 ` Joel Brobecker
2009-09-23 23:13         ` Joel Brobecker
2009-09-24  6:48           ` Matt Rice
2009-09-24 16:41             ` Joel Brobecker
2009-09-24 17:31               ` Joel Brobecker
2009-09-24 17:41               ` Joel Brobecker
2009-09-24 16:52             ` Joel Brobecker

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=m37hv0p1gj.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ratmice@gmail.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