]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Fix many errors in gdb.reverse with clang
authorGuinevere Larsen <blarsen@redhat.com>
Thu, 20 Jul 2023 09:47:50 +0000 (11:47 +0200)
committerGuinevere Larsen <blarsen@redhat.com>
Thu, 24 Aug 2023 09:08:35 +0000 (11:08 +0200)
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.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.reverse/break-reverse.c
gdb/testsuite/gdb.reverse/finish-reverse.c
gdb/testsuite/gdb.reverse/watch-reverse.c

index 5f54a8f2bd721387dc5195ec3ee5f626a755ff9d..4ae459f1bbac36b78025eead6dc4d5d0f047189a 100644 (file)
@@ -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 */
+}
index 609a14568a5ed7dbc3cad474d3341006d7973a2e..cc056ecfa8a762637615cc8b22a6e9182d52666f 100644 (file)
@@ -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 */
+}
 
index 8b7d1be0db5f1f5820e008f5bfcdaf14a6b812d9..e1b024af10bee822198bcddc6a6a5632580f7c2f 100644 (file)
@@ -206,6 +206,6 @@ int main ()
 
   func4 ();
 
-  return 0;
-} /* end of main */
+  return 0; /* end of main */
+}