From: Tankut Baris Aktemur Date: Mon, 17 Feb 2025 18:19:58 +0000 (+0100) Subject: testsuite, mi: fix indentation in get_mi_thread_list X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb82077fef62fd8628cdbd97bf88eedde3f33656;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 38321379721..a3546c551a6 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.