This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Support for "break *ADDRESS thread THREADNO"
On Wed, Apr 13, 2005 at 11:35:29AM +0100, Maciej W. Rozycki wrote:
> On Tue, 12 Apr 2005, Daniel Jacobowitz wrote:
>
> > > Why was it done like this? because "*ADDRESS" is interpreted as an
> > > expression in the current language, or is there some other reason?
> >
> > I assume so. It is parsed as an expression, not just an address; for
> > instance "break *thread" would actually work if thread is a pointer to
> > a function.
>
> I think the actual problem is the expression parser cannot be told to
> stop successfully on an unparseable token as long as the expression
> collected so far is valid and let the caller deal with that. AFAICS the
> parser can only stop on a string terminator or optionally a comma,
> otherwise it issues an error.
And - can yacc do that?
Are you sure that there's no C expression that's valid with and without
a trailing identifier, by the way? I certainly find that believable,
but I haven't thought about it too hard.
--
Daniel Jacobowitz
CodeSourcery, LLC