Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 1/7] Reformat gdb.objc tests
Date: Sun, 16 Nov 2025 18:27:00 -0700	[thread overview]
Message-ID: <20251117012752.2657208-2-tom@tromey.com> (raw)
In-Reply-To: <20251117012752.2657208-1-tom@tromey.com>

This patch applies some minor formatting changes and cleanups to the
gdb.objc tests.
---
 gdb/testsuite/gdb.objc/basicclass.exp |  9 ++++-----
 gdb/testsuite/gdb.objc/nondebug.exp   |  9 ++++-----
 gdb/testsuite/gdb.objc/objcdecode.exp | 11 +++++------
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp
index 9e40c7138dc..d1fb64a42de 100644
--- a/gdb/testsuite/gdb.objc/basicclass.exp
+++ b/gdb/testsuite/gdb.objc/basicclass.exp
@@ -21,8 +21,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+	 executable {debug}] != ""} {
+    return
 }
 
 #
@@ -147,7 +148,7 @@ gdb_test "break hiddenMethod" \
 #
 gdb_test continue \
     "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass\\(Private\\) hiddenMethod. \\(self=.*, _cmd=.*\\) at .*$srcfile:61.*" \
-     "continue until category method"
+    "continue until category method"
 
 #
 # Test calling Objective-C methods
@@ -170,5 +171,3 @@ gdb_test "print-object object" \
 gdb_test "po self" \
     "BasicClass gdb test object" \
     "use of the po (print-object) command"
-
-
diff --git a/gdb/testsuite/gdb.objc/nondebug.exp b/gdb/testsuite/gdb.objc/nondebug.exp
index 9ca86ff8189..321aa229045 100644
--- a/gdb/testsuite/gdb.objc/nondebug.exp
+++ b/gdb/testsuite/gdb.objc/nondebug.exp
@@ -23,8 +23,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list ] ] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+	 executable {}] != ""} {
+    return
 }
 
 proc do_objc_tests {} {
@@ -42,8 +43,7 @@ gdb_test "set breakpoint pending off" "" "set breakpoint pending"
 # Break on multiply defined non-debuggable symbol (PR objc/1236)
 #
 set name "break on non-debuggable method"
-gdb_test_multiple "break someMethod" $name \
-{
+gdb_test_multiple "break someMethod" $name {
     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
 	send_gdb "2\n"
 	exp_continue
@@ -55,4 +55,3 @@ gdb_test_multiple "break someMethod" $name \
     -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*$gdb_prompt $" { pass $name }
     -re ".*$gdb_prompt $"   { kfail "gdb/1236" $name }
 }
-
diff --git a/gdb/testsuite/gdb.objc/objcdecode.exp b/gdb/testsuite/gdb.objc/objcdecode.exp
index 5414f0f96f3..7840a2ed5d3 100644
--- a/gdb/testsuite/gdb.objc/objcdecode.exp
+++ b/gdb/testsuite/gdb.objc/objcdecode.exp
@@ -23,8 +23,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
+	 {debug}] != ""} {
+    return
 }
 
 proc do_objc_tests {} {
@@ -40,8 +41,7 @@ gdb_test_no_output "set multiple-symbols ask"
 # Break on multiply defined method (PR objc/1236)
 #
 set name "break on multiply defined method"
-gdb_test_multiple "break multipleDef" $name \
-{
+gdb_test_multiple "break multipleDef" $name {
     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] .*${srcfile}:-.Decode multipleDef.\r\n\\\[3\\\] .*${srcfile}:multipleDef\r\n> $" {
 	send_gdb "3\n"
 	exp_continue
@@ -52,8 +52,7 @@ gdb_test_multiple "break multipleDef" $name \
 
 set name "continue after break on multiply defined symbol"
 gdb_run_cmd
-gdb_test_multiple "" $name \
-{
+gdb_test_multiple "" $name {
     -re "Breakpoint \[0-9\]+, multipleDef \\\(\\\) at .*\r\n$gdb_prompt $" {
 	pass $name
     }
-- 
2.49.0


  reply	other threads:[~2025-11-17  1:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  1:26 [PATCH 0/7] Objective-C fixes Tom Tromey
2025-11-17  1:27 ` Tom Tromey [this message]
2025-11-17  1:27 ` [PATCH 2/7] Make the gdb.objc tests compile Tom Tromey
2025-11-17 10:09   ` Matt Rice
2025-11-18  0:51     ` Tom Tromey
2025-11-18  1:12       ` Matt Rice
2025-12-02 16:20         ` Tom Tromey
2025-12-03 15:24           ` Matt Rice
2025-11-17  1:27 ` [PATCH 3/7] Minor fixes to make gdb.objc tests pass Tom Tromey
2025-11-17  1:27 ` [PATCH 4/7] Rename lookup_struct_typedef Tom Tromey
2025-11-17  1:27 ` [PATCH 5/7] Remove a couple Objective-C expression helpers Tom Tromey
2025-11-17  1:27 ` [PATCH 6/7] Avoid crash with "NSString" literals Tom Tromey
2025-11-17  1:27 ` [PATCH 7/7] Rewrite the @selector code Tom Tromey

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=20251117012752.2657208-2-tom@tromey.com \
    --to=tom@tromey.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