Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / class2.exp
index eae59223812bcb9afe0f07380db3ed86348f21af..eabb2f2931a1ee743d07a68dab4b170449835b8e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2003-2014 Free Software Foundation, Inc.
+# Copyright 2003-2016 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
@@ -101,17 +101,31 @@ gdb_test "print * (B *) abp" \
     "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
     "print * (B *) abp at marker return 0"
 
+# Print the "D" object.
+
+gdb_test "print delta" \
+    "= {.*d1 = 400}" \
+    "print delta with \"print object\" off"
+
 # Printing the value of an object containing no data fields:
 
 gdb_test "p e" "= \{<No data fields>\}" "print object with no data fields"
 
-# Printing NULL pointers with "set print object on"
+# Printing NULL pointers with "set print object on".
 
 gdb_test_no_output "set print object on"
 gdb_test "p acp" "= \\(C \\*\\) ${hex}"
 gdb_test "p acp->c1" "\\(A \\*\\) 0x0"
 gdb_test "p acp->c2" "\\(A \\*\\) ${hex}f"
 
+# Print the "D" object with "set print object on".
+# There's no difference in output, but this exercises vtable lookup
+# with a typedef'd baseclass.
+
+gdb_test "print delta" \
+    "= {.*d1 = 400}" \
+    "print delta with \"print object\" on"
+
 # Regression test for PR c++/15401.
 # Check that the type printed is a reference.
 gdb_test "p aref" " = \\(A \\&\\) .*"
This page took 0.025036 seconds and 4 git commands to generate.