Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 1/3] gdb/testsuite: Fix broken regexp in gdbstub case
Date: Mon, 09 Apr 2018 15:15:00 -0000	[thread overview]
Message-ID: <1ec70ce9afe8bebbb3f0257778943d4634ea126b.1523286728.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1523286728.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1523286728.git.andrew.burgess@embecosm.com>

When $use_gdb_stub is true then, when we start an MI target there's a
regexp to match GDB's startup pattern.  Unfortunately the pattern is
broken, and we're also missing a timeout case in the match list (which
would have helped point out that the regexp was broken).

gdb/testsuite/ChangeLog:

	* lib/mi-support.exp (mi_run_cmd_full): Fix regexp and add a
	timeout.
---
 gdb/testsuite/ChangeLog          | 5 +++++
 gdb/testsuite/lib/mi-support.exp | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 2846da74e47..851e490f4de 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -979,7 +979,11 @@ proc mi_run_cmd_full {use_mi_command args} {
 	send_gdb  "jump *$start\n"
 	warning "Using CLI jump command, expect run-to-main FAIL"
 	gdb_expect {
-	    -re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
+	    -re "&\"jump \\*${start}\\\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\.\\\\n\"\[\r\n\]+\\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\[\r\n\]+${mi_gdb_prompt}" {}
+	    timeout {
+		perror "Unable to start target"
+		return -1
+	    }
 	}
 	return 0
     }
-- 
2.12.2


  parent reply	other threads:[~2018-04-09 15:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 15:15 [PATCH 0/3] Small testsuite updates Andrew Burgess
2018-04-09 15:15 ` [PATCH 3/3] gdb/testsuite: Handle targets with lots of registers Andrew Burgess
2018-04-12 23:40   ` Maciej W. Rozycki
2018-04-13 13:10     ` Pedro Alves
2018-04-13 13:57       ` Maciej W. Rozycki
2018-05-04 12:01         ` Andrew Burgess
2018-05-04 12:47           ` Pedro Alves
2018-04-09 15:15 ` Andrew Burgess [this message]
2018-04-13 12:12   ` [PATCH 1/3] gdb/testsuite: Fix broken regexp in gdbstub case Pedro Alves
2018-05-03 19:41     ` Andrew Burgess
2018-05-04  9:18       ` Pedro Alves
2018-04-09 15:15 ` [PATCH 2/3] gdb/testsuite: Filter out some registers for riscv Andrew Burgess
2018-04-09 21:28   ` Palmer Dabbelt
2018-04-09 22:26     ` Andrew Burgess
2018-04-10 20:25       ` Palmer Dabbelt
2018-04-13 12:55         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ec70ce9afe8bebbb3f0257778943d4634ea126b.1523286728.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox