Reindent gdb.threads/attach-into-signal.exp
authorPedro Alves <palves@redhat.com>
Tue, 24 Oct 2017 09:43:45 +0000 (10:43 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 24 Oct 2017 09:55:50 +0000 (10:55 +0100)
A previous patch removed one nesting level.

gdb/testsuite/ChangeLog:
2017-10-24  Pedro Alves  <palves@redhat.com>

* gdb.threads/attach-into-signal.exp (corefunc): Reindent.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/attach-into-signal.exp

index 25dcd06f085bbaab4cfdd9d136ae0d3137629599..d9ed6876a9e62b3ac33968d525f732860bc53e61 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-24  Pedro Alves  <palves@redhat.com>
+
+       * gdb.threads/attach-into-signal.exp (corefunc): Reindent.
+
 2017-10-24  Pedro Alves  <palves@redhat.com>
 
        * gdb.threads/attach-into-signal.exp: Remove whole "stoppedtry"
index ab80e82e16a21a38eed3bd1f686e74e52cd7c514..3158b59557c07565cbf9bbc0dc291e6772c1f872 100644 (file)
@@ -56,50 +56,50 @@ proc corefunc { threadtype executable } {
        set attempt 1
        set passes 1
        while { $passes < 3 && $attempt <= $attempts } {
-               set test "attach (pass $passes), pending signal catch"
-               if {[gdb_test_multiple "attach $testpid" $test {
-                   -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.* received signal SIGALRM.*$gdb_prompt $" {
-                       # nonthreaded:
-                       pass $test
-                       verbose -log "$test succeeded on the attempt # $attempt of $attempts"
-                       set passes [expr $passes + 1]
-                   }
-                   -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
-                       set ok 0
-
-                       if { $threadtype == "threaded" } {
-                           # In the threaded case, the signal is left
-                           # pending on the second thread.  Check for
-                           # that by peeking at the thread's siginfo.
-                           # SIGALRM is 14, SIGSTOP is 19.
-
-                           set test2 "thread apply 2 print \$_siginfo.si_signo"
-                           gdb_test_multiple $test2 $test2 {
-                               -re " = 14\r\n$gdb_prompt $" {
-                                   set ok 1
-                               }
-                               -re " = 19\r\n$gdb_prompt $" {
-                               }
+           set test "attach (pass $passes), pending signal catch"
+           if {[gdb_test_multiple "attach $testpid" $test {
+               -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.* received signal SIGALRM.*$gdb_prompt $" {
+                   # nonthreaded:
+                   pass $test
+                   verbose -log "$test succeeded on the attempt # $attempt of $attempts"
+                   set passes [expr $passes + 1]
+               }
+               -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
+                   set ok 0
+
+                   if { $threadtype == "threaded" } {
+                       # In the threaded case, the signal is left
+                       # pending on the second thread.  Check for
+                       # that by peeking at the thread's siginfo.
+                       # SIGALRM is 14, SIGSTOP is 19.
+
+                       set test2 "thread apply 2 print \$_siginfo.si_signo"
+                       gdb_test_multiple $test2 $test2 {
+                           -re " = 14\r\n$gdb_prompt $" {
+                               set ok 1
+                           }
+                           -re " = 19\r\n$gdb_prompt $" {
                            }
-                       } else {
-                           # In the nonthreaded case, GDB should tell the
-                           # user about having seen a signal.
                        }
+                   } else {
+                       # In the nonthreaded case, GDB should tell the
+                       # user about having seen a signal.
+                   }
 
-                       if { $ok == 0} {
-                           # We just lack the luck, we should try it again.
-                           set attempt [expr $attempt + 1]
-                       } else {
-                           pass $test
-                           verbose -log "$test succeeded on the attempt # $attempt of $attempts"
-                           set passes [expr $passes + 1]
-                       }
+                   if { $ok == 0} {
+                       # We just lack the luck, we should try it again.
+                       set attempt [expr $attempt + 1]
+                   } else {
+                       pass $test
+                       verbose -log "$test succeeded on the attempt # $attempt of $attempts"
+                       set passes [expr $passes + 1]
                    }
-               }] != 0 } {
-                   break
                }
+           }] != 0 } {
+               break
+           }
 
-               gdb_test "detach" "Detaching from.*" ""
+           gdb_test "detach" "Detaching from.*" ""
        }
 
        if {$passes < 3} {
This page took 0.032616 seconds and 4 git commands to generate.