]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite, mi: fix indentation in get_mi_thread_list
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 17 Feb 2025 18:19:58 +0000 (19:19 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 17 Feb 2025 19:05:49 +0000 (20:05 +0100)
The `get_mi_thread_list` procedure's body is incorrectly indented.
Fix it.

There is one line that was already long.  Consider it an exception and
don't bother breaking it.

gdb/testsuite/lib/mi-support.exp

index 38321379721592bfea8f9a7e3e1e0fdb83ee8969..a3546c551a6d23c6c49cd63a93ff88a056fad327 100644 (file)
@@ -1953,40 +1953,40 @@ proc mi_run_inline_test { testcase } {
 }
 
 proc get_mi_thread_list {name} {
-  global expect_out
+    global expect_out
 
-  # MI will return a list of thread ids:
-  #
-  # -thread-list-ids
-  # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
-  # (gdb)
-  mi_gdb_test "-thread-list-ids" \
-    {.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \
-    "-thread_list_ids ($name)"
+    # MI will return a list of thread ids:
+    #
+    # -thread-list-ids
+    # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
+    # (gdb)
+    mi_gdb_test "-thread-list-ids" \
+       {.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \
+       "-thread_list_ids ($name)"
 
-  set output {}
-  if {[info exists expect_out(buffer)]} {
-    set output $expect_out(buffer)
-  }
+    set output {}
+    if {[info exists expect_out(buffer)]} {
+       set output $expect_out(buffer)
+    }
 
-  set thread_list {}
-  if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
-    fail "finding threads in MI output ($name)"
-  } else {
-    pass "finding threads in MI output ($name)"
-
-    # Make list of console threads
-    set start [expr {[string first \{ $threads] + 1}]
-    set end   [expr {[string first \} $threads] - 1}]
-    set threads [string range $threads $start $end]
-    foreach thread [split $threads ,] {
-      if {[scan $thread {thread-id="%d"} num]} {
-       lappend thread_list $num
-      }
+    set thread_list {}
+    if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
+       fail "finding threads in MI output ($name)"
+    } else {
+       pass "finding threads in MI output ($name)"
+
+       # Make list of console threads
+       set start [expr {[string first \{ $threads] + 1}]
+       set end   [expr {[string first \} $threads] - 1}]
+       set threads [string range $threads $start $end]
+       foreach thread [split $threads ,] {
+           if {[scan $thread {thread-id="%d"} num]} {
+               lappend thread_list $num
+           }
+       }
     }
-  }
 
-  return $thread_list
+    return $thread_list
 }
 
 # Helper function for check_mi_and_console_threads.