[Lldb-commits] [PATCH] D11519: [MIPS] Use qfThreadID if qC packet is not supported by target

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 10 09:36:29 PDT 2015

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

I don't see how passing the target architecture's OS helps here since you aren't checking it for linux or any of the other OS's where pid == tid. This arch is likely to be unset during many of these calls which makes the test just assume any time the OS is unknown it will just assume pid == tid.

Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1463-1465
@@ +1462,5 @@
+        // If we don't get a response for $qC, check if $qfThreadID gives us a result.
+        if (m_curr_pid == LLDB_INVALID_PROCESS_ID && ostype == llvm::Triple::UnknownOS)
+        {
+            std::vector<lldb::tid_t> thread_ids;
How does checking the "ostype" with unknown help us to determine if this is an OS where pid == tid? What if the user makes their target with:

(lldb) target create --arch x86_64-pc-linux ...

Then this code doesn't trigger?



More information about the lldb-commits mailing list