[v2,1/4] gdb/testsuite: Fix many errors in gdb.reverse with clang
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
Clang does not add line information for lines that only contain a
closing } in functions. Many tests in the gdb.reverse folder set a
breakpoint in that line, but don't seem to use information available
after the return statement is executed, so this commit moves the
breakpoint to the previous line, where the return statement is.
---
gdb/testsuite/gdb.reverse/break-reverse.c | 4 ++--
gdb/testsuite/gdb.reverse/finish-reverse.c | 4 ++--
gdb/testsuite/gdb.reverse/watch-reverse.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
@@ -33,5 +33,5 @@ int main ()
{
xyz = 0; /* break in main */
foo ();
- return (xyz == 2 ? 0 : 1);
-} /* end of main */
+ return (xyz == 2 ? 0 : 1); /* end of main */
+}
@@ -123,6 +123,6 @@ int main (int argc, char **argv)
testval.double_testval = 3.14159265358979323846; /* float_checkpoint */
double_resultval = double_func ();
main_test = 1; /* double_checkpoint */
- return 0;
-} /* end of main */
+ return 0; /* end of main */
+}
@@ -206,6 +206,6 @@ int main ()
func4 ();
- return 0;
-} /* end of main */
+ return 0; /* end of main */
+}