[Lldb-commits] [PATCH] D70050: [lldb] [test] Add a test for watchpoint set error handling on NetBSD
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 11 01:43:44 PST 2019
labath added inline comments.
================
Comment at: lldb/test/Shell/Watchpoint/Inputs/thread-dbreg.c:1-23
+#include <pthread.h>
+
+int g_watchme = 0;
+
+void *thread_func(void *arg) {
+ /* watchpoint trigger from subthread */
+ g_watchme = 2;
----------------
labath wrote:
> mgorny wrote:
> > labath wrote:
> > > Maybe simplify this and remove the threads and stuff?
> > Threads are intentional since new thread handler copies dbregs per the other patch. This makes sure that new thread handler will not crash when it is unable to set dbregs.
> Hang on, isn't this test about what happens when you *cannot* set watchpoints? In that case there should be nothing to copy the dbregs from, right?
Hmm... or is it that you're testing that the act of trying to copy this "nothing" works? In that case, this might be fine, but it'd probably be worth mentioning this in the test case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70050/new/
https://reviews.llvm.org/D70050
More information about the lldb-commits
mailing list