public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Accept all-stop alternative in mi_expect_interrupt
@ 2015-03-04 21:44 Simon Marchi
  2015-03-04 22:05 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2015-03-04 21:44 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

When interrupting a thread in non-stop vs all-stop, the signal given in
the MI *stopped event is not the same. Currently, mi_expect_interrupt only
accepts the case for non-stop, so this adds the alternative for all-stop.

gdb/testsuite/ChangeLog:

	* lib/mi-support.exp (mi_expect_interrupt): Accept
	alternative event for when in all-stop mode.
---
 gdb/testsuite/lib/mi-support.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 20546f6..b8f6334 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1195,14 +1195,14 @@ proc mi_expect_interrupt { test } {
 	set prompt_re "$mi_gdb_prompt$"
     }
 
-    set r "reason=\"signal-received\",signal-name=\"0\",signal-meaning=\"Signal 0\""
-
+    set r_nonstop "reason=\"signal-received\",signal-name=\"0\",signal-meaning=\"Signal 0\""
+    set r_allstop "reason=\"signal-received\",signal-name=\"SIGINT\",signal-meaning=\"Interrupt\""
     set any "\[^\n\]*"
 
     # A signal can land anywhere, just ignore the location
-    verbose -log "mi_expect_interrupt: expecting: \\*stopped,${r}$any\r\n$prompt_re"
+    verbose -log "mi_expect_interrupt: expecting: \\*stopped,(${r_nonstop}|${r_allstop})$any\r\n$prompt_re"
     gdb_expect {
-	-re "\\*stopped,${r}$any\r\n$prompt_re" {
+	-re "\\*stopped,(${r_nonstop}|${r_allstop})$any\r\n$prompt_re" {
 	    pass "$test"
 	    return 0
 	}
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-04 22:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 21:44 [PATCH] Accept all-stop alternative in mi_expect_interrupt Simon Marchi
2015-03-04 22:05 ` Pedro Alves
2015-03-04 22:58   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).