public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Bruno Larsen <blarsen@redhat.com>
To: gdb-patches@sourceware.org
Cc: Bruno Larsen <blarsen@redhat.com>
Subject: [PATCH 1/4] gdb/testsuite: Fix many errors in gdb.reverse with clang
Date: Tue, 25 Jul 2023 11:58:30 +0200	[thread overview]
Message-ID: <20230725095833.236804-2-blarsen@redhat.com> (raw)
In-Reply-To: <20230725095833.236804-1-blarsen@redhat.com>

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(-)

diff --git a/gdb/testsuite/gdb.reverse/break-reverse.c b/gdb/testsuite/gdb.reverse/break-reverse.c
index 5f54a8f2bd7..4ae459f1bba 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 609a14568a5..cc056ecfa8a 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 8b7d1be0db5..e1b024af10b 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 */
+}
 
-- 
2.41.0


  reply	other threads:[~2023-07-25  9:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  9:58 [PATCH 0/4] Many fixes to gdb.reverse tests Bruno Larsen
2023-07-25  9:58 ` Bruno Larsen [this message]
2023-07-25  9:58 ` [PATCH 2/4] gdb/testsuite: fix gdb.reverse/solib-*.exp tests when using clang Bruno Larsen
2023-07-26 13:37   ` Tom Tromey
2023-07-25  9:58 ` [PATCH 3/4] gdb/testsuite: fix testing gdb.reverse/step-reverse.exp with clang Bruno Larsen
2023-07-26 13:39   ` Tom Tromey
2023-07-25  9:58 ` [PATCH 4/4] gdb/testsuite: Multiple improvements for gdb.reverse/insn-reverse.exp Bruno Larsen
2023-07-27  7:41 ` [PATCH v2 0/4] Many fixes to gdb.reverse tests Bruno Larsen
2023-07-27  7:41   ` [PATCH v2 1/4] gdb/testsuite: Fix many errors in gdb.reverse with clang Bruno Larsen
2023-07-27  7:41   ` [PATCH v2 2/4] gdb/testsuite: fix gdb.reverse/solib-*.exp tests when using clang Bruno Larsen
2023-07-27  7:41   ` [PATCH v2 3/4] gdb/testsuite: fix testing gdb.reverse/step-reverse.exp with clang Bruno Larsen
2023-07-28 13:14     ` Tom Tromey
2023-07-28 13:20       ` Bruno Larsen
2023-07-28 14:18         ` Tom Tromey
2023-07-28 14:20           ` Bruno Larsen
2023-07-27  7:41   ` [PATCH v2 4/4] gdb/testsuite: Multiple improvements for gdb.reverse/insn-reverse.exp Bruno Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230725095833.236804-2-blarsen@redhat.com \
    --to=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).