[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-18 Thread Vadim Chugunov via Phabricator via lldb-commits
vadimcn added a comment. Maybe LLDB should use `qAttached` to determine if there's an active process? OpenOCD seems to implement that one correctly. Repository: rL LLVM https://

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-18 Thread Vadim Chugunov via Phabricator via lldb-commits
vadimcn added a comment. Sorry, for not catching this regression! I've checked that attaching to a standard gdbserver still worked, but was not aware of the other scenarios. Does lldb-server return 'OK' string in response to 'qfThreadInfo'? According to this

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-18 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. I like the solution detailed above by tatyana-krasnukha Repository: rL LLVM https://reviews.llvm.org/D37934 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-18 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha added a comment. This obvious solution works well for me and seems safe. auto isEmptyList = response.IsNormalResponse() && response.GetStringRef() == "l"; if ((response.IsUnsupportedResponse() || isEmptyList) ... Repository: rL LLVM https://reviews.llvm.org/D37934

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-18 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. If we get a response of "l" for the "qfThreadInfo", it might be worth trying to send a "https://reviews.llvm.org/H1"; packet (select thread ID 1 for subsequent continues and steps) to see if the server knows about thread 1 before proceeding? This patch also broke other

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-15 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. As long as everyone agrees that no threads from qfThreadInfo means there is one thread whose thread ID is 1 then this is ok. Repository: rL LLVM https://reviews.llvm.org/D37934

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-15 Thread Vadim Chugunov via Phabricator via lldb-commits
vadimcn added a comment. This is what I see in the log: < 16> send packet: $qfThreadInfo#bb < 5> read packet: $l#6c And here's code that generates it: https://github.com/gnu-mcu-eclipse/openocd/blob/b21ab1d683aaee501d45fe8a509a2043123f16fd/src/rtos/rtos.c#L370 I agree, they should have

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-15 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. The multiple feature fix is fine. As for the qfThreadInfo fix, do you not have control over the OpenOCD GDB server? I would be nice to modify it to return something valid in response to qfThreadInfo? If you don't control or have access to modify the OpenOCD GDB server

[Lldb-commits] [PATCH] D37934: Fix compatibility with OpenOCD debug stub.

2017-09-15 Thread Vadim Chugunov via Phabricator via lldb-commits
vadimcn created this revision. vadimcn added a project: LLDB. OpenOCD sends register classes as two separate nodes, fixed parser to process both of them. OpenOCD returns "l" in response to "qfThreadInfo", so IsUnsupportedResponse() was false and we were ending up without any threads in the pro