aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/annota2.cc
blob: f8a25f94d5e582cef24639322674a4a18ec94950 (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
27
#include <stdio.h>

class A {
public:
  int x;
  int y;
  int foo (int arg);
};


int A::foo (int arg)
{
  x += arg;
  return arg *2;
}

int main()
{
  A a;

  a.x = 1;
  a.y = 2;

  printf ("a.x is %d\n", a.x);
  return 0;
}