-# Copyright 2013-2014 Free Software Foundation, Inc.
+# Copyright 2013-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
load_lib gdb-python.exp
standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
gdb_test "python print (\"asm\" in insn)" "True" "test key asm"
gdb_test "python print (\"length\" in insn)" "True" "test key length"
-# Negative test
-gdb_test "python arch.disassemble(0, 0)" ".*gdb\.MemoryError.*" \
- "test bad memory access"
+if { ![is_address_zero_readable] } {
+ # Negative test
+ gdb_test "python arch.disassemble(0, 0)" ".*gdb\.MemoryError.*" \
+ "test bad memory access"
+}