Home | History | Annotate | Download | only in test
      1 A example usage of the Python script run-until-faulted.py:
      2 
      3 [18:20:29] johnny:/Volumes/data/lldb/svn/trunk/utils/test $ ./run-until-faulted.py -l /Volumes/data/lldb/svn/trunk/build/Debug/lldb -e './a.out'
      4 lldb command: /Volumes/data/lldb/svn/trunk/build/Debug/lldb
      5 executable: ./a.out
      6 executable options: 
      7 sending file command....
      8 sending process launch --  (iteration: 0)
      9 
     10 * thread #1: tid = 0x2d03, 0x0000000100000eef a.out`main + 39 at main.c:7, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
     11    4   	{
     12    5   	    int *null_ptr = 0;
     13    6   	    printf("Hello, fault!\n");
     14 -> 7   	    printf("Now segfault %d\n", *null_ptr);
     15    8   	}
     16 
     17 (lldb) q
     18 [18:20:40] johnny:/Volumes/data/lldb/svn/trunk/utils/test $ 
     19