This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] update gdb.base/pending.exp to use new shared library infrastructure


On Wednesday 27 April 2005 08:49, Daniel Jacobowitz wrote:
> On Tue, Apr 19, 2005 at 04:31:02PM -0800, Paul Gilliam wrote:
> > On Thursday 14 April 2005 12:26, Daniel Jacobowitz wrote:
> > > On Wed, Apr 13, 2005 at 10:10:39AM -0800, Paul Gilliam wrote:
> > > > This patch updates gdb.base/shreloc.exp to use the new shared library infrastructure in
> > > > lib/gdb.exp.  All the stuff that has been cut from shlib-call.exp is now part of 'gdb-compile'
> > > > or 'gdb-compile-shlib' (new) in lib/gdb.exp.
> > > > 
> > > > This patch depends on the shared infrastructure patch:
> > > >         http://sources.redhat.com/ml/gdb-patches/2005-04/msg00096.html
> > > > 
> > > > -=# Paul #=-
> > > > 
> > > > 2005-04-13  Paul Gilliam  <pgilliam@us.ibm.com>
> > > > 
> > > >         * gdb.base/pending.exp: Change to use new shared library infrastructure and update
> > > >         copyright date.
> > > 
> > > OK, with the same caveats - ChangeLog wrapping and indentation. 
> > > Thanks for doing this.
> > > 
> > > 
> > Here's the new version of the patch:
> > 
> > 2005-04-19  Paul Gilliam  <pgilliam@us.ibm.com>
> > 
> >         * gdb.base/pending.exp: Change to use new shared library infrastructure
> >         and update copyright date.
> 
> This patch is OK.  Thanks.
> 

Here is the patch as commited:

2005-04-28  Paul Gilliam  <pgilliam@us.ibm.com>
  
	* gdb.base/pending.exp: Change to use new shared library
	infrastructure.

Index: gdb.base/pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pending.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 pending.exp
*** gdb.base/pending.exp	5 May 2004 21:18:11 -0000	1.4
--- gdb.base/pending.exp	28 Apr 2005 23:02:21 -0000
***************
*** 1,4 ****
! #   Copyright 2003, 2004
  #   Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
--- 1,4 ----
! #   Copyright 2003, 2004, 2005
  #   Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
***************
*** 15,26 ****
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
  
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
- 
  # This file was created by Jeff Johnston. (jjohnstn@redhat.com)
- # The shared library compilation portion was copied from shlib-call.exp which was
- # written by Elena Zannoni (ezannoni@redhat.com).
  
  if $tracelevel then {
      strace $tracelevel
--- 15,21 ----
*************** if ![isnative] then {
*** 39,102 ****
  
  set testfile "pending"
  set libfile "pendshr"
! set srcfile ${testfile}.c
! set binfile ${objdir}/${subdir}/${testfile}
  
  if [get_compiler_info ${binfile}] {
      return -1
  }
  
! if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } {
!      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
! }
! 
! # Build the shared libraries this test case needs.
! #
! 
! if {$gcc_compiled == 0} {
!     if [istarget "hppa*-hp-hpux*"] then {
! 	set additional_flags "additional_flags=+z"
!     } elseif { [istarget "mips-sgi-irix*"] } {
! 	# Disable SGI compiler's implicit -Dsgi
! 	set additional_flags "additional_flags=-Usgi"
!     } else {
! 	# don't know what the compiler is...
! 	set additional_flags ""
!     }
! } else {
!     if { ([istarget "powerpc*-*-aix*"]
!        || [istarget "rs6000*-*-aix*"]) } {
! 	set additional_flags ""
!     } else {
! 	set additional_flags "additional_flags=-fpic"
!     }
! }
! 
! if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.o" object [list debug $additional_flags]] != ""} {
!      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
! }
! 
! if [istarget "hppa*-*-hpux*"] {
!     remote_exec build "ld -b ${objdir}/${subdir}/${libfile}.o -o ${objdir}/${subdir}/${libfile}.sl"
! } else {
!     set additional_flags "additional_flags=-shared"
!     if {[gdb_compile "${objdir}/${subdir}/${libfile}.o" "${objdir}/${subdir}/${libfile}.sl" executable [list debug $additional_flags]] != ""} {
! 	gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
!     }
  }
  
! if { ($gcc_compiled 
!       &&  ([istarget "powerpc*-*-aix*"]
! 	|| [istarget "rs6000*-*-aix*"] )) } {
!     set additional_flags "additional_flags=-L${objdir}/${subdir}"
! } elseif { [istarget "mips-sgi-irix*"] } {
!     set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
! } else {
!     set additional_flags ""
! }
! if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.sl" "${binfile}" executable [list debug $additional_flags]] != ""} {
!      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
! }
  
  gdb_exit
  gdb_start
--- 34,58 ----
  
  set testfile "pending"
  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_opts  debug
! set exec_opts [list debug shlib=$lib_sl]
  
  if [get_compiler_info ${binfile}] {
      return -1
  }
  
! if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
!      || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
!     untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
!     return -1
  }
  
! # Start with a fresh gdb.
  
  gdb_exit
  gdb_start


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]