From c906108c21474dfb4ed285bcc0ac6fe02cd400cc Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 16 Apr 1999 01:35:26 +0000 Subject: Initial creation of sourceware repository --- gdb/testsuite/gdb.hp/attach.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gdb/testsuite/gdb.hp/attach.c (limited to 'gdb/testsuite/gdb.hp/attach.c') diff --git a/gdb/testsuite/gdb.hp/attach.c b/gdb/testsuite/gdb.hp/attach.c new file mode 100644 index 0000000..1aad3c1 --- /dev/null +++ b/gdb/testsuite/gdb.hp/attach.c @@ -0,0 +1,19 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop + is exited when & if the variable 'should_exit' is non-zero. (It + is initialized to zero in this program, so the loop will never + exit unless/until gdb sets the variable to non-zero.) + */ +#include + +int should_exit = 0; + +main () +{ + int local_i = 0; + + while (! should_exit) + { + local_i++; + } +} -- cgit v1.1