diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/whatis.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/whatis.exp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp index dd6aeb02f91..509183e2ea4 100644 --- a/gdb/testsuite/gdb.base/whatis.exp +++ b/gdb/testsuite/gdb.base/whatis.exp @@ -282,14 +282,31 @@ gdb_test "whatis v_double_pointer" \ # test whatis command with structure types + +# First with a type argument, with both "set print object" set to "on" +# and "off", ending with "off" for the following tests. +foreach_with_prefix print_object {"on" "off"} { + gdb_test_no_output "set print object $print_object" + + gdb_test "whatis struct t_struct" \ + "type = struct t_struct" \ + "whatis named structure using type name" + + gdb_test "whatis struct t_struct *" \ + "type = struct t_struct \\*" \ + "whatis named structure using type name and pointer" + + gdb_test "whatis struct t_struct &" \ + "type = struct t_struct &" \ + "whatis named structure using type name and reference" +} + +# Now with an expression argument. + gdb_test "whatis v_struct1" \ "type = struct t_struct" \ "whatis named structure" -gdb_test "whatis struct t_struct" \ - "type = struct t_struct" \ - "whatis named structure using type name" - gdb_test "whatis v_struct2" \ "type = struct \{\.\.\.\}" \ "whatis unnamed structure" |