OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [gdb/] [testsuite/] [gdb.python/] [py-inferior.c] - Blame information for rev 341

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
#include <stdio.h>
2
#include <stdlib.h>
3
#include <stdint.h>
4
#include <string.h>
5
 
6
#define CHUNK_SIZE 16000 /* same as findcmd.c's */
7
#define BUF_SIZE (2 * CHUNK_SIZE) /* at least two chunks */
8
 
9
int8_t int8_search_buf[100];
10
int16_t int16_search_buf[100];
11
int32_t int32_search_buf[100];
12
int64_t int64_search_buf[100];
13
 
14
static char *search_buf;
15
static int search_buf_size;
16
 
17
 
18
int f2 (int a)
19
{
20
  char *str = "hello, testsuite";
21
 
22
  puts (str);   /* Break here.  */
23
 
24
  return ++a;
25
}
26
 
27
int f1 (int a, int b)
28
{
29
  return f2(a) + b;
30
}
31
 
32
static void
33
init_bufs ()
34
{
35
  search_buf_size = BUF_SIZE;
36
  search_buf = malloc (search_buf_size);
37
  if (search_buf == NULL)
38
    exit (1);
39
  memset (search_buf, 'x', search_buf_size);
40
}
41
 
42
int main (int argc, char *argv[])
43
{
44
  init_bufs ();
45
 
46
  return f1 (1, 2);
47
}

powered by: WebSVN 2.1.0

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