[Lldb-commits] [PATCH] D131605: [lldb][tests] Test queue-specific breakpoints

Chelsea Cassanova via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 12 11:54:42 PDT 2022


cassanova added inline comments.


================
Comment at: lldb/test/API/macosx/queues/TestQueues.py:133
+                        "The breakpoint for queue %s has not been hit" % (queue_breakpoint.GetQueueName()))
+        self.assertEqual(queue1_thread.GetStopReason(), 3,
+                         "Queue %s is not stopped at breakpoint %d" %
----------------
mib wrote:
> Could you replace that with the enum variable ?
Yes the enum variable would be better here


================
Comment at: lldb/test/API/macosx/queues/TestQueues.py:388
+        # to be the name of the main thread
+        queue_breakpoint = lldbutil.run_to_name_breakpoint(self, "stopper", only_one_thread=False)[3]
+        queue_breakpoint.SetQueueName(main_thread.GetQueue().GetName())
----------------
mib wrote:
> Do you really need a `main_thread` variable since `lldbutil.run_to_name_breakpoint` would return a tuple with `(target, process, thread, bkpt)` ? Is the thread returned here different from the `main_thread` you created above ?
The thread is the same actually, so it would probably be beneficial to just get the thread from `run_to_name_breakpoint` instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131605/new/

https://reviews.llvm.org/D131605



More information about the lldb-commits mailing list