The server was no longer sending the thread PCs the way the client
expected them.
I changed the server to send them back as a threadstop info field,
similar to the Apple version of the server.
I also changed the client to look for them there, before querying the
server.
I added a test to ensure the server doesn't stop sending them.
Details
Diff Detail
- Build Status
Buildable 3051 Build 3051: arc lint + arc unit
Event Timeline
Thank you for writing the test. I have a couple of cleanup suggestions. Let me know what you think.
Also, for the future, please upload a new version of the patch under the same differential revision as the previous one (so one can compare the changes, keep all the subscribers, etc.). If you're submitting using arcanist, it should amend your git commit to include the "differential revision" blurb. Then subsequent "arc diff"s should update automatically.
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py | ||
---|---|---|
86 | This makes the figuring out the return type of the function quite confusing. How about just keeping the "tuple" branch, adjusting callers (there's only 2 of them) to call the function with a tuple (possibly containing only one element)? | |
101 | this would become: stop_reply_threads_text = self.gather_stop_reply_fields( post_startup_log_lines, thread_count, ("threads"))["threads"] | |
119 | Shouldn't we just assert here? | |
298 | This should be @debugserver_test | |
source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | ||
1774 | auto iter = std::find(m_thread_ids.begin(), m_thread_ids.end(), tid); if (iter != m_thread_ids.end()) SetThreadPc(thread_sp, iter - m_thread_ids.begin()); |
Looks good. Thank you.
I am going to do the array conversion and commit this (if I am not mistaken, you don't have commit access).
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py | ||
---|---|---|
102 | Ok, this should probably be an array instead of a tuple ["threads"]. Then we can avoid the funny-looking comma. |
This makes the figuring out the return type of the function quite confusing. How about just keeping the "tuple" branch, adjusting callers (there's only 2 of them) to call the function with a tuple (possibly containing only one element)?
Maybe also rename the function to _field*s*, as it can return multiple items.