-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-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
proc run_lang_tests {exefile lang} {
global srcdir subdir srcfile testfile hex
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
- untested "Couldn't compile ${srcfile} in $lang mode"
+ untested "couldn't compile ${srcfile} in $lang mode"
return -1
}
gdb_test "print cstring" " = \"const string\""
gdb_test "print estring" " = \"embedded x\\\\201\\\\202\\\\203\\\\204\""
+ 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>"
gdb_continue_to_end
}
-run_lang_tests "${binfile}" "c"
-run_lang_tests "${binfile}-cxx" "c++"
+if { [run_lang_tests "${binfile}" "c"] == -1 } {
+ return
+}
+if { [run_lang_tests "${binfile}-cxx" "c++"] == -1 } {
+ return
+}
# Run various other tests.