aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2001-04-05 15:31:46 +0000
committerHans-Peter Nilsson <hp@axis.com>2001-04-05 15:31:46 +0000
commit4b0d96c227925081204f8279594cbb3d6dea831c (patch)
treee3943b91405d23887f736229e4a3d1158020158a
parent0191bed77da12d7463ea3c792d33347d6d697956 (diff)
downloadgdb-4b0d96c227925081204f8279594cbb3d6dea831c.zip
gdb-4b0d96c227925081204f8279594cbb3d6dea831c.tar.gz
gdb-4b0d96c227925081204f8279594cbb3d6dea831c.tar.bz2
* lib/gas-defs.exp (run_dump_test): Support using readelf.
* config/default.exp: Default READELF and READELFFLAGS.
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/config/default.exp8
-rw-r--r--gas/testsuite/lib/gas-defs.exp11
3 files changed, 20 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 3c218e4..6e6ba06 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * lib/gas-defs.exp (run_dump_test): Support using readelf.
+ * config/default.exp: Default READELF and READELFFLAGS.
+
2001-03-31 Alan Modra <alan@linuxcare.com.au>
* gas/all/cond.s: Add .if .elseif tree.
diff --git a/gas/testsuite/config/default.exp b/gas/testsuite/config/default.exp
index 4134a03..f162d81 100644
--- a/gas/testsuite/config/default.exp
+++ b/gas/testsuite/config/default.exp
@@ -43,4 +43,12 @@ if ![info exists OBJCOPYFLAGS] then {
set OBJCOPYFLAGS {}
}
+if ![info exists READELF] then {
+ set READELF [findfile $base_dir/../../binutils/readelf]
+}
+
+if ![info exists READELFFLAGS] then {
+ set READELFFLAGS {}
+}
+
gas_init
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 9cb117f..7f98c85 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000 Free Software
+# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -242,8 +242,8 @@ proc gas_init { args } {
proc run_dump_test { name } {
global subdir srcdir
- global OBJDUMP NM AS OBJCOPY
- global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS
+ global OBJDUMP NM AS OBJCOPY READELF
+ global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
global host_triplet
if [string match "*/*" $name] {
@@ -262,6 +262,7 @@ proc run_dump_test { name } {
set opts(objdump) {}
set opts(nm) {}
set opts(objcopy) {}
+ set opts(readelf) {}
set opts(name) {}
set opts(PROG) {}
set opts(source) {}
@@ -290,6 +291,8 @@ proc run_dump_test { name } {
{ set program nm }
objcopy
{ set program objcopy }
+ readelf
+ { set program readelf }
default
{ perror "unrecognized program option $opts(PROG) in $file.d"
unresolved $subdir/$name
@@ -298,7 +301,7 @@ proc run_dump_test { name } {
} else {
# Guess which program to run, by seeing which option was specified.
set program ""
- foreach p {objdump objcopy nm} {
+ foreach p {objdump objcopy nm readelf} {
if {$opts($p) != ""} {
if {$program != ""} {
perror "ambiguous dump program in $file.d"