From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org, Keith Seitz <keiths@redhat.com>
Subject: Re: [RFC/RFA] Add handling for unqualified Ada operators in linespecs
Date: Wed, 21 Dec 2011 06:52:00 -0000 [thread overview]
Message-ID: <20111221064453.GC23376@adacore.com> (raw)
In-Reply-To: <m3pqfjl0yp.fsf@fleche.redhat.com>
> Joel> Because the double quotes are part of the operator name... Eg:
>
> Joel> function "+" (A, B: My_Type) return My_Type;
>
> I think this could mess with the lexing plans. The original plan was
> for quotes to mean quoting. This approach means there is a situation
> where the quotes are part of the name.
>
> Keith... ?
If it makes thing simpler for the debugger, we could consider
the idea of accepting just + as the function name, without the quotes,
and consider the quotes as linespec quotes rather than part of
the function name. It would mean that GDB would end up accepting
the following 3 forms instead of just the first one:
break "+"
break '+'
break +
But that would be OK. In Ada, '+' is really the character '+',
so it would normally make no sense in a linespec. But on the
other hand, since it makes no sense at all, we can assume that
no one in their right mind will ever use it, and if they do,
then call it a feature (because there is no other sensible thing
to do anyway).
It is worth mentioning the fact that `break +' currently assumes
that the `+' starts an offset, rather than indicates an operator
name. Surprisingly, I would have expected this to be equilvalent to
`break +0', whereas it seems to be equivalent to `break +5'!!!
Oh, not documented in the GDB manual, but seems definitely
intentional - see decode_all_digits:
case plus:
if (q == *argptr)
val.line = 5;
--
Joel
next prev parent reply other threads:[~2011-12-21 6:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 21:24 Joel Brobecker
2011-12-16 19:32 ` Tom Tromey
2011-12-16 19:33 ` Doug Evans
2011-12-16 20:09 ` Keith Seitz
2011-12-16 20:35 ` Tom Tromey
2011-12-17 14:55 ` Joel Brobecker
2011-12-20 15:30 ` Tom Tromey
2011-12-21 6:52 ` Joel Brobecker [this message]
2011-12-21 7:41 ` 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=20111221064453.GC23376@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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