Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: gdb/testsuite/gdb.base/bitfields.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/bigcore.exp ('k') | gdb/testsuite/gdb.base/bitfields.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Test program to test bit field operations */ 1 /* Test program to test bit field operations */
2 2
3 /* For non-ANSI compilers, use plain ints for the signed bit fields. However, 3 /* For non-ANSI compilers, use plain ints for the signed bit fields. However,
4 whether they actually end up signed or not is implementation defined, so 4 whether they actually end up signed or not is implementation defined, so
5 this may cause some tests to fail. But at least we can still compile 5 this may cause some tests to fail. But at least we can still compile
6 the test program and run the tests... */ 6 the test program and run the tests... */
7 7
8 #if !defined(__STDC__) && !defined(__cplusplus) 8 #if !defined(__STDC__) && !defined(__cplusplus)
9 #define signed /**/ 9 #define signed /**/
10 #endif 10 #endif
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 /* This is used by bitfields.exp to determine if the target understands 72 /* This is used by bitfields.exp to determine if the target understands
73 signed bitfields. */ 73 signed bitfields. */
74 int i; 74 int i;
75 75
76 int main () 76 int main ()
77 { 77 {
78 /* For each member, set that member to 1, allow gdb to verify that the 78 /* For each member, set that member to 1, allow gdb to verify that the
79 member (and only that member) is 1, and then reset it back to 0. */ 79 member (and only that member) is 1, and then reset it back to 0. */
80 80
81 #ifdef usestubs
82 set_debug_traps();
83 breakpoint();
84 #endif
85 flags.uc = 1; 81 flags.uc = 1;
86 break1 (); 82 break1 ();
87 flags.uc = 0; 83 flags.uc = 0;
88 84
89 flags.s1 = -1; 85 flags.s1 = -1;
90 break1 (); 86 break1 ();
91 flags.s1 = 0; 87 flags.s1 = 0;
92 88
93 flags.u1 = 1; 89 flags.u1 = 1;
94 break1 (); 90 break1 ();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 flags.s3 = 0; 192 flags.s3 = 0;
197 flags.s9 = 0; 193 flags.s9 = 0;
198 194
199 /* Bitfields at a non-zero offset in a containing structure. */ 195 /* Bitfields at a non-zero offset in a containing structure. */
200 container.one.u3 = 5; 196 container.one.u3 = 5;
201 container.two.u3 = 3; 197 container.two.u3 = 3;
202 break5 (); 198 break5 ();
203 199
204 return 0; 200 return 0;
205 } 201 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/bigcore.exp ('k') | gdb/testsuite/gdb.base/bitfields.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698