]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testenum.c
gdb-2.4+.aux.coff
[thirdparty/binutils-gdb.git] / gdb / testenum.c
CommitLineData
7b4ac7e1 1/* Source file for showing ENUM lossage in GDB.
2 Compile with "cc -o foo -g foo.c". */
3
4enum bar { value1, value2, value3 };
5
6struct foo {
7 enum bar enum_value;
8 int int_value;
9 char *pointer_value;
10};
11
12struct foo foo_instance;
13struct foo *foo_instance_pointer;
14
15main ()
16{
17 foo_instance_pointer = &foo_instance;
18 foo_instance.enum_value = value2;
19 foo_instance.int_value = 1;
20 foo_instance.pointer_value = "Text to make a char *";
21
22 /* In GDB, set a breakpoint at this line. Then try to change the
23 value of foo_instance.enum_value in any way. I can't do it. */
24}
25