This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFH] Cygwin (EXEEXT) fix.
Daniel Jacobowitz escreveu:
On Sun, Dec 10, 2006 at 02:37:46PM +0000, Pedro Alves wrote:
gdb_expect_list "run until main breakpoint" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
This is a TCL list. { } are quotes, like ' ' in the shell, which
prevent expansion.
Try changing it to [list "..." "..."], but you'll need to check the
quoting in every element and add backslashes at the end of every line.
Ah, I see. But shouldn't a command work too?
If not, then I don't understand is how this in
gdb.arch/altivec-regs.exp can work.
gdb_expect_list "info vector" ".*$gdb_prompt $" {
[$pattern0]
[$pattern1]
[$pattern2]
[$pattern3]
(...)
}
Or, you can just add (|\.exe) instead of $EXEEXT... much simpler.
That is what I have in my local tree, but I though that
it wouldn't be acceptable, since it feels like a hack. :)
Since it is, then please find the patch attached.
Please review and commit.
Cheers,
Pedro Alves
---
gdb/testsuite/ChangeLog:
2006-12-10 Pedro Alves <pedro_alves@portugalmail.pt>
* gdb.base/annota3.exp ($binfile): Append $EXEEXT.
Expect ".exe" extension.
Index: gdb.base/annota3.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota3.exp,v
retrieving revision 1.9
diff -u -p -r1.9 annota3.exp
--- gdb.base/annota3.exp 10 Aug 2006 05:27:20 -0000 1.9
+++ gdb.base/annota3.exp 10 Dec 2006 16:47:50 -0000
@@ -39,7 +39,7 @@ set bug_id 0
set testfile "annota3"
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
untested annota3.exp
@@ -118,7 +118,7 @@ gdb_expect_list "breakpoint info" "$gdb_
send_gdb "run\n"
gdb_expect_list "run until main breakpoint" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
- "Starting program: .*annota3 \r\n"
+ "Starting program: .*annota3(|\.exe) \r\n"
"\r\n\032\032starting\r\n"
"\r\n\032\032breakpoint 1\r\n"
"\r\n"