From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: [commit] Fix testing for "++" in objdir
Date: Thu, 12 Oct 2006 19:04:00 -0000 [thread overview]
Message-ID: <20061012190429.GA13316@nevyn.them.org> (raw)
This fixes the remaining tests which passed an unquoted object
directory as a string where a regular expression was needed. I'm going
to try srcdir next, if it isn't too painful. Tested on x86_64-linux
and committed.
--
Daniel Jacobowitz
CodeSourcery
2006-10-12 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp.
Index: gdb.base/annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.19
diff -u -p -r1.19 annota1.exp
--- gdb.base/annota1.exp 10 Aug 2006 05:27:20 -0000 1.19
+++ gdb.base/annota1.exp 12 Oct 2006 19:02:16 -0000
@@ -147,9 +147,10 @@ gdb_expect {
# annotate-stopped
#
#exp_internal 1
+set binexp [string_to_regexp $binfile]
send_gdb "run\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
+ -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
pass "run until main breakpoint"
}
-re ".*$gdb_prompt$" {
Index: gdb.base/maint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/maint.exp,v
retrieving revision 1.26
diff -u -p -r1.26 maint.exp
--- gdb.base/maint.exp 10 Aug 2006 05:27:20 -0000 1.26
+++ gdb.base/maint.exp 12 Oct 2006 19:02:16 -0000
@@ -328,7 +328,7 @@ gdb_expect {
# Check that maint print msymbols allows relative pathnames
set mydir [pwd]
-gdb_test "cd ${objdir}" "Working directory ${objdir}\..*"
+gdb_test "cd ${objdir}" "Working directory [string_to_regexp ${objdir}]\..*"
gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}" "maint print msymbols" {
-re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
@@ -361,7 +361,7 @@ gdb_test_multiple "maint print msymbols
fail "(timeout) maint print msymbols"
}
}
-gdb_test "cd ${mydir}" "Working directory ${mydir}\..*"
+gdb_test "cd ${mydir}" "Working directory [string_to_regexp ${mydir}]\..*"
send_gdb "maint print symbols\n"
gdb_expect {
next reply other threads:[~2006-10-12 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 19:04 Daniel Jacobowitz [this message]
2006-10-12 20:24 ` Daniel Jacobowitz
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=20061012190429.GA13316@nevyn.them.org \
--to=drow@false.org \
--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