locals.rs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // RUN: %build_test_apk --driver driver-simple-exit --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: break locals.rs:48
  7. // DEBUGGER: run-android-app
  8. // DEBUGGER: info locals
  9. // CHECK: pf = 0x
  10. // CHECK: s = {f = 0.00100000005, f2 = {10000, 100.5}}
  11. // CHECK: us = 65535
  12. // CHECK: f = 0
  13. // CHECK: d = {{[{][{]}}0, 1}, {2, 3{{[}][}]}}
  14. // CHECK: l = 0
  15. // CHECK: result = 0
  16. // DEBUGGER: continue
  17. struct float_struct {
  18. float f;
  19. float f2[2];
  20. } compound_float;
  21. static
  22. int main(int argc, char* argv[])
  23. {
  24. float f = 0.f;
  25. float *pf = &f;
  26. double d[2][2] = {{0, 1}, {2, 3.0}};
  27. struct float_struct s;
  28. unsigned short us = -1;
  29. const unsigned long l = (unsigned long) -1.0e8f;
  30. {
  31. int** ppn = 0;
  32. if (ppn) {
  33. return -1;
  34. }
  35. }
  36. s.f = 10e-4f;
  37. s.f2[0] = 1e4f;
  38. s.f2[1] = 100.5f;
  39. double result = pf[0] * d[1][1] * s.f * us * l;
  40. return (result == 0 ? 0 : -1);
  41. }
  42. void entry() {
  43. main(0, 0);
  44. }
  45. #pragma version(1)
  46. #pragma rs java_package_name(%PACKAGE%)