There are a few test cases in TestMultithreaded.py. Most of them set a breakpoint by name on "next". There's no problem with doing that, but one of the tests cases in particular relies on being able to grab a specific breakpoint location corresponding to the test inferior. If you have libc++ symbols, this test will also have breakpoint locations for symbols named `next` in libc++. I could have changed the test to find the correct `next` breakpoint location, but it seems easier to give it a more uncommon name instead.
16 lines
194 B
C++
16 lines
194 B
C++
|
|
#include <iostream>
|
|
|
|
int next() {
|
|
static int i = 0;
|
|
std::cout << "incrementing " << i << std::endl;
|
|
return ++i;
|
|
}
|
|
|
|
int main() {
|
|
int i = 0;
|
|
while (i < 5)
|
|
i = next();
|
|
return 0;
|
|
}
|