* gdb.base/break.c (multi_line_if_conditional): New function.

(multi_ilne_while_conditional): Likewise.
        * gdb.base/break.exp: Verify that a breakpoint on a multi-line
        IF or WHILE condition puts the breakpoint at the start of
        the condition.
This commit is contained in:
Jeff Law
2002-01-07 19:21:27 +00:00
parent 634d57ec50
commit f286b2c396
3 changed files with 51 additions and 1 deletions

View File

@@ -99,3 +99,33 @@ int value;
return (value);
}
#ifdef PROTOTYPES
int multi_line_if_conditional (int a, int b, int c)
#else
int multi_line_if_conditional (a, b, c)
int a, b, c;
#endif
{
if (a
&& b
&& c)
return 0;
else
return 1;
}
#ifdef PROTOTYPES
int multi_line_while_conditional (int a, int b, int c)
#else
int multi_line_while_conditional (a, b, c)
int a, b, c;
#endif
{
while (a
&& b
&& c)
{
a--, b--, c--;
}
return 0;
}