[Lldb-commits] [PATCH] D96176: Implement jAttachWait
Augusto Noronha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 5 13:43:01 PST 2021
augusto2112 added a comment.
Herald added a subscriber: JDevlieghere.
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.
`jAttachWait` send a json packet of the format: `{"process_name": string, "include-existing: bool, "waitfor-interval-usec": microseconds, waitfor-duration-sec: seconds}` where `waitfor-interval-usec` and `waitfor-duration-sec` are only sent if specified by the user.
For this first implementation I decided to add the arguments as additional flags to `process attach`, but I can change this if you think that's not a good idea.
I was also wondering if this could/should be expanded in a more general `jAttach` packet, where the packet contents would specify if lldb-server should wait or not, what are your thoughts on that?
Lastly, this current implementation has a bug I couldn't figure out, where if we're sending l an error response, `lldb` loses connection to `lldb-server` (this happens even if the first thing I do in the `handle_jAttachWait` function is return an error) and, also, CTRL+C from `lldb` doesn't interrupt `lldb-server`. If anyone know why this might be happening, I'd be glad to hear it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96176/new/
https://reviews.llvm.org/D96176
More information about the lldb-commits
mailing list