1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2008, 2009 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
47 SSS (int x
, const S
& r
);
51 SSS::SSS (int x
, const S
& r
) : a(x
), b(r
) { }
65 class Vbase1
: public virtual VirtualTest
{ };
66 class Vbase2
: public virtual VirtualTest
{ };
67 class Vbase3
: public virtual VirtualTest
{ };
69 class Derived
: public Vbase1
, public Vbase2
, public Vbase3
83 typedef struct string_repr
91 /* This lets us avoid malloc. */
101 typedef struct container zzz_type
;
104 make_string (const char *s
)
107 result
.whybother
.contents
= s
;
112 make_container (const char *s
)
116 result
.name
= make_string (s
);
124 add_item (zzz_type
*c
, int val
)
128 c
->elements
[c
->len
] = val
;
132 void init_s(struct s
*s
, int a
)
138 void init_ss(struct ss
*s
, int a
, int b
)
144 void do_nothing(void)
148 c
= 23; /* Another MI breakpoint */
156 string x
= make_string ("this is x");
157 zzz_type c
= make_container ("container");
158 const struct string_repr cstring
= { { "const string" } };
161 init_ss(ssa
+0, 3, 4);
162 init_ss(ssa
+1, 5, 6);
165 ns
.null_str
= "embedded\0null\0string";
180 init_s(&cpssa
[0].s
, 12);
182 init_s(&cpssa
[1].s
, 14);
192 add_item (&c
, 23); /* MI breakpoint here */
199 return 0; /* break to inspect struct and union */
This page took 0.038383 seconds and 4 git commands to generate.