From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: RFA: implement ambiguous linespec proposal
Date: Wed, 16 Nov 2011 16:32:00 -0000 [thread overview]
Message-ID: <CADPb22SY1XeD8g385KubpaWxCMHLzgL5--qKW6CYHUxi45YSfA@mail.gmail.com> (raw)
In-Reply-To: <m3obwcjey3.fsf@fleche.redhat.com>
On Wed, Nov 16, 2011 at 6:54 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> Another question while we're cleaning up linespecs, if I may.
> Doug> The docs have this:
>
> Doug> @item '@var{filename}'::@var{funcaddr}
> Doug> Like @var{funcaddr} above, but also specifies the name of the source
> Doug> file explicitly. This is useful if the name of the function does not
> Doug> specify the function unambiguously, e.g., if there are several
> Doug> functions with identical names in different source files.
>
> Doug> Is the double colon, ::, a typo? I've only ever seen filename
> Doug> delimited with a single colon.
>
> This form is only valid for expressions, that is, if you type
>
> break *'file.c'::function
>
> This is a syntax extension that gdb provides. See the 'block'
> production in c-exp.y.
Sigh. :-(
> Doug> I'm hoping we can trivially decide that a file name is present by
> Doug> seeing a single colon.
>
> In general I agree, but there are some corner cases to consider.
>
> There's the easy(-ish) corner case of DOS file names:
>
> break c:/file.c:function
>
> There's also an Objective C case where a trailing ":" is part of the
> function name. I forget the exact syntax, maybe it can only appear in
> brackets:
>
> break +[method:]
I don't mind having code to catch these.
They're not normal file names.
> Anyway, like I said in the previous thread, in my view, gdb should
> require quoting for all unusual file names. We should try to be
> compatible, but we don't have to try too awfully hard, since a lot of
> things never worked anyway.
It's not clear that the result of this is that we can programmatically
determine if a file name is present without having to go see if it's
present in the debug info.
Did you have something in mind?
next prev parent reply other threads:[~2011-11-16 16:32 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 17:34 Tom Tromey
2011-10-28 20:52 ` Matt Rice
2011-11-01 20:38 ` Tom Tromey
2011-10-28 22:41 ` Jan Kratochvil
2011-11-01 20:58 ` Tom Tromey
2011-11-03 20:49 ` Tom Tromey
2011-11-04 7:46 ` Jan Kratochvil
2011-11-08 16:36 ` Tom Tromey
2011-11-09 16:05 ` Joel Brobecker
2011-11-09 17:12 ` Tom Tromey
2011-11-09 17:56 ` Joel Brobecker
2011-11-09 18:19 ` Tom Tromey
2011-11-09 19:00 ` Joel Brobecker
2011-11-14 21:04 ` Tom Tromey
2011-11-14 21:32 ` Jerome Guitton
2011-11-09 18:37 ` Tom Tromey
2011-11-14 21:11 ` Tom Tromey
2011-11-15 16:30 ` Tom Tromey
2011-11-15 16:59 ` Pierre Muller
2011-11-16 0:09 ` Jan Kratochvil
2011-11-16 1:58 ` Joel Brobecker
2011-11-16 14:46 ` Tom Tromey
2011-11-18 14:10 ` Tom Tromey
2011-11-16 21:23 ` Stan Shebs
2011-11-16 2:28 ` Yao Qi
2011-11-16 3:20 ` Doug Evans
2011-11-16 14:46 ` Tom Tromey
2011-11-16 16:06 ` Tom Tromey
2011-11-16 4:57 ` Doug Evans
2011-11-16 5:22 ` Doug Evans
2011-11-16 14:54 ` Tom Tromey
2011-11-16 16:32 ` Doug Evans [this message]
2011-11-16 16:39 ` Tom Tromey
2011-11-16 14:49 ` Tom Tromey
2011-11-16 8:15 ` Yao Qi
2011-11-16 16:17 ` Tom Tromey
2011-11-16 15:43 ` Yao Qi
2011-11-16 16:11 ` Tom Tromey
2011-11-16 16:44 ` Tom Tromey
2011-11-17 3:49 ` Yao Qi
2011-11-21 21:50 ` Tom Tromey
2011-11-23 21:33 ` Tom Tromey
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=CADPb22SY1XeD8g385KubpaWxCMHLzgL5--qKW6CYHUxi45YSfA@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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