[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.base / display.c
blobcd833e20d9c725fc1f050bbc3567e62fae559b66
1 /* Loop and vars for tests of display commands
2 */
3 #include <stdio.h>
4 #define LOOP 10
6 int sum = 0;
8 /* Call to force a variable onto the stack so we can see its address. */
9 void force_mem (int *arg) { }
11 int do_loops()
13 int i=0;
14 int k=0;
15 int j=0;
16 float f=3.1415;
17 int *p_i = &i;
19 for( i = 0; i < LOOP; i++ ) { /* set breakpoint 1 here */
20 for( j = 0; j < LOOP; j++ ) {
21 for( k = 0; k < LOOP; k++ ) {
22 sum++; f++; force_mem (&k);
26 return i; /* set breakpoint 2 here */
29 int do_vars()
31 int j;
32 int i = 9;
33 float f = 1.234;
34 char c = 'Q';
35 int *p_i = &i;
36 float *p_f = &f;
37 char *p_c = "rubarb and fries";
39 /* Need some code here to set breaks on.
41 for( j = 0; j < LOOP; j++ ) {
42 if( p_c[j] == c ) { /* set breakpoint 3 here */
43 j++;
45 else {
46 i++;
50 return *p_i;
53 main()
55 do_loops();
56 do_vars();