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: Re: [PATCH] A few Cygwin testsuite fixes.
Date: Sun, 10 Dec 2006 18:02:00 -0000	[thread overview]
Message-ID: <457C4B83.4010205@portugalmail.pt> (raw)
In-Reply-To: <20061210173253.GA21807@trixie.casa.cgf.cx>

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

Christopher Faylor escreveu:
> On Sun, Dec 10, 2006 at 01:43:03PM +0000, Pedro Alves wrote:
> 
> I don't have the right to approve or commit this but I have to say that
> while the logic looks ok, I don't think the name of the variable you're
> using should be "DLLEXT".  A "DLL" is generally a windows thing.  Maybe
> it should be SOEXT instead.

Thanks for taking a look.  I had considered both, but, in the end I sticked
with DLLEXT, because I felt that the 'dynamic' in DLL goes more to the point, than
'shared' in SO goes.  I can change that, no prob.

Attached is the updated/renamed patch.

Please review and commit.

---
gdb/testsuite/ChangeLog:

2006-12-10  Pedro Alves  <pedro_alves@portugalmail.pt>

    * configure.ac: Check dynamic library extension.  Pass down SOEXT.
    * configure: Regenerate.
    * Makefile.in (SOEXT): New variable.
    (just-check): Export SOEXT.
    * lib/gdb.exp ($SOEXT): Import from environment.
    * gdb.base/annota1.exp ($binfile): Append $EXEEXT.
    Expect "Loaded symbols for .*".
    * gdb.base/gdb1555.exp ($libobj): Append $SOEXT instead of ".so".
    * gdb.base/pending.exp ($lib_sl): Append $SOEXT instead of ".sl".
    * gdb.base/so-impl-ld.exp ($lib_sl): Append $SOEXT instead of ".sl".

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

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/configure.ac,v
retrieving revision 1.5
diff -u -p -r1.5 configure.ac
--- configure.ac	21 Jun 2006 13:57:21 -0000	1.5
+++ configure.ac	10 Dec 2006 13:27:07 -0000
@@ -110,6 +110,18 @@ AC_CHECK_HEADERS(pthread.h)
 
 AC_EXEEXT
 
+AC_MSG_CHECKING(for shared object extension)
+case $target in
+  *-*-cygwin* | *-*-mingw* | *-*-pe*)
+    SOEXT=".dll"
+    ;;
+  *)
+    SOEXT=".so"
+    ;;
+esac
+AC_MSG_RESULT($SOEXT)
+AC_SUBST(SOEXT)
+
 AC_OUTPUT([Makefile \
   gdb.ada/Makefile \
   gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/Makefile.in,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile.in
--- Makefile.in	21 Jun 2006 13:57:21 -0000	1.14
+++ Makefile.in	10 Dec 2006 13:27:07 -0000
@@ -33,6 +33,7 @@ target_cpu = @gdb_target_cpu@
 
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
+SOEXT = @SOEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
 ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
@@ -128,6 +129,7 @@ just-check:
 	srcdir=${srcdir} ; export srcdir ; \
 	EXPECT=${EXPECT} ; export EXPECT ; \
 	EXEEXT=${EXEEXT} ; export EXEEXT ; \
+	SOEXT=${SOEXT} ; export SOEXT ; \
         $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \
 	export $(RPATH_ENVVAR); \
 	if [ -f $${rootme}/../../expect/expect ] ; then  \
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.72
diff -u -p -r1.72 gdb.exp
--- lib/gdb.exp	10 Nov 2006 16:58:53 -0000	1.72
+++ lib/gdb.exp	10 Dec 2006 13:27:12 -0000
@@ -73,6 +73,7 @@ set fullname_syntax "($fullname_syntax_P
 
 # Needed for some tests under Cygwin.
 global EXEEXT
+global SOEXT
 global env
 
 if ![info exists env(EXEEXT)] {
@@ -81,6 +82,12 @@ if ![info exists env(EXEEXT)] {
     set EXEEXT $env(EXEEXT)
 }
 
+if ![info exists env(SOEXT)] {
+    set SOEXT ".so"
+} else {
+    set SOEXT $env(SOEXT)
+}
+
 ### Only procedures should come after this point.
 
 #
Index: gdb.base/annota1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.20
diff -u -p -r1.20 annota1.exp
--- gdb.base/annota1.exp	12 Oct 2006 19:03:22 -0000	1.20
+++ gdb.base/annota1.exp	10 Dec 2006 13:27:13 -0000
@@ -40,7 +40,7 @@ set bug_id 0
 
 set testfile "annota1"
 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 annota1.exp
@@ -150,7 +150,7 @@ gdb_expect {
 set binexp [string_to_regexp $binfile]
 send_gdb "run\n"
 gdb_expect {
-    -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$" {
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\(\r\n\r\n\032\032frames-invalid\)|\(\r\nLoaded symbols for .*\)\)+\(\(\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/gdb1555.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1555.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gdb1555.exp
--- gdb.base/gdb1555.exp	22 Jun 2006 19:53:46 -0000	1.2
+++ gdb.base/gdb1555.exp	10 Dec 2006 13:27:14 -0000
@@ -31,7 +31,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
 set libsrc "${srcdir}/${subdir}/${libfile}.c"
-set libobj "${objdir}/${subdir}/${libfile}.so"
+set libobj "${objdir}/${subdir}/${libfile}$SOEXT"
 set execsrc "${srcdir}/${subdir}/${srcfile}"
 
 remote_exec build "rm -f ${binfile}"
Index: gdb.base/pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.exp,v
retrieving revision 1.5
diff -u -p -r1.5 pending.exp
--- gdb.base/pending.exp	28 Apr 2005 23:04:28 -0000	1.5
+++ gdb.base/pending.exp	10 Dec 2006 13:27:14 -0000
@@ -37,7 +37,7 @@ set libfile "pendshr"
 set srcfile $testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$SOEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]
Index: gdb.base/so-impl-ld.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/so-impl-ld.exp,v
retrieving revision 1.7
diff -u -p -r1.7 so-impl-ld.exp
--- gdb.base/so-impl-ld.exp	29 Apr 2005 20:45:32 -0000	1.7
+++ gdb.base/so-impl-ld.exp	10 Dec 2006 13:27:15 -0000
@@ -32,7 +32,7 @@ set libfile "solib1"
 set srcfile $srcdir/$subdir/$testfile.c
 set libsrc  $srcdir/$subdir/$libfile.c
 set binfile $objdir/$subdir/$testfile
-set lib_sl  $objdir/$subdir/$libfile.sl
+set lib_sl  $objdir/$subdir/$libfile$SOEXT
 
 set lib_opts  debug
 set exec_opts [list debug shlib=$lib_sl]

  reply	other threads:[~2006-12-10 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10 13:43 Pedro Alves
2006-12-10 17:33 ` Christopher Faylor
2006-12-10 18:02   ` Pedro Alves [this message]
2006-12-16 21:30     ` Daniel Jacobowitz
2006-12-18 14:06       ` 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=457C4B83.4010205@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