Home | History | Annotate | Download | only in host-tests
      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 
     10 
     11 static int function_with_a_segfault() {
     12   int* bla = 0;
     13   *bla = 5;
     14   return 0;
     15 }
     16 
     17 static int some_function() {
     18   return function_with_a_segfault();
     19 }
     20 
     21 static int foo() {
     22   return some_function();
     23 }
     24 
     25 static int bar() {
     26   return foo();
     27 }
     28 
     29 int main() {
     30   return bar();
     31 }
     32