mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
2004-10-17 Alain Magloire
Remove deprecated method in CDI adjust the implementation.
This commit is contained in:
parent
192fcc41a9
commit
fea4e25184
18 changed files with 138 additions and 149 deletions
|
@ -1,3 +1,6 @@
|
|||
2004-10-17 Alain Magloire
|
||||
Remove deprecated method in CDI adjust the implementation.
|
||||
|
||||
2004-10-15 Alain Magloire
|
||||
|
||||
The way we do breakpoints is changing. gdb does not have
|
||||
|
|
|
@ -317,16 +317,6 @@ public class BreakpointManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#update()
|
||||
*/
|
||||
public void update(Target target) throws CDIException {
|
||||
MISession miSession = target.getMISession();
|
||||
|
|
|
@ -150,7 +150,8 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
|||
// Something change we do not know what
|
||||
// Let the signal manager handle it with an update().
|
||||
try {
|
||||
session.getSignalManager().update();
|
||||
SignalManager sMgr = (SignalManager)session.getSignalManager();
|
||||
sMgr.update(currentTarget);
|
||||
} catch (CDIException e) {
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
|
@ -94,16 +95,26 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
}
|
||||
|
||||
/**
|
||||
* This should bo remove to evaluate an expression we nee a context.
|
||||
*
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#createExpression(String)
|
||||
*/
|
||||
public ICDIExpression createExpression(String name) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return createExpression(target, name);
|
||||
}
|
||||
/**
|
||||
* This should bo remove to evaluate an expression we nee a context.
|
||||
*
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#createExpression(String)
|
||||
*/
|
||||
public ICDIExpression createExpression(Target target, String name) throws CDIException {
|
||||
Expression expression = null;
|
||||
ICDITarget currentTarget = getSession().getCurrentTarget();
|
||||
getSession().setCurrentTarget(target);
|
||||
Session session = (Session)getSession();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
session.setCurrentTarget(target);
|
||||
try {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -120,7 +131,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
getSession().setCurrentTarget(currentTarget);
|
||||
session.setCurrentTarget(currentTarget);
|
||||
}
|
||||
return expression;
|
||||
}
|
||||
|
@ -132,8 +143,10 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
Expression expression = null;
|
||||
Session session = (Session)getSession();
|
||||
Target target = (Target)frame.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = target.getCurrentThread();
|
||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
session.setCurrentTarget(target);
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
frame.getThread().setCurrentStackFrame(frame, false);
|
||||
try {
|
||||
|
@ -152,6 +165,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
|
@ -159,11 +173,19 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#getExpressions()
|
||||
*/
|
||||
public ICDIExpression[] getExpressions() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
return getExpressions(target);
|
||||
ICDITarget[] targets = getSession().getTargets();
|
||||
List list = new ArrayList(targets.length);
|
||||
for (int i = 0; i < targets.length; i++) {
|
||||
if (targets[i] instanceof Target) {
|
||||
ICDIExpression[] exprs = getExpressions((Target)targets[i]);
|
||||
list.addAll(Arrays.asList(exprs));
|
||||
}
|
||||
}
|
||||
return (ICDIExpression[]) list.toArray(new ICDIExpression[list.size()]);
|
||||
}
|
||||
|
||||
public ICDIExpression[] getExpressions(Target target) throws CDIException {
|
||||
|
@ -209,14 +231,6 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
public void update(Target target) throws CDIException {
|
||||
List eventList = new ArrayList();
|
||||
MISession mi = target.getMISession();
|
||||
|
|
|
@ -14,6 +14,8 @@ package org.eclipse.cdt.debug.mi.core.cdi;
|
|||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
|
||||
/**
|
||||
* Manager
|
||||
|
@ -42,10 +44,19 @@ public abstract class Manager extends SessionObject implements ICDIManager {
|
|||
return autoUpdate;
|
||||
}
|
||||
|
||||
protected abstract void update (Target target) throws CDIException;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.impl.Manager#update()
|
||||
*/
|
||||
public abstract void update() throws CDIException;
|
||||
public void update() throws CDIException {
|
||||
ICDITarget[] targets = getSession().getTargets();
|
||||
for (int i = 0; i < targets.length; ++i) {
|
||||
if (targets[i] instanceof Target) {
|
||||
update((Target)targets[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.util.Map;
|
|||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MIFormat;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
|
@ -62,24 +61,6 @@ public class MemoryManager extends Manager implements ICDIMemoryManager {
|
|||
* are registered and fired any event if changed.
|
||||
* Note: Frozen blocks are not updated.
|
||||
*
|
||||
* @deprecated use update(Target)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#createMemoryBlock(long, int)
|
||||
*/
|
||||
public void update() {
|
||||
Session session = (Session)getSession();
|
||||
ICDITarget[] targets = session.getTargets();
|
||||
for (int i = 0; i < targets.length; ++i) {
|
||||
update((Target)targets[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be call by the eventManager.processSuspended() every time the
|
||||
* inferior comes to a Stop/Suspended. It will allow to look at the blocks that
|
||||
* are registered and fired any event if changed.
|
||||
* Note: Frozen blocks are not updated.
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#createMemoryBlock(long, int)
|
||||
*/
|
||||
public void update(Target target) {
|
||||
MISession miSession = target.getMISession();
|
||||
|
@ -189,7 +170,7 @@ public class MemoryManager extends Manager implements ICDIMemoryManager {
|
|||
*/
|
||||
public ICDIMemoryBlock createMemoryBlock(String address, int length) throws CDIException {
|
||||
Session session = (Session)getSession();
|
||||
return createMemoryBlock((Target)session.getCurrentTarget(), address, length);
|
||||
return createMemoryBlock(session.getCurrentTarget(), address, length);
|
||||
}
|
||||
public ICDIMemoryBlock createMemoryBlock(Target target, String address, int length) throws CDIException {
|
||||
MIDataReadMemoryInfo info = createMIDataReadMemoryInfo(target.getMISession(), address, length);
|
||||
|
@ -205,7 +186,7 @@ public class MemoryManager extends Manager implements ICDIMemoryManager {
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#getBlocks()
|
||||
*/
|
||||
public ICDIMemoryBlock[] getMemoryBlocks() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getMemoryBlocks(target);
|
||||
}
|
||||
public MemoryBlock[] getMemoryBlocks(MISession miSession) {
|
||||
|
@ -223,7 +204,7 @@ public class MemoryManager extends Manager implements ICDIMemoryManager {
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#removeAllBlocks()
|
||||
*/
|
||||
public void removeAllBlocks() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
removeAllBlocks(target);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
|||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorCreatedEvent;
|
||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -88,7 +87,6 @@ public class ProcessManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @return
|
||||
*/
|
||||
public Target getCurrentTarget() {
|
||||
|
@ -96,17 +94,13 @@ public class ProcessManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param current
|
||||
*/
|
||||
public void setCurrentTarget(Target current) {
|
||||
currentTarget = current;
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.derug.core.cdi.ICDIManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
|
||||
public void update(Target target) throws CDIException {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.debug.core.cdi.CDIException;
|
|||
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
|
||||
|
@ -65,12 +64,13 @@ public class RegisterManager extends Manager implements ICDIRegisterManager {
|
|||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getRegisterObjects()
|
||||
*/
|
||||
public ICDIRegisterObject[] getRegisterObjects() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getRegisterObjects(target);
|
||||
}
|
||||
public ICDIRegisterObject[] getRegisterObjects(Target target) throws CDIException {
|
||||
ICDITarget currentTarget = getSession().getCurrentTarget();
|
||||
getSession().setCurrentTarget(target);
|
||||
Session session = (Session)getSession();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
session.setCurrentTarget(target);
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
MIDataListRegisterNames registers = factory.createMIDataListRegisterNames();
|
||||
|
@ -92,7 +92,7 @@ public class RegisterManager extends Manager implements ICDIRegisterManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
getSession().setCurrentTarget(currentTarget);
|
||||
session.setCurrentTarget(currentTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,14 +191,6 @@ public class RegisterManager extends Manager implements ICDIRegisterManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Call the by the EventManager when the target is suspended.
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
public void update(Target target) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
|
|
@ -105,11 +105,7 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
return pMgr.getTarget(miSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getCurrentTarget()
|
||||
*/
|
||||
public ICDITarget getCurrentTarget() {
|
||||
public Target getCurrentTarget() {
|
||||
ProcessManager pMgr = getProcessManager();
|
||||
return pMgr.getCurrentTarget();
|
||||
}
|
||||
|
@ -199,13 +195,12 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#setCurrentTarget()
|
||||
*/
|
||||
public void setCurrentTarget(ICDITarget target) throws CDIException {
|
||||
public void setCurrentTarget(Target target) throws CDIException {
|
||||
ProcessManager pMgr = getProcessManager();
|
||||
if (target instanceof Target) {
|
||||
pMgr.setCurrentTarget((Target)target);
|
||||
} else {
|
||||
throw new CDIException(CdiResources.getString("cdi.Session.Unknown_target")); //$NON-NLS-1$
|
||||
}
|
||||
pMgr.setCurrentTarget((Target)target);
|
||||
// } else {
|
||||
// throw new CDIException(CdiResources.getString("cdi.Session.Unknown_target")); //$NON-NLS-1$
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Hashtable;
|
||||
|
@ -85,14 +84,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
return miLibs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
public void update(Target target) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
List eventList = updateState(target);
|
||||
|
@ -190,10 +181,11 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
||||
*/
|
||||
public void setAutoLoadSymbols(boolean set) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
setAutoLoadSymbols(target, set);
|
||||
}
|
||||
public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
|
||||
|
@ -209,9 +201,10 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public boolean isAutoLoadSymbols() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return isAutoLoadSymbols(target);
|
||||
}
|
||||
public boolean isAutoLoadSymbols(Target target) throws CDIException {
|
||||
|
@ -231,8 +224,13 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param set
|
||||
* @throws CDIException
|
||||
*/
|
||||
public void setStopOnSolibEvents(boolean set) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
setStopOnSolibEvents(target, set);
|
||||
}
|
||||
public void setStopOnSolibEvents(Target target, boolean set) throws CDIException {
|
||||
|
@ -247,8 +245,13 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @return
|
||||
* @throws CDIException
|
||||
*/
|
||||
public boolean isStopOnSolibEvents() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return isStopOnSolibEvents(target);
|
||||
}
|
||||
public boolean isStopOnSolibEvents(Target target) throws CDIException {
|
||||
|
@ -269,10 +272,11 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
||||
*/
|
||||
public void setSharedLibraryPaths(String[] libPaths) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
setSharedLibraryPaths(target, libPaths);
|
||||
}
|
||||
public void setSharedLibraryPaths(Target target, String[] libPaths) throws CDIException {
|
||||
|
@ -288,10 +292,11 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraryPaths()
|
||||
*/
|
||||
public String[] getSharedLibraryPaths() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getSharedLibraryPaths(target);
|
||||
}
|
||||
public String[] getSharedLibraryPaths(Target target) throws CDIException {
|
||||
|
@ -308,10 +313,11 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraries()
|
||||
*/
|
||||
public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getSharedLibraries(target);
|
||||
}
|
||||
public ICDISharedLibrary[] getSharedLibraries(Target target) throws CDIException {
|
||||
|
@ -323,10 +329,11 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols()
|
||||
*/
|
||||
public void loadSymbols() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
loadSymbols(target);
|
||||
}
|
||||
public void loadSymbols(Target target) throws CDIException {
|
||||
|
@ -342,14 +349,15 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
}
|
||||
update();
|
||||
update(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols(ICDISharedLibrary[])
|
||||
*/
|
||||
public void loadSymbols(ICDISharedLibrary[] libs) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
loadSymbols(target, libs);
|
||||
}
|
||||
public void loadSymbols(Target target, ICDISharedLibrary[] libs) throws CDIException {
|
||||
|
|
|
@ -169,10 +169,11 @@ public class SignalManager extends Manager implements ICDISignalManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISignalManager#getSignals()
|
||||
*/
|
||||
public ICDISignal[] getSignals() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getSignals(target);
|
||||
}
|
||||
|
||||
|
@ -187,14 +188,7 @@ public class SignalManager extends Manager implements ICDISignalManager {
|
|||
}
|
||||
return EMPTY_SIGNALS;
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISignalManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
|
||||
public void update(Target target) throws CDIException {
|
||||
MISession miSession = target.getMISession();
|
||||
MISigHandle[] miSigs = getMISignals(miSession);
|
||||
|
|
|
@ -72,10 +72,11 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#addSourcePaths(String[])
|
||||
*/
|
||||
public void addSourcePaths(String[] dirs) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
addSourcePaths(target, dirs);
|
||||
}
|
||||
public void addSourcePaths(Target target, String[] dirs) throws CDIException {
|
||||
|
@ -92,10 +93,11 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getSourcePaths()
|
||||
*/
|
||||
public String[] getSourcePaths() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getSourcePaths(target);
|
||||
}
|
||||
public String[] getSourcePaths(Target target) throws CDIException {
|
||||
|
@ -112,10 +114,11 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(String, int, int)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(String filename, int linenum, int lines) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getInstructions(target, filename, linenum, lines);
|
||||
}
|
||||
public ICDIInstruction[] getInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
||||
|
@ -144,10 +147,11 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(long, long)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(BigInteger start, BigInteger end) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getInstructions(target, start, end);
|
||||
}
|
||||
public ICDIInstruction[] getInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
||||
|
@ -172,10 +176,11 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(String, int, int)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum, int lines) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getMixedInstructions(target, filename, linenum, lines);
|
||||
}
|
||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
||||
|
@ -197,17 +202,18 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(String, int)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum) throws CDIException {
|
||||
return getMixedInstructions(filename, linenum, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(long, long)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(BigInteger start, BigInteger end) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getMixedInstructions(target, start, end);
|
||||
}
|
||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
||||
|
@ -231,13 +237,6 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
}
|
||||
|
||||
public void update(Target target) throws CDIException {
|
||||
}
|
||||
|
||||
|
@ -457,9 +456,12 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
|
||||
public String getDetailTypeName(ICDIStackFrame frame, String typename) throws CDIException {
|
||||
Session session = (Session)getSession();
|
||||
Target target = (Target)frame.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = target.getCurrentThread();
|
||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
session.setCurrentTarget(target);
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
frame.getThread().setCurrentStackFrame(frame, false);
|
||||
try {
|
||||
|
@ -475,16 +477,20 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
}
|
||||
|
||||
public String getTypeName(VariableObject vo, String variable) throws CDIException {
|
||||
Target target = (Target)vo.getTarget();
|
||||
Session session = (Session)getSession();
|
||||
ICDIStackFrame frame = vo.getStackFrame();
|
||||
Target target = (Target)vo.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = null;
|
||||
ICDIStackFrame currentFrame = null;
|
||||
session.setCurrentTarget(target);
|
||||
if (frame != null) {
|
||||
currentThread = target.getCurrentThread();
|
||||
currentFrame = currentThread.getCurrentStackFrame();
|
||||
|
@ -504,6 +510,7 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
if (currentThread != null) {
|
||||
target.setCurrentThread(currentThread, false);
|
||||
}
|
||||
|
|
|
@ -106,11 +106,7 @@ public class ThreadManager extends Manager { //implements ICDIThreadManager {
|
|||
return new ThreadSet(cthreads, currentThreadId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.derug.core.cdi.ICDIThreadManager#update()
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
public void update(Target target) throws CDIException {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -150,9 +150,12 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
*/
|
||||
public void checkType(StackFrame frame, String type) throws CDIException {
|
||||
if (type != null && type.length() > 0) {
|
||||
Session session = (Session)getSession();
|
||||
Target target = (Target)frame.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = target.getCurrentThread();
|
||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
session.setCurrentTarget(target);
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
frame.getThread().setCurrentStackFrame(frame, false);
|
||||
try {
|
||||
|
@ -167,6 +170,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
|
@ -232,6 +236,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
ICDIThread currentThread = null;
|
||||
ICDIStackFrame currentFrame = null;
|
||||
Target target = (Target)argObj.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
if (stack != null) {
|
||||
currentThread = target.getCurrentThread();
|
||||
currentFrame = currentThread.getCurrentStackFrame();
|
||||
|
@ -253,6 +258,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
if (currentThread != null) {
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
|
@ -271,6 +277,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
List argObjects = new ArrayList();
|
||||
Session session = (Session) getSession();
|
||||
Target target = (Target)frame.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = target.getCurrentThread();
|
||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
|
@ -302,6 +309,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
|
@ -309,10 +317,11 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getGlobalVariableObject(String, String, String)
|
||||
*/
|
||||
public ICDIVariableObject getGlobalVariableObject(String filename, String function, String name) throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getGlobalVariableObject(target, filename, function, name);
|
||||
}
|
||||
public ICDIVariableObject getGlobalVariableObject(Target target, String filename, String function, String name) throws CDIException {
|
||||
|
@ -398,6 +407,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
List varObjects = new ArrayList();
|
||||
Session session = (Session) getSession();
|
||||
Target target = (Target)frame.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
ICDIThread currentThread = target.getCurrentThread();
|
||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||
target.setCurrentThread(frame.getThread(), false);
|
||||
|
@ -423,6 +433,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
}
|
||||
|
@ -458,6 +469,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
ICDIThread currentThread = null;
|
||||
ICDIStackFrame currentFrame = null;
|
||||
Target target = (Target)varObj.getTarget();
|
||||
Target currentTarget = session.getCurrentTarget();
|
||||
if (stack != null) {
|
||||
currentThread = target.getCurrentThread();
|
||||
currentFrame = currentThread.getCurrentStackFrame();
|
||||
|
@ -479,6 +491,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
} catch (MIException e) {
|
||||
throw new MI2CDIException(e);
|
||||
} finally {
|
||||
session.setCurrentTarget(currentTarget);
|
||||
if (currentThread != null) {
|
||||
target.setCurrentThread(currentThread, false);
|
||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||
|
@ -513,13 +526,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
|||
* the other locals in different frames. The downside if any side effects we loose,
|
||||
* This ok, since the IDE only a frame at a time.
|
||||
*
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#createArgument(ICDIArgumentObject)
|
||||
*/
|
||||
public void update() throws CDIException {
|
||||
Target target = (Target)getSession().getCurrentTarget();
|
||||
update(target);
|
||||
}
|
||||
public void update(Target target) throws CDIException {
|
||||
int high = 0;
|
||||
int low = 0;
|
||||
|
|
|
@ -72,7 +72,7 @@ public class Breakpoint extends CObject implements ICDILocationBreakpoint {
|
|||
String exp = miBreakpoints[0].getCondition();
|
||||
condition = new Condition(icount, exp, tids);
|
||||
} else {
|
||||
condition = new Condition(0, "", null);
|
||||
condition = new Condition(0, new String(), null);
|
||||
}
|
||||
}
|
||||
return condition;
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.debug.mi.core.cdi.model;
|
|||
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
|
||||
|
||||
/**
|
||||
* Exceptionpoint
|
||||
|
|
|
@ -288,9 +288,6 @@ public class Target implements ICDITarget {
|
|||
return cthreads;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getCurrentThread()
|
||||
*/
|
||||
public ICDIThread getCurrentThread() throws CDIException {
|
||||
ICDIThread[] threads = getThreads();
|
||||
for (int i = 0; i < threads.length; i++) {
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
package org.eclipse.cdt.debug.mi.core.cdi.model;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIVariableManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
||||
|
@ -36,8 +33,11 @@ import org.eclipse.cdt.debug.core.cdi.model.type.ICDIWCharType;
|
|||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.Format;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.type.ArrayValue;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolValue;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharValue;
|
||||
|
@ -316,22 +316,22 @@ public class Variable extends VariableObject implements ICDIVariable {
|
|||
if (this instanceof Register) {
|
||||
// If register was on autoupdate, update all the other registers
|
||||
// assigning may have side effects i.e. affecting other registers.
|
||||
ICDIRegisterManager mgr = target.getSession().getRegisterManager();
|
||||
RegisterManager mgr = (RegisterManager)target.getSession().getRegisterManager();
|
||||
if (mgr.isAutoUpdate()) {
|
||||
mgr.update();
|
||||
mgr.update(target);
|
||||
}
|
||||
} else if (this instanceof Expression) {
|
||||
// If expression was on autoupdate, update all the other expression
|
||||
// assigning may have side effects i.e. affecting other expressions.
|
||||
ICDIExpressionManager mgr = target.getSession().getExpressionManager();
|
||||
ExpressionManager mgr = (ExpressionManager)target.getSession().getExpressionManager();
|
||||
if (mgr.isAutoUpdate()) {
|
||||
mgr.update();
|
||||
mgr.update(target);
|
||||
}
|
||||
} else {
|
||||
// FIXME: Should we always call the Variable Manager ?
|
||||
ICDIVariableManager mgr = target.getSession().getVariableManager();
|
||||
VariableManager mgr = (VariableManager)target.getSession().getVariableManager();
|
||||
if (mgr.isAutoUpdate()) {
|
||||
mgr.update();
|
||||
mgr.update(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue