mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
miscellaneous clean ups
This commit is contained in:
parent
91086ed28f
commit
475911cb82
7 changed files with 16 additions and 44 deletions
|
@ -252,26 +252,9 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
eMgr.fireEvents(new ICDIEvent[] { new DestroyedEvent(this) });
|
||||
eMgr.removeEventListeners();
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#terminate(ICDITarget)
|
||||
*/
|
||||
public void terminate(ICDITarget target) throws CDIException {
|
||||
((Target)target).getMISession().terminate();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#addSearchPaths(String[])
|
||||
*/
|
||||
public void addSearchPaths(String[] dirs) throws CDIException {
|
||||
addSearchPaths(getCurrentTarget(), dirs);
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#addSearchPaths(String[])
|
||||
*/
|
||||
public void addSearchPaths(ICDITarget target, String[] dirs) throws CDIException {
|
||||
MISession miSession = ((Target)target).getMISession();
|
||||
public void addSearchPaths(Target target, String[] dirs) throws CDIException {
|
||||
MISession miSession = target.getMISession();
|
||||
CommandFactory factory = miSession.getCommandFactory();
|
||||
MIEnvironmentDirectory dir = factory.createMIEnvironmentDirectory(dirs);
|
||||
try {
|
||||
|
@ -290,10 +273,7 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
return getSessionProcess(getCurrentTarget());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getSessionProcess()
|
||||
*/
|
||||
public Process getSessionProcess(ICDITarget target) throws CDIException {
|
||||
public Process getSessionProcess(ICDITarget target) {
|
||||
MISession miSession = ((Target)target).getMISession();
|
||||
return miSession.getSessionProcess();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class SignalReceived extends SessionObject implements ICDISignalReceived
|
|||
ICDISignal signal;
|
||||
public SignalReceived(Session session, MISignalEvent event) {
|
||||
super(session);
|
||||
SignalManager mgr = (SignalManager)session.getSignalManager();
|
||||
SignalManager mgr = session.getSignalManager();
|
||||
signal = mgr.getSignal(event.getMISession(), event.getName());
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ChangedEvent implements ICDIChangedEvent {
|
|||
|
||||
public ChangedEvent(Session s, MISignalChangedEvent sig) {
|
||||
session = s;
|
||||
SignalManager mgr = (SignalManager)session.getSignalManager();
|
||||
SignalManager mgr = session.getSignalManager();
|
||||
MISession miSession = sig.getMISession();
|
||||
String name = sig.getName();
|
||||
ICDISignal signal = mgr.getSignal(miSession, name);
|
||||
|
|
|
@ -166,7 +166,7 @@ public class VariableObject extends CObject implements ICDIVariableObject {
|
|||
if (frame == null) {
|
||||
frame = target.getCurrentThread().getCurrentStackFrame();
|
||||
}
|
||||
SourceManager sourceMgr = (SourceManager) session.getSourceManager();
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
String nametype = sourceMgr.getTypeName(this, getQualifiedName());
|
||||
try {
|
||||
type = sourceMgr.getType(this, nametype);
|
||||
|
|
|
@ -35,8 +35,8 @@ public abstract class DerivedType extends Type implements ICDIDerivedType {
|
|||
|
||||
public void setComponentType(String name) {
|
||||
Target target = (Target)getTarget();
|
||||
Session session = (Session)(target.getSession());
|
||||
SourceManager sourceMgr = (SourceManager)session.getSourceManager();
|
||||
Session session = (Session)target.getSession();
|
||||
SourceManager sourceMgr = session.getSourceManager();
|
||||
try {
|
||||
derivedType = sourceMgr.getType(getVariableObject(), name);
|
||||
} catch (CDIException e) {
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
@ -24,10 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
|
||||
/**
|
||||
* @author User
|
||||
*
|
||||
* TODO To change the template for this generated type comment go to
|
||||
* Window - Preferences - Java - Code Style - Code Templates
|
||||
* Cygwin debugger extension point.
|
||||
*/
|
||||
public class CygwinGDBCDIDebugger extends GDBCDIDebugger {
|
||||
static final CygwinCommandFactory commandFactory = new CygwinCommandFactory();
|
||||
|
@ -37,7 +33,7 @@ public class CygwinGDBCDIDebugger extends GDBCDIDebugger {
|
|||
}
|
||||
|
||||
public Session createLaunchSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException {
|
||||
Session session = (Session) super.createLaunchSession(config, exe, monitor);
|
||||
Session session = super.createLaunchSession(config, exe, monitor);
|
||||
ICDITarget[] targets = session.getTargets();
|
||||
for (int i = 0; i < targets.length; ++i) {
|
||||
Target target = (Target)targets[i];
|
||||
|
@ -62,7 +58,7 @@ public class CygwinGDBCDIDebugger extends GDBCDIDebugger {
|
|||
}
|
||||
|
||||
public Session createAttachSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException {
|
||||
Session session = (Session) super.createAttachSession(config, exe, monitor);
|
||||
Session session = super.createAttachSession(config, exe, monitor);
|
||||
ICDITarget[] targets = session.getTargets();
|
||||
for (int i = 0; i < targets.length; ++i) {
|
||||
Target target = (Target)targets[i];
|
||||
|
@ -73,7 +69,7 @@ public class CygwinGDBCDIDebugger extends GDBCDIDebugger {
|
|||
}
|
||||
|
||||
public Session createCoreSession(ILaunchConfiguration config, IBinaryExecutable exe, IProgressMonitor monitor) throws CoreException {
|
||||
Session session = (Session) super.createCoreSession(config, exe, monitor);
|
||||
Session session = super.createCoreSession(config, exe, monitor);
|
||||
ICDITarget[] targets = session.getTargets();
|
||||
for (int i = 0; i < targets.length; ++i) {
|
||||
Target target = (Target)targets[i];
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -79,13 +78,10 @@ public class GDBCDIDebugger implements ICDIDebugger {
|
|||
if (dsession != null) {
|
||||
ICDITarget[] dtargets = dsession.getTargets();
|
||||
for (int i = 0; i < dtargets.length; i++) {
|
||||
if (dtargets[i] instanceof Target) {
|
||||
Target target = (Target)dtargets[i];
|
||||
Process debugger = target.getMISession().getSessionProcess();
|
||||
if (debugger != null ) {
|
||||
IProcess debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
||||
launch.addProcess(debuggerProcess);
|
||||
}
|
||||
Process debugger = dsession.getSessionProcess(dtargets[i]);
|
||||
if (debugger != null) {
|
||||
IProcess debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
||||
launch.addProcess(debuggerProcess);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue