diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2025-02-17 19:19:58 +0100 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2025-02-17 20:05:49 +0100 |
commit | cb82077fef62fd8628cdbd97bf88eedde3f33656 (patch) | |
tree | c7c41782039eae8f368c32e3a43e3d1292b8ce11 | |
parent | 114396befddc4104f9d7dd09b34e878bfaf440a8 (diff) | |
download | binutils-cb82077fef62fd8628cdbd97bf88eedde3f33656.zip binutils-cb82077fef62fd8628cdbd97bf88eedde3f33656.tar.gz binutils-cb82077fef62fd8628cdbd97bf88eedde3f33656.tar.bz2 |
testsuite, mi: fix indentation in get_mi_thread_list
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.
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 3832137..a3546c5 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -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. |