Add new 'z' format for print command.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / display.exp
index b4843466cee12d6690bcf705912fbd0266ed0526..9a0b1ddb8358288d660b3e92b6cc99d226c6f496 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1997-2001, 2003, 2007-2012 Free Software Foundation, Inc.
+#   Copyright 1997-2013 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
 # display.exp   Test display commands
 #               Also do some printing stuff for coverage's sake.
 #
-if $tracelevel then {
-       strace $tracelevel
-}
-
-set testfile display
-set srcfile  ${testfile}.c
-set binfile  ${objdir}/${subdir}/${testfile}
-
+standard_testfile
 
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+        {debug nowarnings}]} {
     untested display.exp
     return -1
 }
@@ -40,11 +33,6 @@ verbose "Timeout is now $timeout seconds" 2
 # use this to debug:
 #log_user 1
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Some coverage stuff
 #
 if !$use_gdb_stub {
@@ -180,7 +168,7 @@ gdb_test "printf \"%p\\n\", 1" "0x1"
 
 # play with "print", too
 #
-gdb_test "print/z j" ".*Undefined output format.*"
+gdb_test "print/k j" ".*Undefined output format.*"
 gdb_test "print/d j" " = 0\[\\r\\n\]+"   "debug test output 1"
 gdb_test "print/r j" " = 0\[\\r\\n\]+"   "debug test output 1a"
 gdb_test "print/x j" " = 0x0\[\\r\\n\]+" "debug test output 2"
This page took 0.025115 seconds and 4 git commands to generate.