1#include <stdio.h>
2
3class Base1 {
4public:
5 virtual ~Base1() {}
6};
7
8class Base2 {
9public:
10 virtual void doit() = 0;
11 virtual void doit_debug() = 0;
12};
13
14Base2 *b;
15
16class Derived1 : public Base1, public Base2 {
17public:
18 virtual void doit() { printf(format: "Derived1\n"); }
19 virtual void __attribute__((nodebug)) doit_debug() {
20 printf(format: "Derived1 (no debug)\n");
21 }
22};
23
24class Derived2 : public Base2 {
25public:
26 virtual void doit() { printf(format: "Derived2\n"); }
27 virtual void doit_debug() { printf(format: "Derived2 (debug)\n"); }
28};
29
30void testit() { b->doit(); }
31
32void testit_debug() {
33 b->doit_debug();
34 printf(format: "This is where I should step out to with nodebug.\n"); // Step here
35}
36
37int main() {
38
39 b = new Derived1();
40 testit();
41 testit_debug();
42
43 b = new Derived2();
44 testit();
45 testit_debug();
46
47 return 0;
48}
49

source code of lldb/test/API/lang/cpp/thunk/main.cpp