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 08:32:04PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 13 Apr 2005 11:35:29 +0100 (BST)
> > From: "Maciej W. Rozycki" <macro@mips.com>
> > cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sources.redhat.com,
> > "Maciej W. Rozycki" <macro@linux-mips.org>
> >
> > 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.
>
> We could detect and remove the "thread NUMBER" part from the string we
> pass to the parser, couldn't we?
I have the feeling this is going to be pretty tricky to get right. For
instance, it can come before or after the "if" clause. (Well, I
thought it could; the manual only says before.) So if it comes before
then you have a line like:
break *EXPRESSION thread 5 if EXPRESSION
Suppose one of those expressions includes:
strcmp ("thread 5", my_thread_name)
Picking out the thread number would require at least lexing, and
possibly parsing.
--
Daniel Jacobowitz
CodeSourcery, LLC