Fix PR cli/23785: Check if file exists when invoking "restore FILE binary"
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / dump.exp
index 968554910fb044cd8574d5d7aa70da47bf7dda2a..89762b921fb53c3ce70607b059967ce63c2e7989 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2002-2015 Free Software Foundation, Inc.
+# Copyright 2002-2018 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
@@ -37,7 +37,7 @@ if {[istarget "spu*-*-*"]} then {
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
-     untested dump.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -66,10 +66,14 @@ if {${data_address} > ${max_32bit_address}} then {
 set filenames {}
 set all_files {
     intarr1.bin intarr1b.bin intarr1.ihex
-    intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex
-    intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex
-    intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex
-    intstr2.srec intstr2.tekhex intarr3.srec
+    intarr1.srec intarr1.tekhex intarr1.verilog
+    intarr2.bin intarr2b.bin intarr2.ihex
+    intarr2.srec intarr2.tekhex intarr2.verilog
+    intstr1.bin intstr1b.bin intstr1.ihex
+    intstr1.srec intstr1.tekhex intstr1.verilog
+    intstr2.bin intstr2b.bin intstr2.ihex
+    intstr2.srec intstr2.tekhex intstr2.verilog
+    intarr3.srec
 }
 
 # This loop sets variables dynamically -- each name listed in
@@ -91,18 +95,13 @@ remote_exec host "rm -f $filenames"
 # Run target program until data structs are initialized.
 
 if { ! [ runto checkpoint1 ] } then {
-    untested dump.exp
+    untested "couldn't run to checkpoint"
     return -1
 }
 
 # Get the endianness for the later use with endianless formats.
 
-gdb_test_multiple "show endian" "show endian" {
-    -re ".* (big|little) endian.*$gdb_prompt $" { 
-       set endian $expect_out(1,string) 
-       pass "endianness: $endian"
-    }
-}
+set endian [get_endianness]
 
 # Now generate some dump files.
 
@@ -147,6 +146,12 @@ make_dump_file "dump tekhex val [set intarr1.tekhex] intarray" \
 make_dump_file "dump tekhex val [set intstr1.tekhex] intstruct" \
        "dump struct as value, tekhex"
 
+make_dump_file "dump verilog val [set intarr1.verilog] intarray" \
+       "dump array as value, verilog"
+
+make_dump_file "dump verilog val [set intstr1.verilog] intstruct" \
+       "dump struct as value, verilog"
+
 proc capture_value { expression args } {
     global gdb_prompt
     global expect_out
@@ -242,6 +247,12 @@ make_dump_file "dump tekhex mem [set intarr2.tekhex] $array_start $array_end" \
 make_dump_file "dump tekhex mem [set intstr2.tekhex] $struct_start $struct_end" \
        "dump struct as memory, tekhex"
 
+make_dump_file "dump verilog mem [set intarr2.verilog] $array_start $array_end" \
+       "dump array as memory, verilog"
+
+make_dump_file "dump verilog mem [set intstr2.verilog] $struct_start $struct_end" \
+       "dump struct as memory, verilog"
+
 # test complex expressions
 make_dump_file \
     "dump srec mem [set intarr3.srec] &intarray \(char *\) &intarray + sizeof intarray" \
This page took 0.028496 seconds and 4 git commands to generate.