test_info_sources.cpp 524 B

12345678910111213141516171819202122232425262728293031
  1. // RUN: %clangxx %s -g -fexceptions %extra-clang-opts -o %t
  2. // RUN: %Test_jit_debuginfo %s %t
  3. // DEBUGGER: set verbose on
  4. // DEBUGGER: b __jit_debug_register_code
  5. // DEBUGGER: run
  6. // DEBUGGER: info sources
  7. // CHECK: test_info_sources.cpp
  8. // DEBUGGER: c
  9. static int function_with_a_segfault() {
  10. int* bla = 0;
  11. *bla = 5;
  12. return 0;
  13. }
  14. static int some_function() {
  15. return function_with_a_segfault();
  16. }
  17. static int foo() {
  18. return some_function();
  19. }
  20. static int bar() {
  21. return foo();
  22. }
  23. int main() {
  24. return bar();
  25. }