This commit supplements whatis and ptype command tests for print of
const-volatile qualifiers.
gdb/testsuite/ChangeLog:
2021-11-16 Christina Schimpe <christina.schimpe@intel.com>
* gdb.cp/ptype-cv-cp.cc: New const and volatile typedef
variables.
* gdb.cp/ptype-cv-cp.exp: Add new tests.
volatile_my_int v_volatile_my_int (2);
const_volatile_my_int v_const_volatile_my_int (3);
volatile_const_my_int v_volatile_const_my_int (4);
+__attribute__((used)) const my_int v2_const_my_int (5);
+volatile my_int v2_volatile_my_int (6);
+const volatile my_int v2_const_volatile_my_int (7);
+volatile const my_int v2_volatile_const_my_int (8);
int
main ()
setup_xfail "gcc/45997" "*-*-*"
}
gdb_test "ptype v_volatile_const_my_int" "type = const volatile int"
+
+gdb_test "ptype v2_const_my_int" "type = const int"
+gdb_test "whatis v2_const_my_int" "type = const my_int"
+
+gdb_test "ptype v2_volatile_my_int" "type = volatile int"
+gdb_test "whatis v2_volatile_my_int" "type = volatile my_int"
+
+gdb_test "ptype v2_const_volatile_my_int" "type = const volatile int"
+gdb_test "whatis v2_const_volatile_my_int" "type = const volatile my_int"
+
+gdb_test "ptype v2_volatile_const_my_int" "type = const volatile int"
+gdb_test "whatis v2_volatile_const_my_int" "type = const volatile my_int"