summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/remote.c
blob: b297e5e86d1439a928d299b0b9a5b4d6f449801e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
#include <stdlib.h>

/************************************************************************** 
 * TESTS :
 *   -- downloading of a rather large executable
 ***************************************************************************/ 


/* A large array in .data.  If RLE compression becomes available during
   downloads, this would have to become a bunch of real random data.  
   Here's a quick way of generating such a bunch:

yes | awk '{printf ("%4d,", rand()*1000);}' | fold -w80 -s | head -4096

*/

unsigned long random_data[65536] = { 1 };

int
main() 
{
  printf ("%lu\n", random_data [rand() % 
			       (sizeof (random_data) /
			        sizeof (random_data [0]))]);
}