mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
GDB Automatic remote launch, NP Exception check
Null pointer checks were missing in GdbLaunch e.g. to cover the case when the instance is not fully initialized e.g. invalid gdbserver path. Change-Id: Ie5b593417aa831cb5b35b19f31d2b0a03b1fdc86 Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This commit is contained in:
parent
8f25e4b5b2
commit
16b3fbcfd6
1 changed files with 14 additions and 7 deletions
|
@ -364,8 +364,11 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
|
||||||
new IStatus[] { getStatus() }, "Session shutdown failed", null)); //$NON-NLS-1$
|
new IStatus[] { getStatus() }, "Session shutdown failed", null)); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
// Last order of business, shutdown the dispatch queue.
|
// Last order of business, shutdown the dispatch queue.
|
||||||
|
if (fTracker != null) {
|
||||||
fTracker.dispose();
|
fTracker.dispose();
|
||||||
fTracker = null;
|
fTracker = null;
|
||||||
|
}
|
||||||
|
|
||||||
DsfSession.endSession(fSession);
|
DsfSession.endSession(fSession);
|
||||||
|
|
||||||
// 'fireTerminate()' removes this launch from the list
|
// 'fireTerminate()' removes this launch from the list
|
||||||
|
@ -390,12 +393,16 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
|
||||||
final Step[] steps = new Step[] { new Step() {
|
final Step[] steps = new Step[] { new Step() {
|
||||||
@Override
|
@Override
|
||||||
public void execute(RequestMonitor rm) {
|
public void execute(RequestMonitor rm) {
|
||||||
|
if (fTracker != null) {
|
||||||
IGDBControl control = fTracker.getService(IGDBControl.class);
|
IGDBControl control = fTracker.getService(IGDBControl.class);
|
||||||
if (control == null) {
|
if (control != null) {
|
||||||
rm.done();
|
control.terminate(rm);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
control.terminate(rm);
|
}
|
||||||
|
|
||||||
|
rm.done();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue