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]

More gdb.hp fixups




This patch makes those tests which are dependent on being built with
HP's compiler only run when we're actually using HP's compiler.

Those tests which could easily be made to build with GCC have been
updated to build with GCC.  This results in additional tests being
run -- some of which fail (of course).

I'm suspect this is the last bit of "major" surgery in gdb.hp for now;
the various FAILs in gdb.hp probably represent real bugs in GDB.

Per Fernando's message, I'm checking in this patch.

        * gdb.hp/gdb.defects/bs15503.exp: Only run this test if compiling
        with HP's compiler.
	* gdb.hp/gdb.objdbg/objdbg01.exp: Likewise.
	* gdb.hp/gdb.objdbg/objdbg02.exp: Likewise.
	* gdb.hp/gdb.objdbg/objdbg03.exp: Likewise.
	* gdb.hp/gdb.objdbg/objdbg04.exp: Likewise.

        * gdb.hp/gdb.defects/solib-d.exp: Update to handle building with
        either HP's compilers or GCC.

Index: gdb.defects/bs15503.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp,v
retrieving revision 1.1.350.1
diff -c -3 -p -r1.1.350.1 bs15503.exp
*** bs15503.exp	2001/12/19 20:52:17	1.1.350.1
--- bs15503.exp	2001/12/21 00:27:43
*************** set testfile "bs15503"
*** 27,32 ****
--- 27,44 ----
  set srcfile ${testfile}.cc
  set binfile ${objdir}/${subdir}/${testfile}
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1
+ }
+ 
+ # The testcode is non-conforming and rejected by GCC.  So bypass this
+ # test completely unless we're compiling with HP's compiler.
+ if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+   return 0
+ }
+     
  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable 
"debug c++"] != "" } {
      perror "Couldn't compile ${srcfile}"
      return -1
Index: gdb.defects/solib-d.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 solib-d.exp
*** solib-d.exp	1999/08/10 01:54:33	1.1
--- solib-d.exp	2001/12/21 00:27:43
*************** set testfile2 ${objdir}/${subdir}/${test
*** 75,90 ****
  set libfile1 ${objdir}/${subdir}/${testfile}1.sl
  set libfile2 ${objdir}/${subdir}/${testfile}2.sl
  
  # Build the shared libraries this test case needs.
  #
  #cd ${subdir}
  
! if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object 
{debug additional_flags=+z}] != "" } {
      perror "Couldn't compile ${testfile}1.c"
      return -1
  }
  
! if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object 
{debug additional_flags=+z}] != ""} {
      perror "Couldn't compile ${testfile}2.c"
      return -1
  }
--- 75,106 ----
  set libfile1 ${objdir}/${subdir}/${testfile}1.sl
  set libfile2 ${objdir}/${subdir}/${testfile}2.sl
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1;
+ }
+ 
+ # set up appropriate compile option to recognize long double
+ if {$hp_aCC_compiler || $hp_cc_compiler} {
+     set picflag "+z"
+     set ansiflag "-Ae"
+ } else {
+     set picflag "-fpic"
+     set ansiflag ""
+ }
+ 
+ 
  # Build the shared libraries this test case needs.
  #
  #cd ${subdir}
  
! if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object 
"{debug additional_flags=${picflag}}"] != "" } {
      perror "Couldn't compile ${testfile}1.c"
      return -1
  }
  
! if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object 
"{debug additional_flags=${picflag}}"] != ""} {
      perror "Couldn't compile ${testfile}2.c"
      return -1
  }
*************** remote_exec build "ld -b ${testfile2} -o
*** 94,100 ****
  
  # Build the test case
  
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" 
"${binfile}" executable {debug additional_flags=-Ae -Wl,-aarchive}] != "" } {
      perror "Couldn't build ${binfile}"
      return -1
  }
--- 110,116 ----
  
  # Build the test case
  
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" 
"${binfile}" executable "{debug additional_flags=${ansiflag} -Wl,-aarchive}"] 
!= "" } {
      perror "Couldn't build ${binfile}"
      return -1
  }
Index: gdb.objdbg/objdbg01.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp,v
retrieving revision 1.1.350.1
diff -c -3 -p -r1.1.350.1 objdbg01.exp
*** objdbg01.exp	2001/12/19 20:52:17	1.1.350.1
--- objdbg01.exp	2001/12/21 00:27:43
*************** set objdbgdir ${objdir}/${subdir}/objdbg
*** 14,19 ****
--- 14,29 ----
  set binfile ${objdbgdir}/${testfile}
  set symaddrfile ${toolssubdir}/symaddr
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1
+ }
+ 
+ if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+   return 0
+ }
+ 
  if { [gdb_compile "${toolssubdir}/test-objdbg.cc" 
"${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdi
r} +objdebug}"] != "" } {
      gdb_suppress_entire_file "WARNING: +objdebug option is not supported in 
this compiler version, test ignored."
  }
Index: gdb.objdbg/objdbg02.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp,v
retrieving revision 1.1.350.1
diff -c -3 -p -r1.1.350.1 objdbg02.exp
*** objdbg02.exp	2001/12/19 20:52:17	1.1.350.1
--- objdbg02.exp	2001/12/21 00:27:43
*************** set objdbgdir ${objdir}/${subdir}/objdbg
*** 13,18 ****
--- 13,28 ----
  set binfile ${objdbgdir}/${testfile}
  set toolssubdir ${srcdir}/${subdir}/tools
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1
+ }
+ 
+ if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+   return 0
+ }
+ 
  if { [gdb_compile "${toolssubdir}/test-objdbg.cc" 
"${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdi
r} +objdebug}"] != "" } {
      gdb_suppress_entire_file "WARNING: +objdebug option is not supported in 
this compiler version, test ignored."
  }
Index: gdb.objdbg/objdbg03.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp,v
retrieving revision 1.1.350.1
diff -c -3 -p -r1.1.350.1 objdbg03.exp
*** objdbg03.exp	2001/12/19 20:52:17	1.1.350.1
--- objdbg03.exp	2001/12/21 00:27:43
*************** if [istarget "hppa64-*-*"] {
*** 18,23 ****
--- 18,33 ----
    set symaddrfile ${toolssubdir}/symaddr
  }
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1
+ }
+ 
+ if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+   return 0
+ }
+ 
  if { [gdb_compile "${toolssubdir}/test-objdbg.cc" 
"${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdi
r} +objdebug}"] != "" } {
      gdb_suppress_entire_file "WARNING: +objdebug option is not supported in 
this compiler version, test ignored."
  }
Index: gdb.objdbg/objdbg04.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 objdbg04.exp
*** objdbg04.exp	1999/08/10 01:54:33	1.1
--- objdbg04.exp	2001/12/21 00:27:43
*************** set binfile ${objdbgdir}/${testfile}
*** 14,19 ****
--- 14,29 ----
  set toolssubdir ${srcdir}/${subdir}/tools
  set symaddrfile ${toolssubdir}/symaddr
  
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1
+ }
+ 
+ if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+   return 0
+ }
+ 
  if { [gdb_compile "${toolssubdir}/test-objdbg.cc" 
"${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdi
r} +objdebug}"] != "" } {
      gdb_suppress_entire_file "WARNING: +objdebug option is not supported in 
this compiler version, test ignored."
  }







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