Community
Participate
Working Groups
Build Identifier: CDT 8 Start a stop mode GDB dubug session Run the target Click on the Connect to process bottun in the debug view few times nothing happens Yuo may need to select different nodes in the debug view to renable the button After I suspend the target one or more dialogs pop up I think we need to disable that button if the command cannot be dispatched to the debugger. Reproducible: Always
Thanks Dobrin. The problem here is that in all-stop mode, GDB will not answer any requests until the inferior stops. So, in your case, we ask GDB for the list of processes that we can connect to, but since the target is running, this call does not return from GDB. Once you suspend the target, the request is answered and the dialog comes up. Ultimately, I see a couple of ways to handle this. 1- as you suggest, not allow to connect while the target is running 2- forcibly interrupt the target (like we do for a detach/terminate/breakpoint) before doing the attach. The problem here is that an attach is actually two operations: first listing the processes, and then doing the attach. To avoid interrupting the target for a long time, while the user selects a second process, we should probably interrupt once to list the processes and then resume; once the user makes her choice, we should then interrupt again, attach and resume again. However, because we don't currently support multi-process in all-stop mode (bug 337897), there is no point in doing #2 yet. I will attach a patch for the current bug that simply disables the command in all-stop mode, if we are trying to run a second process. This is actually much nicer than allow the user to do multi-process in all-stop while we know it does not work yet.
Created attachment 194764 [details] Fix to disable the connect command in all-stop Fix to disable the connect command in all-stop if we are already connected to a process. Committed to HEAD.
Mikhail, can you review?
*** cdt cvs genie on behalf of mkhouzam *** Bug 341406: "Connect to process" button in the debug view does nothing while target is running in all-stop [*] GDBProcesses_7_2.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java?root=Tools_Project&r1=1.13&r2=1.14