[PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64.

Luis Machado
2013-07-01T16:24:41Z

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

Hi,

The gdb.base/dump.exp test had a few failures for MIPS N64. That is
expected since SREC, IHEX and TEKHEX dump formats don't support 64-bit
addresses, and MIPS N64 uses them.

Skipping this test for MIPS is not the right thing as some ABI's are
32-bit and so should be tested against the usual set of SREC, IHEX and
TEKHEX formats.

The attached patch checks for the N64 ABI and sets the internal flag
is64bitonly accordingly, skipping the SREC, IHEX and TEKHEX tests.

Ok?

[-- Attachment #2: dump_mips.diff --]
[-- Type: text/x-patch, Size: 1048 bytes --]

2013-07-01 Luis Machado <lgustavo@codesourcery.com>

* gdb.base/dump.exp: Don't run SREC, IHEX and TEKHEX dump
tests for mips N64 ABI.

Index: gdb/testsuite/gdb.base/dump.exp
===================================================================
--- gdb/testsuite/gdb.base/dump.exp (revision 415809)
+++ gdb/testsuite/gdb.base/dump.exp (working copy)
@@ -58,6 +58,17 @@

gdb_load ${binfile}

+# Since SREC, IHEX and TEKHEX cannot handle 64-bit addresses for
+# MIPS64, stop testing if we have a 64-bit MIPS program.
+if {[istarget "mips*-*-*"]} then {
+ send_gdb "show mips abi\n"
+ gdb_expect {
+ -re ".*n64.*$gdb_prompt $" {
+ set is64bitonly "yes"
+ }
+ }
+}
+
# Clean up any stale output files from previous test runs

remote_exec build "rm -f intarr1.bin intarr1b.bin intarr1.ihex intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex intstr2.srec intstr2.tekhex intarr3.srec"