py-prettyprint.exp: Add is_address_zero_readable check
authorSimon Marchi <simon.marchi@ericsson.com>
Thu, 25 Jun 2015 17:33:14 +0000 (13:33 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 25 Jun 2015 17:33:14 +0000 (13:33 -0400)
gdb/testsuite/ChangeLog:

* gdb.python/py-prettyprint.exp (run_lang_tests): Add
is_address_zero_readable check.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-prettyprint.exp

index c78dd295884fd84b19b5d67c8f86dc99212d3ad8..0db8bac9358f6beed53c558e574ce472c4fcc23f 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-25  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * gdb.python/py-prettyprint.exp (run_lang_tests): Add
+       is_address_zero_readable check.
+
 2015-06-24  Peter Bergner  <bergner@vnet.ibm.com>
 
        * gdb.arch/powerpc-power.exp <rfebb>: Fixup test results.
index 399f0418b52165cd9d9d9722beb693c16496d5cf..bbcee563127d74a5aac89d56fdce746041c14e4c 100644 (file)
@@ -92,8 +92,10 @@ proc run_lang_tests {exefile lang} {
     gdb_test "print cstring" " = \"const string\""
 
     gdb_test "print estring" " = \"embedded x\\\\201\\\\202\\\\203\\\\204\""
-    gdb_test "print estring3" \
-       " = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>"
+    if { ![is_address_zero_readable] } {
+           gdb_test "print estring3" \
+               " = <error reading variable: Cannot create a lazy string with address 0x0, and a non-zero length.>"
+    }
 
     gdb_test_no_output "python pp_ls_encoding = 'UTF-8'"
     gdb_test "print estring2" "\"embedded \", <incomplete sequence \\\\302>"