diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-07-07 16:58:20 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-07-07 16:58:20 +0100 |
commit | 4931af25b8ab8f9db77c40142d52e4513762ca97 (patch) | |
tree | b10367802fc2f055d67037bc7a220d688f42de66 /gdb/testsuite/lib | |
parent | 9fcf688e800e089217ecc8a47b228be180866df8 (diff) | |
download | gdb-4931af25b8ab8f9db77c40142d52e4513762ca97.zip gdb-4931af25b8ab8f9db77c40142d52e4513762ca97.tar.gz gdb-4931af25b8ab8f9db77c40142d52e4513762ca97.tar.bz2 |
New proc is_aarch64_target
Some tests expect the the target is aarch64, but checking target
triplet is not accurate, because target triplet can be aarch64 but
the program is in arm (or aarch32) state.
This patch addes a new proc is_aarch64_target which returns true
if the target is on aarch64 state.
gdb/testsuite:
2015-07-07 Yao Qi <yao.qi@linaro.org>
* gdb.arch/aarch64-atomic-inst.exp: Check is_aarch64_target
instead of istarget "aarch64*-*-*".
* gdb.arch/aarch64-fp.exp: Likewise.
* gdb.base/float.exp: Likewise.
* gdb.reverse/aarch64.exp: Likewise.
* lib/gdb.exp (is_aarch64_target): New proc.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e8ae08c..0805de9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2308,6 +2308,16 @@ gdb_caching_proc is_aarch32_target { return 1 } +# Return 1 if this target is an aarch64, either lp64 or ilp32. + +proc is_aarch64_target {} { + if { ![istarget "aarch64*-*-*"] } { + return 0 + } + + return [expr ![is_aarch32_target]] +} + # Return 1 if displaced stepping is supported on target, otherwise, return 0. proc support_displaced_stepping {} { |