Community
Participate
Working Groups
While debugging some JUnit tests, I saw that the IGDBControl.terminate method can be called multiple times when we shutdown. That method tries to send an -gdb-exit command to GDB and starts a Future to monitor GDB's death. We should only do this once. I saw three different calls to IGDBControl.terminate, that happened for the same shutdown: GDBBackendCLIProcess.destroy() GDBProcesses.terminate() GDBProcesses.eventDispatched(IExitedDMEvent e) Same thing for the corresponding _7_0 classes. If IGDBControl.terminate() has already been called, any new calls should simply return. Actually, we could buffer the new RMs and only complete them once the terminate is finished, but there was no value in doing that right now, so I didn't bother, as it was more error-prone. The attached patch simply completes the RM and returns.
Created attachment 194980 [details] Fix Committed to HEAD.
Fixed
*** cdt cvs genie on behalf of mkhouzam *** Bug 345018: Do not allow to try to terminate GDB more than once [*] GDBControl_7_0.java 1.33 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java?root=Tools_Project&r1=1.32&r2=1.33 [*] GDBControl.java 1.29 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java?root=Tools_Project&r1=1.28&r2=1.29