| Summary: | Restart no longer works with GDB >= 7.0 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc Khouzam <marc.khouzam> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, pawel.1.piech | ||||
| Version: | 7.0 | Flags: | pawel.1.piech:
review+
|
||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Marc Khouzam
Created attachment 194428 [details]
Fix
Previously, this used to work because we only killed GDB if the inferior was marked as Terminated, which was done when getting an *stopped,reason="exited-normally" or the like from GDB. We are no longer making use of that event.
So, what GDB does is the following. When a process terminates, it sends an =thread-group-exited event, even if the process will be restarted. However, the *stopped,reason="exited-normally" is only sent by GDB if the process terminates and will _not_ be restarted. That seems to be the only way GDB informs us of the restart case.
So, one solution would be to not only trigger off an IExitedDMEvent but also on an MIInferiorExitEvent/MIInferiorSignalExitEvent to know that a process has exited and will not restart. In that case it will be safe to kill GDB. However, this approach is very dependent on this weird use of GDB events, which may even change in the future.
Instead, we can simply keep an internal flag to know that we are doing a restart. This is what this simple patch does.
Committed to HEAD.
Fixed. Pawel, can you review? *** cdt cvs genie on behalf of mkhouzam *** Bug 343752: Restart no longer works with GDB >= 7.0 [*] GDBProcesses_7_0.java 1.48 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_0.java?root=Tools_Project&r1=1.47&r2=1.48 Seems logical to me. |