- User Since
- Aug 8 2019, 10:01 AM (87 w, 2 d)
Mar 9 2021
We'll still need to be careful about using this functionality on the lldb side though. This fix will only help if there is proper synchronization between using this function and libedit initialization
Feb 7 2021
Feb 5 2021
As discussed in the vAttachWait patch (https://reviews.llvm.org/D93895), I've implemented a jAttachWait packet with supports two additional parameters (polling interval and polling duration) when attaching to a process by name and waiting for it to appear.
Feb 1 2021
Jan 22 2021
This is the second (and better) solution that addresses this issue. Previous discussions can be found here.
@labath sorry for the repeated messages. I believe this is ready to be merged, right?
@labath, you were absolutely correct! It was simply a matter of saving and restoring the terminal struct on the terminalHasColors function in the Process.inc file (I really should've tried that before). I'm currently recompiling and will re-run the tests locally, and will push the changes after that. I do worry this could potentially impact macOS though (I don't know if these low-level terminal functions work differently between differently OSes), so how do we ensure this doesn't break anything there?
Jan 21 2021
Jan 20 2021
Jan 14 2021
Addresses comments, includes tests.
Jan 12 2021
Jan 10 2021
Looks good, modulo the inline comment.
Jan 6 2021
Changes test to launch a process before and after we ask for the attach. Minor code fixes as well.
Back to implementation of vAttachWait
I don't think it's a good idea to stuff all of this into a single patch. Can we go back to the version which just implements the basic vAttachWait packet (we can bikeshed on what the default interval should be)? I believe new commands/options/packets should be done in separate patches...
Ok, that makes sense!
Jan 5 2021
I think I get your point. If we pass the extra options in the packet, the validation on older lldb-server versions will reject the message.
Here lies the problem that I mentioned above. I would like to avoid having to launch lldb-server with any arguments so that we continue to work with older lldb-servers.
So it might be nice to add support for vAttachOrWait, along with the query packet, in this patch if you have the time?
Question: why does lldb queries if vAttachOrWait is supported, but not vAttachWait? Does it make sense to keep this query? Or should I remove it?
@clayborg I've added support for the 'waitfor-interval' and 'waitfor-duration' flags. Yesterday I thought they existed in macOS, but now I'm not so sure, as I couldn't find them on "Options.td". They were added in 2009, so maybe they did exist but were dropped later. Or I just didn't look at the right place.
Adds support to 'vAttachOrWait', as well as the 'waitfor-interval' and 'waitfor-duration' flags.
Jan 4 2021
Jan 2 2021
Fix issues pointed out in comments left in previous patch, and clean the code a bit
Jan 1 2021
Hi @labath. Ok, I believe the test is passing now. Thank you for all the help today!
Re-include deleted files.
Hi @labath. I see! I changed it to lldbgdbserverutils.gdbremote_hex_encode_string. Looking at the logs, I found that the checksum I inserted was wrong, so I've corrected that as well (is there a way I can calculate the checksum on the test, instead of hard-coding it in the string?). Despite these changes, I still get the same error (ConnectionResetError: [Errno 104] Connection reset by peer on line 46).
Dec 29 2020
Fix formatting issues