1 //----------------------------------------------------------------------------//
2 // Struct loading declarations.
4 struct StructFirstMember
{ int i
; };
5 struct StructBehindPointer
{ int i
; };
6 struct StructBehindRef
{ int i
; };
7 struct StructMember
{ int i
; };
9 StructBehindRef struct_instance
;
12 StructFirstMember
*first
;
13 StructBehindPointer
*ptr
;
15 StructBehindRef
&ref
= struct_instance
;
22 //----------------------------------------------------------------------------//
23 // Class loading declarations.
25 struct ClassMember
{ int i
; };
26 struct StaticClassMember
{ int i
; };
27 struct UnusedClassMember
{ int i
; };
28 struct UnusedClassMemberPtr
{ int i
; };
31 class ClassInNamespace
{
36 int dummy
; // Prevent bug where LLDB always completes first member.
38 static StaticClassMember static_member
;
39 UnusedClassMember unused_member
;
40 UnusedClassMemberPtr
*unused_member_ptr
;
41 int enteredFunction() {
42 return member
.i
; // Location: class function
45 StaticClassMember
ClassWeEnter::static_member
;
48 //----------------------------------------------------------------------------//
49 // Function we can stop in.
51 int functionWithOtherStruct() {
52 OtherStruct other_struct_var
;
53 other_struct_var
.member_int
++; // Location: other struct function
54 return other_struct_var
.member_int
;
57 int functionWithMultipleLocals() {
58 SomeStruct struct_var
;
59 OtherStruct other_struct_var
;
60 NS::ClassInNamespace namespace_class
;
61 other_struct_var
.member_int
++; // Location: multiple locals function
62 return other_struct_var
.member_int
;
65 int main(int argc
, char **argv
) {
69 functionWithOtherStruct();
70 functionWithMultipleLocals();