mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user