Use bitpos and type to lookup a gdb.Field object when its name is 'None'.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-value-cc.cc
index 59f1decb5c9fbaa33babf4130f6b37801285e586..ace957a14660ab06047f81f2f0310e4de7371f65 100644 (file)
@@ -30,8 +30,21 @@ class B : public A {
   char a;
 };
 
+struct X
+{
+  union { int x; char y; };
+  union { int a; char b; };
+};
+
+union UU
+{
+  union { int x; char y; };
+  union { int a; char b; };
+};
+
 typedef B Btd;
 typedef int *int_ptr;
+typedef X Xtd;
 
 int
 func (const A &a)
@@ -57,6 +70,16 @@ func (const A &a)
   U u;
   u.a = 99;
 
+  X x;
+  x.x = 101;
+  x.a = 102;
+
+  UU uu;
+  uu.x = 1000;
+
+  X *x_ptr = &x;
+  Xtd *xtd = &x;
+
   return 0; /* Break here.  */
 }
 
This page took 0.023292 seconds and 4 git commands to generate.