This is the mail archive of the gdb-patches@sourceware.org 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]

RFA: testsuite: default asm-flags and debug-flags independently


I can't figure out why asm-source.exp wants to use the absence of an
asm-flags value as a reason to provide defaults for both asm-flags and
debug-flags.  Does this seem reasonable?

gdb/testsuite/ChangeLog:
2006-01-04  Jim Blandy  <jimb@redhat.com>

	* gdb.asm/asm-source.exp: Independently provide default values for
	asm-flags and debug-flags.  Use 'string equal' to do the
	comparison, not the implicit expr's '==' operator.  Remove
	now-unneeded assignments to asm-flags.  In h8300 case, place
	"-gdwarf-2", not "-gdwarf2", in debug-flags, not asm-flags.

Index: gdb/testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.60
diff -c -p -r1.60 asm-source.exp
*** gdb/testsuite/gdb.asm/asm-source.exp	28 Dec 2005 10:36:00 -0000	1.60
--- gdb/testsuite/gdb.asm/asm-source.exp	4 Jan 2006 08:17:01 -0000
*************** switch -glob -- [istarget] {
*** 65,71 ****
      }
      "x86_64-*-*" {
          set asm-arch x86_64
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "i\[3456\]86-*-*" {
--- 65,70 ----
*************** switch -glob -- [istarget] {
*** 108,114 ****
      }
      "sh*-*-*" {
          set asm-arch sh
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "sparc-*-*" {
--- 107,112 ----
*************** switch -glob -- [istarget] {
*** 121,127 ****
      }
      "xstormy16-*-*" {
          set asm-arch xstormy16
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "v850-*-*" {
--- 119,124 ----
*************** switch -glob -- [istarget] {
*** 133,139 ****
      }
      "ia64-*-*" {
          set asm-arch ia64
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "iq2000-*-*" {
--- 130,135 ----
*************** switch -glob -- [istarget] {
*** 141,162 ****
      }
      "hppa*-linux-*" {
          set asm-arch pa
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "hppa-*-openbsd*" {
          set asm-arch pa
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "hppa64-*-hpux*" {
          set asm-arch pa64
-         set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
  	set debug-flags "-gdwarf-2"
      }
      "h83*-*" {
  	set asm-arch h8300
! 	set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
      }
  }

--- 137,155 ----
      }
      "hppa*-linux-*" {
          set asm-arch pa
  	set debug-flags "-gdwarf-2"
      }
      "hppa-*-openbsd*" {
          set asm-arch pa
  	set debug-flags "-gdwarf-2"
      }
      "hppa64-*-hpux*" {
          set asm-arch pa64
  	set debug-flags "-gdwarf-2"
      }
      "h83*-*" {
  	set asm-arch h8300
!         set debug-flags "-gdwarf-2"
      }
  }

*************** remote_download host ${srcdir}/${subdir}
*** 203,210 ****
  remote_exec build "rm -f ${subdir}/note.inc"
  remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc

! if { "${asm-flags}" == "" } {
      set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
      set debug-flags "-gstabs"
  }

--- 196,206 ----
  remote_exec build "rm -f ${subdir}/note.inc"
  remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc

! if { [string equal ${asm-flags} ""] } {
      set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ }
+
+ if { [string equal ${debug-flags} ""] } {
      set debug-flags "-gstabs"
  }


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