[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon May 4 04:14:25 PDT 2020
labath added a comment.
The test setup here seems unnecessarily complex. Wouldn't an inferior like this work better?
void thread1() {
pseudo_barrier_wait(g_barrier); // See other tests how this works.
g_foo = 0; // break_here
}
int main() {
pseudo_barrier_init(g_barrier1, 2);
std::thread t1(thread1);
pseudo_barrier_wait(g_barrier);
for (int i = 0; i<10000; ++i) g_bar = i; // empty loop to have something to step over
t1.join();
}
That way you always know only one thread will hit a breakpoint, and and you can just pick the "other" thread as the target for stepping.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79308/new/
https://reviews.llvm.org/D79308
More information about the lldb-commits
mailing list