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]

Improve testsuite handling of i?86-* 64-bit multilibs


Just as x86_64-* targets may have both 32-bit and 64-bit (and x32)
multilibs, so may i?86-* targets, the difference between the two just
being the default with no special compiler options.  This is handled
in the i[34567]86-*-linux* target in configure.tgt, for example (if
--enable-64-bit-bfd then the 64-bit target is enabled).

This patch fixes two testsuite functions to handle this rather than
assuming i?86-* is always 32-bit.  Tested on i686-pc-linux-gnu (-m64,
using gdbserver because that enables the gdb.trace tests that are the
main use of these functions).  OK to commit?

2011-09-28  Joseph Myers  <joseph@codesourcery.com>

	* lib/gdb.exp (is_amd64_regs_target, is_x86_like_target): Allow
	for 64-bit multilibs from i?86-* targets.

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.187
diff -u -r1.187 gdb.exp
--- lib/gdb.exp	22 Sep 2011 04:58:22 -0000	1.187
+++ lib/gdb.exp	28 Sep 2011 20:57:37 -0000
@@ -1626,7 +1626,7 @@
 proc is_amd64_regs_target {} {
     global is_amd64_regs_target_saved
 
-    if {![istarget "x86_64-*-*"]} {
+    if {![istarget "x86_64-*-*"] && ![istarget "i?86-*"]} {
 	return 0
     }
 
@@ -1665,10 +1665,7 @@
 
 # Return 1 if this target is an x86 or x86-64 with -m32.
 proc is_x86_like_target {} {
-    if {[istarget i?86-*]} {
-	return 1
-    }
-    if {![istarget "x86_64-*-*"]} {
+    if {![istarget "x86_64-*-*"] && ![istarget i?86-*]} {
 	return 0
     }
     return [expr [is_ilp32_target] && ![is_amd64_regs_target]]

-- 
Joseph S. Myers
joseph@codesourcery.com


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