This is the mail archive of the
mailing list for the GDB project.
Re: Is ``break main if(1)'' legal?
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Is ``break main if(1)'' legal?
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Wed, 15 Dec 1999 17:14:01 +0000
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions - Toronto
- References: <38572456.8C003027@cygnus.com>
Andrew Cagney wrote:
> (vs ``break main if (1)'')
> Some parts of the code (decode_line_1()) think it is legal but other
> parts (break_command_1()) don't.
(1) is a perfectly valid logical expression of "true". It makes no
sense setting a conditional breakpoint to always true, but rejecting the
expression as not valid is wrong.
What is break_command_1() complaining about?
Cygnus Solutions - Toronto Office E-Mail: firstname.lastname@example.org
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299