Community
Participate
Working Groups
See thread http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg18309.html
I agree with several of the things said in that thread. Having the GDB detach command available from the toolbar is useful; having the GDB disconnect command available somehow is useful, but it doesn't need to be on the toolbar. The detach command makes sense in all GDB sessions; at least some versions of CDT only showed it for attach launches.
(In reply to comment #1) > The detach command makes sense in all GDB sessions; at least some versions of > CDT only showed it for attach launches. For DSF-GDB: - the disconnect action is always available when you select the launch (top element in the debug tree), and it calls -gdb-exit - when selection a process/thread/frame, the disconnect action calls 'detach' and is only enabled for GDB >= 7.0 and for an attach launch. Can you explain a bit when else we should allow to 'detach'?
(In reply to comment #2) > Can you explain a bit when else we should allow to 'detach'? Marc, Dan's comment is about CDI/GDB. In CDI/GDB "Disconnect" (which translates to "etach) is only enabled for the so-called "attach" sessions. This is a limitation because it is also possible to "detach" from a regular session. At the same time we need to clarify when we can use "disconnect" (I mean GDB command). When I try it, I get "You can't do that when your target is a child" for both session types.
You can detach on any backend that supports it, and you can disconnect from any backend that supports that. I believe the only targets that support disconnect are remote and record. And record's disconnect only works if the underlying target is remote. You can't use disconnect with a native target ("run", a.k.a. the "child" target), although such a thing could be added. Most targets support detach regardless of "attach" versus "run".
(In reply to comment #4) > You can detach on any backend that supports it, and you can disconnect from any > backend that supports that. > I believe the only targets that support disconnect are remote and record. And > record's disconnect only works if the underlying target is remote. You can't > use disconnect with a native target ("run", a.k.a. the "child" target), > although such a thing could be added. > Most targets support detach regardless of "attach" versus "run". Is there a way to ask GDB whether a target supports "detach" and "disconnect"?
No, I don't think so.
(In reply to comment #3) > (In reply to comment #2) > > Can you explain a bit when else we should allow to 'detach'? > > Marc, Dan's comment is about CDI/GDB. In CDI/GDB "Disconnect" (which translates > to "etach) is only enabled for the so-called "attach" sessions. Yep, for DSF-GDB too.