old-cross-binutils/gdb/testsuite/gdb.base/annota3.c
Thomas Schwinge 2c8910ba4a gdb/testsuite/
* gdb.base/annota1.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota1.c: Provide suitable markers.
	* gdb.base/annota3.exp: Use gdb_get_line_number for retrieving line
	numbers instead of hardcoding them.
	* gdb.base/annota3.c: Provide suitable markers.
2012-02-28 22:40:48 +00:00

47 lines
548 B
C

#include <stdio.h>
#include <signal.h>
#ifdef PROTOTYPES
void
handle_USR1 (int sig)
{
}
#else
void
handle_USR1 (sig)
int sig;
{
}
#endif
int value;
#ifdef PROTOTYPES
int
main (void)
#else
int
main ()
#endif
{
int my_array[3] = { 1, 2, 3 }; /* break main */
value = 7;
#ifdef SIGUSR1
signal (SIGUSR1, handle_USR1);
#endif
printf ("value is %d\n", value);
printf ("my_array[2] is %d\n", my_array[2]);
{
int i;
for (i = 0; i < 5; i++)
value++; /* increment value */
}
return 0; /* after loop */
}