Commit c68cf6dc authored by hjk's avatar hjk Committed by hjk

debugger: add example code for multiple sub-breakpoints to test

Change-Id: Ifa12a6124d37a29a9e294ed14c8a7433c24cafa3
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 90373b8e
...@@ -112,6 +112,32 @@ namespace breakpoints { ...@@ -112,6 +112,32 @@ namespace breakpoints {
SomeTemplatedDerivedClassWithInlineConstructor<T>:: SomeTemplatedDerivedClassWithInlineConstructor<T>::
~SomeTemplatedDerivedClassWithInlineConstructor() {} ~SomeTemplatedDerivedClassWithInlineConstructor() {}
struct X : virtual SomeClassWithInlineConstructor
{
X() { a = 1; }
};
struct Y : virtual SomeClassWithInlineConstructor
{
Y() { a = 2; }
};
struct Z : X, Y
{
Z() : SomeClassWithInlineConstructor(), X(), Y() {}
};
template <class T> T twice(T t)
{
return 2 * t;
}
template <class T> struct Twice
{
Twice(T t) { t_ = 2 * t; }
T t_;
};
void testBreakpoints() void testBreakpoints()
{ {
SomeClassWithInlineConstructor a; SomeClassWithInlineConstructor a;
...@@ -120,9 +146,13 @@ namespace breakpoints { ...@@ -120,9 +146,13 @@ namespace breakpoints {
SomeTemplatedClassWithInlineConstructor<int> d; SomeTemplatedClassWithInlineConstructor<int> d;
SomeTemplatedBaseClassWithInlineConstructor<int> e; SomeTemplatedBaseClassWithInlineConstructor<int> e;
SomeTemplatedDerivedClassWithInlineConstructor<int> f; SomeTemplatedDerivedClassWithInlineConstructor<int> f;
Z z;
int aa = twice(1);
int bb = twice(1.0);
// <=== Break here. // <=== Break here.
dummyStatement(&a, &b, &c); Twice<int> cc = Twice<int>(1);
dummyStatement(&d, &e, &f); Twice<float> dd = Twice<float>(1.0);
dummyStatement(&a, &b, &c, &d, &e, &f, &z, bb, aa, cc, dd);
} }
} // namespace breakpoints } // namespace breakpoints
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment