1 // RUN: %build_test_apk --driver driver-int-param --out %t --testcase %s %build_test_apk_opts
2 // RUN: %Test_jit_debuginfo %s %t
3 // DEBUGGER: source android-commands.py
4 // DEBUGGER: load-android-app %t
5 // DEBUGGER: set breakpoint pending on
6 // DEBUGGER: b %s:46
7 // DEBUGGER: run-android-app
8 // DEBUGGER: p global_zero
9 // DEBUGGER: p global_value
10 // CHECK: $1 = 0
11 // CHECK: $2 = 11
12 
13 #pragma version(1)
14 #pragma rs java_package_name(%PACKAGE%)
15 
16 // a global value
17 int global_zero = 0;
18 int global_value = 1;
19 
20 static int twenty() {
21   return 20;
22 }
23 
24 static int some_function() {
25   return twenty();
26 }
27 
28 static int foo() {
29   return some_function();
30 }
31 
32 static int bar() {
33   return foo();
34 }
35 
36 int root() {
37   return bar();
38 }
39 
40 void entry(int parameter) {
41   bar();
42   if (parameter != 0) {
43     global_value += 10;
44   } else {
45     global_zero += 1;
46   }
47   global_zero += global_value;
48 }
49