Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: [RFH] Cygwin (EXEEXT) fix.
Date: Sun, 10 Dec 2006 14:38:00 -0000	[thread overview]
Message-ID: <457C1BBA.8020802@portugalmail.pt> (raw)

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

Hi all,

(I know this is a bit offtopic here, since it has mostly to do with my 
lack of tcl knowledge.)

There is a fail on gdb.base/annota3.exp on Cygwin related to a missing 
EXEEXT that
I need help in fixing.

Where is reads '.*annota3' in:

gdb_expect_list "run until main breakpoint" "$gdb_prompt$" {
    "\r\n\032\032post-prompt\r\n"
    "Starting program: .*annota3 \r\n"
    "\r\n\032\032starting\r\n"
    "\r\n\032\032breakpoint 1\r\n"
(...)

My first approach was:
-    "Starting program: .*annota3 \r\n"
+    "Starting program: .*annota3${EXEEXT} \r\n"

But that doesn't work: The variable doesn't get expanded.

Doing:
-    "Starting program: .*annota3 \r\n"
+    "Starting program: .*annota3" [$EXEEXT] " \r\n"

... also doesn't work, much to my surprise, since I copied the syntax 
from gdb.arch/altivec-regs.exp :

(...)
gdb_expect_list "info vector" ".*$gdb_prompt $" {
[$pattern0]
[$pattern1]
(...)

I see that uppercase/lowercase makes a difference, since, if I do a:

+ set exeext ".exe"

-    "Starting program: .*annota3 \r\n"
+    "Starting program: .*annota3" [$exeext] " \r\n"

The regex always passes, no matter what I put in $exeext, even if I put 
something like "asdfad".

How does one go about fixing this?

Cheers,
Pedro Alves


[-- Attachment #2: annota3.diff --]
[-- Type: text/plain, Size: 982 bytes --]

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 14:16:17 -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" [$EXEEXT] " \r\n"
     "\r\n\032\032starting\r\n"
     "\r\n\032\032breakpoint 1\r\n"
     "\r\n"

             reply	other threads:[~2006-12-10 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10 14:38 Pedro Alves [this message]
2006-12-10 15:56 ` Daniel Jacobowitz
2006-12-10 16:54   ` Pedro Alves
2006-12-10 17:06     ` Daniel Jacobowitz
2006-12-10 17:24       ` Pedro Alves
2007-01-04 20:56     ` 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=457C1BBA.8020802@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --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