* gdb.stabs/wierd.exp: New test, for nameless baseclasses.
authorJim Kingdon <jkingdon@engr.sgi.com>
Fri, 30 Jul 1993 01:37:49 +0000 (01:37 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Fri, 30 Jul 1993 01:37:49 +0000 (01:37 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.stabs/wierd.def
gdb/testsuite/gdb.stabs/wierd.exp

index 5cbb260..03174b7 100644 (file)
@@ -1,9 +1,17 @@
+Thu Jul 29 20:33:08 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * gdb.stabs/wierd.exp: New test, for nameless baseclasses.
+
+Mon Jul 26 00:15:02 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * gdb.t06/break.exp: Also test `clear' command.
+
 Wed Jul 21 18:03:38 1993  Jim Kingdon  (kingdon@deneb.cygnus.com)
 
        * gdb.t00/teststrategy.exp: Remove extra quote.
 
        * gdb.t07/watchpoint.exp: Change xfail for calling function with
-       watchpoint enabled to "*-*-*".
+       watchpoint enabled to be for all non-68k machines.
 
        * gdb.t15/{mips_pro.{c,exp},Makefile.in}: New test.
 
index 495906a..dd2e321 100644 (file)
@@ -502,3 +502,63 @@ VAR(var2)
 /* Packed type.  */
 STAB("var3:G303=@P;1",N_GSYM, 0)
 VAR(var3)
+
+/* Manually hacked version of the following.  The manual hacking is to
+   remove the extra names (which GDB 4.9 bogusly relies on).
+
+   Virtual base classes in which there are no variables of the base
+   class types.
+
+class only_one_instance {
+ public:
+  int x;
+};
+
+class inherit_path_a : public virtual only_one_instance {
+  int a;
+};
+
+class inherit_path_b : public virtual only_one_instance {
+  int b;
+};
+
+class combine_paths : public inherit_path_a, public inherit_path_b {
+  int comb;
+};
+
+combine_paths v_comb;
+*/
+
+#if 0
+
+/* These are the unhacked stabs I started with (only change has been to
+   convert them to wierd.def format, and change the numbers to the 400
+   range.  */
+
+STAB ("only_one_instance:Tt444=s4x:1,0,32;;", N_LSYM, 0)
+STAB ("inherit_path_a:Tt445=s12!1,120,444;$vb444:446=*444,0;a:/01,32,32;;",
+      N_LSYM, 0)
+STAB ("inherit_path_b:Tt447=s12!1,120,444;$vb444:446,0;b:/01,32,32;;", N_LSYM, 0)
+STAB ("combine_paths:Tt448=s24!2,020,445;0264,447;comb:/01,128,32;;", N_LSYM, 0)
+STAB ("v_comb:G448", N_GSYM, 0)
+
+#else
+
+/* Hacked version, without class names.  Using backslash newline to
+   continue these lines doesn't work because pcc (I tested it with
+   SunOS4 /bin/cc) doesn't deal with that inside a macro argument.  */
+
+STAB ("v_comb:G448=s24!2,020,445=s12!1,120,444=s4x:1,0,32;;;$vb444:446=*444,0;a:/01,32,32;;;0264,447=s12!1,120,444;$vb444:446,0;b:/01,32,32;;;comb:/01,128,32;;", N_GSYM, 0)
+
+#endif
+
+       .globl v_comb
+       .align 1
+v_comb:
+       .long v_comb_shared /* virtual base class pointer for inherit_path_a */
+       .long 43 /* a */
+       .long v_comb_shared /* virtual base class pointer for inherit_path_b */
+       .long 44 /* b */
+       .long 45 /* comb */
+v_comb_shared:
+       .long 42 /* x */
index 33e6655..6ee0ae9 100644 (file)
@@ -170,6 +170,10 @@ field3 = 0x77888877\}" "print struct constant"
        gdb_test "p common0var1" "= 24"
        setup_xfail "*-*-*"
        gdb_test "p common0var2" "= 22"
+
+       gdb_test "p v_comb" "{<> = \
+{<> = {x = 42}, \[_a-zA-Z$\]* = \[0-9xa-fA-F\]*, a = 43}, \
+<> = {\[_a-zA-Z$\]* = \[0-9xa-fA-F\]*, b = 44}, comb = 45}"
 }
 
 proc print_wierd_var { var } {