From: Adam Fedor <fedor@doc.com>
To: Jason Molenda <jason-swarelist@molenda.com>
Cc: "fedor@gnu.org" <fedor@gnu.org>,
"gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: rbreak works poorly with ObjC methods
Date: Sat, 06 Sep 2003 03:51:00 -0000 [thread overview]
Message-ID: <1062820167.1147.1.camel@localhost.localdomain> (raw)
In-Reply-To: <20030904143519.A13676@molenda.com>
On Thu, 2003-09-04 at 15:35, Jason Molenda wrote:
> Hey gdb'ers,
>
> rbreak_command gets a list of functions matching a regular expression,
> then caonicalizes those into filename:function-name and sets
> breakpoints on the canonicalized form. For an Objective-C method
> that takes an argument, this form sent to break_command will be
> something like
> basicclass.m:'+[BasicClass newWithArg:]'
>
> The filename is separated out by linespec.c:locate_first_half().
> locate_first_half will correctly handle filename.m:+[classname
> arg:] type arguments, but it cannot cope when the apostrophy is
> added and there is a second ":" after the filename-function name
> separator.
>
> Unfortunately this can be fixed in several ways. :-) I believe
> the best is to change the way rbreak_command canonicalizes its
> arguments to be in the form
> "basicclass.m:+[BasicClass newWithArg:]"
>
> An example patch of this is attached.
>
> Another way to fix this is to modify linespec.c's is_objc_method_format
> to recognize a third ObjC method pattern -- :'-[ ... ] -- in addition
> to the two it already does. This fix seems pretty lame in my
> opinion--it's pushing the ObjC method spotter in the direction of
> being its own little decode_line_1. A patch showing how this would look
> is also attached to this mail note.
>
> The third way to fix this is to add the smarts to detect filename:' ... '
> to locate_first_half() itself. This has the benefit that
> is_objc_method_format is still used to detect the actual objc method
> and the smarts about the added apostrphy are pushed up to this function.
> An example of this approach is also attached. (Ignore the APPLE LOCAL
> markers - this just happens to be the first one I tried)
>
>
I probably don't have much say in the final outcome, but I think
changing rbreak is the best also - it seems more consistent with the way
other things are canonicalized
prev parent reply other threads:[~2003-09-06 3:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-04 21:35 Jason Molenda
2003-09-06 3:51 ` Adam Fedor [this message]
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=1062820167.1147.1.camel@localhost.localdomain \
--to=fedor@doc.com \
--cc=fedor@gnu.org \
--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