Index: gdb/testsuite/gdb.xml/maint_print_struct.exp |
diff --git a/gdb/testsuite/gdb.go/unsafe.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp |
similarity index 52% |
copy from gdb/testsuite/gdb.go/unsafe.exp |
copy to gdb/testsuite/gdb.xml/maint_print_struct.exp |
index eb536b2d841cf5d6e6ffecbdfc462487795ecb43..568d1740e825dbb0d5f685675041081fa7fb29b6 100644 |
--- a/gdb/testsuite/gdb.go/unsafe.exp |
+++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp |
@@ -1,6 +1,8 @@ |
# This testcase is part of GDB, the GNU debugger. |
- |
-# Copyright 2012 Free Software Foundation, Inc. |
+# |
+# Copyright 2013 Free Software Foundation, Inc. |
+# |
+# Contributed by Intel Corp. <walfred.tedeschi@intel.com> |
# |
# 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 |
@@ -15,29 +17,19 @@ |
# You should have received a copy of the GNU General Public License |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
-# Test package "unsafe". |
- |
-load_lib "go.exp" |
- |
-if { [skip_go_tests] } { continue } |
- |
-standard_testfile .go |
- |
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } { |
+if {[gdb_skip_xml_test]} { |
+ unsupported "maint_print_struct.exp" |
return -1 |
} |
-set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] |
+gdb_start |
-if { [go_runto_main] < 0 } { |
- untested $testfile |
- return -1 |
-} |
- |
-if { [gdb_breakpoint ${srcfile}:${bp_location1}] } { |
- pass "setting breakpoint 1" |
-} |
- |
-gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "Going to first breakpoint" |
+# Required registers are not present so it is expected a warning. |
+# |
+gdb_test "set tdesc filename $srcdir/$subdir/maint_print_struct.xml" " |
+warning:.*" "setting a new tdesc having only a structure" |
-gdb_test "print unsafe.Sizeof(42)" ".* = 4" |
+gdb_test "maint print c-tdesc" " |
+.*tdesc_create_reg \\(feature, \"bad_reg1\", \[0-9\]+, 1, NULL, 128, \"two_fielded\"\\);\r |
+.*tdesc_create_reg \\(feature, \"bad_reg2\", \[0-9\]+, 1, NULL, 64, \"bitfield\"\\);\r |
+.*" "printing tdesc with a structure and a bitfield" |