OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [attach2.c] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
/* This program is intended to be started outside of gdb, and then
2
   attached to by gdb.  Thus, it simply spins in a loop.  The loop
3
   is exited when & if the variable 'should_exit' is non-zero.  (It
4
   is initialized to zero in this program, so the loop will never
5
   exit unless/until gdb sets the variable to non-zero.)
6
   */
7
#include <stdio.h>
8
#include <stdlib.h>
9
#include <unistd.h>
10
 
11
int  should_exit = 0;
12
 
13
int main ()
14
{
15
  int  local_i = 0;
16
 
17
  sleep( 10 ); /* System call causes register fetch to fail */
18
               /* This is a known HPUX "feature"            */
19
  while (! should_exit)
20
    {
21
      local_i++;
22
    }
23
  return (0);
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.