diff options
author | Guinevere Larsen <blarsen@redhat.com> | 2023-07-20 11:47:50 +0200 |
---|---|---|
committer | Guinevere Larsen <blarsen@redhat.com> | 2023-08-24 11:08:35 +0200 |
commit | a47dae3f3a6265576a876c9d6229c8e1e29d5636 (patch) | |
tree | 955ad5e9a1921b687e34368a42f3da6b7fc4caa7 /gdb | |
parent | 81656b43f153df328776bc122d573d5790bbe0e8 (diff) | |
download | gdb-a47dae3f3a6265576a876c9d6229c8e1e29d5636.zip gdb-a47dae3f3a6265576a876c9d6229c8e1e29d5636.tar.gz gdb-a47dae3f3a6265576a876c9d6229c8e1e29d5636.tar.bz2 |
gdb/testsuite: Fix many errors in gdb.reverse with clang
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>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.reverse/break-reverse.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/finish-reverse.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/watch-reverse.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.reverse/break-reverse.c b/gdb/testsuite/gdb.reverse/break-reverse.c index 5f54a8f..4ae459f 100644 --- a/gdb/testsuite/gdb.reverse/break-reverse.c +++ b/gdb/testsuite/gdb.reverse/break-reverse.c @@ -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 */ +} diff --git a/gdb/testsuite/gdb.reverse/finish-reverse.c b/gdb/testsuite/gdb.reverse/finish-reverse.c index 609a145..cc056ec 100644 --- a/gdb/testsuite/gdb.reverse/finish-reverse.c +++ b/gdb/testsuite/gdb.reverse/finish-reverse.c @@ -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 */ +} diff --git a/gdb/testsuite/gdb.reverse/watch-reverse.c b/gdb/testsuite/gdb.reverse/watch-reverse.c index 8b7d1be..e1b024a 100644 --- a/gdb/testsuite/gdb.reverse/watch-reverse.c +++ b/gdb/testsuite/gdb.reverse/watch-reverse.c @@ -206,6 +206,6 @@ int main () func4 (); - return 0; -} /* end of main */ + return 0; /* end of main */ +} |