1#include <exception>
2#include <stdio.h>
3
4int throws_exception_on_even (int value);
5int intervening_function (int value);
6int catches_exception (int value);
7
8int
9catches_exception (int value)
10{
11 try
12 {
13 return intervening_function(value); // This is the line you should stop at for catch
14 }
15 catch (int value)
16 {
17 return value;
18 }
19}
20
21int
22intervening_function (int value)
23{
24 return throws_exception_on_even (value: 2 * value);
25}
26
27int
28throws_exception_on_even (int value)
29{
30 printf (format: "Mod two works: %d.\n", value%2);
31 if (value % 2 == 0)
32 throw 30;
33 else
34 return value;
35}
36
37int
38main ()
39{
40 catches_exception (value: 10); // Stop here
41 return 5;
42}
43

source code of lldb/test/API/lang/cpp/exceptions/exceptions.cpp