mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +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
|
2004-10-15 Alain Magloire
|
||||||
|
|
||||||
The way we do breakpoints is changing. gdb does not have
|
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 {
|
public void update(Target target) throws CDIException {
|
||||||
MISession miSession = target.getMISession();
|
MISession miSession = target.getMISession();
|
||||||
|
|
|
@ -150,7 +150,8 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
||||||
// Something change we do not know what
|
// Something change we do not know what
|
||||||
// Let the signal manager handle it with an update().
|
// Let the signal manager handle it with an update().
|
||||||
try {
|
try {
|
||||||
session.getSignalManager().update();
|
SignalManager sMgr = (SignalManager)session.getSignalManager();
|
||||||
|
sMgr.update(currentTarget);
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.List;
|
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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#createExpression(String)
|
||||||
*/
|
*/
|
||||||
public ICDIExpression createExpression(String name) throws CDIException {
|
public ICDIExpression createExpression(String name) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return createExpression(target, name);
|
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 {
|
public ICDIExpression createExpression(Target target, String name) throws CDIException {
|
||||||
Expression expression = null;
|
Expression expression = null;
|
||||||
ICDITarget currentTarget = getSession().getCurrentTarget();
|
Session session = (Session)getSession();
|
||||||
getSession().setCurrentTarget(target);
|
Target currentTarget = session.getCurrentTarget();
|
||||||
|
session.setCurrentTarget(target);
|
||||||
try {
|
try {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -120,7 +131,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
getSession().setCurrentTarget(currentTarget);
|
session.setCurrentTarget(currentTarget);
|
||||||
}
|
}
|
||||||
return expression;
|
return expression;
|
||||||
}
|
}
|
||||||
|
@ -132,8 +143,10 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
Expression expression = null;
|
Expression expression = null;
|
||||||
Session session = (Session)getSession();
|
Session session = (Session)getSession();
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
session.setCurrentTarget(target);
|
||||||
target.setCurrentThread(frame.getThread(), false);
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
|
@ -152,6 +165,7 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, 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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager#getExpressions()
|
||||||
*/
|
*/
|
||||||
public ICDIExpression[] getExpressions() throws CDIException {
|
public ICDIExpression[] getExpressions() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
ICDITarget[] targets = getSession().getTargets();
|
||||||
return getExpressions(target);
|
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 {
|
public ICDIExpression[] getExpressions(Target target) throws CDIException {
|
||||||
|
@ -209,14 +231,6 @@ public class ExpressionManager extends Manager implements ICDIExpressionManager{
|
||||||
return null;
|
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 {
|
public void update(Target target) throws CDIException {
|
||||||
List eventList = new ArrayList();
|
List eventList = new ArrayList();
|
||||||
MISession mi = target.getMISession();
|
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.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
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
|
* Manager
|
||||||
|
@ -42,10 +44,19 @@ public abstract class Manager extends SessionObject implements ICDIManager {
|
||||||
return autoUpdate;
|
return autoUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract void update (Target target) throws CDIException;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.impl.Manager#update()
|
* @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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
|
* @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.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager;
|
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.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.MIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIFormat;
|
import org.eclipse.cdt.debug.mi.core.MIFormat;
|
||||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
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.
|
* are registered and fired any event if changed.
|
||||||
* Note: Frozen blocks are not updated.
|
* 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) {
|
public void update(Target target) {
|
||||||
MISession miSession = target.getMISession();
|
MISession miSession = target.getMISession();
|
||||||
|
@ -189,7 +170,7 @@ public class MemoryManager extends Manager implements ICDIMemoryManager {
|
||||||
*/
|
*/
|
||||||
public ICDIMemoryBlock createMemoryBlock(String address, int length) throws CDIException {
|
public ICDIMemoryBlock createMemoryBlock(String address, int length) throws CDIException {
|
||||||
Session session = (Session)getSession();
|
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 {
|
public ICDIMemoryBlock createMemoryBlock(Target target, String address, int length) throws CDIException {
|
||||||
MIDataReadMemoryInfo info = createMIDataReadMemoryInfo(target.getMISession(), address, length);
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#getBlocks()
|
||||||
*/
|
*/
|
||||||
public ICDIMemoryBlock[] getMemoryBlocks() throws CDIException {
|
public ICDIMemoryBlock[] getMemoryBlocks() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getMemoryBlocks(target);
|
return getMemoryBlocks(target);
|
||||||
}
|
}
|
||||||
public MemoryBlock[] getMemoryBlocks(MISession miSession) {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#removeAllBlocks()
|
||||||
*/
|
*/
|
||||||
public void removeAllBlocks() throws CDIException {
|
public void removeAllBlocks() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
removeAllBlocks(target);
|
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.MISession;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
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.MIInferiorCreatedEvent;
|
||||||
import org.eclipse.cdt.debug.mi.core.event.MIInferiorExitEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
@ -88,7 +87,6 @@ public class ProcessManager extends Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Target getCurrentTarget() {
|
public Target getCurrentTarget() {
|
||||||
|
@ -96,17 +94,13 @@ public class ProcessManager extends Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
|
||||||
* @param current
|
* @param current
|
||||||
*/
|
*/
|
||||||
public void setCurrentTarget(Target current) {
|
public void setCurrentTarget(Target current) {
|
||||||
currentTarget = current;
|
currentTarget = current;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @deprecated
|
public void update(Target target) throws CDIException {
|
||||||
* @see org.eclipse.cdt.derug.core.cdi.ICDIManager#update()
|
|
||||||
*/
|
|
||||||
public void update() 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.ICDIRegisterManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
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.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.MIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Register;
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getRegisterObjects()
|
||||||
*/
|
*/
|
||||||
public ICDIRegisterObject[] getRegisterObjects() throws CDIException {
|
public ICDIRegisterObject[] getRegisterObjects() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getRegisterObjects(target);
|
return getRegisterObjects(target);
|
||||||
}
|
}
|
||||||
public ICDIRegisterObject[] getRegisterObjects(Target target) throws CDIException {
|
public ICDIRegisterObject[] getRegisterObjects(Target target) throws CDIException {
|
||||||
ICDITarget currentTarget = getSession().getCurrentTarget();
|
Session session = (Session)getSession();
|
||||||
getSession().setCurrentTarget(target);
|
Target currentTarget = session.getCurrentTarget();
|
||||||
|
session.setCurrentTarget(target);
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
MIDataListRegisterNames registers = factory.createMIDataListRegisterNames();
|
MIDataListRegisterNames registers = factory.createMIDataListRegisterNames();
|
||||||
|
@ -92,7 +92,7 @@ public class RegisterManager extends Manager implements ICDIRegisterManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
getSession().setCurrentTarget(currentTarget);
|
session.setCurrentTarget(currentTarget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,14 +191,6 @@ public class RegisterManager extends Manager implements ICDIRegisterManager {
|
||||||
return null;
|
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 {
|
public void update(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
|
|
@ -105,11 +105,7 @@ public class Session implements ICDISession, ICDISessionObject {
|
||||||
return pMgr.getTarget(miSession);
|
return pMgr.getTarget(miSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public Target getCurrentTarget() {
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getCurrentTarget()
|
|
||||||
*/
|
|
||||||
public ICDITarget getCurrentTarget() {
|
|
||||||
ProcessManager pMgr = getProcessManager();
|
ProcessManager pMgr = getProcessManager();
|
||||||
return pMgr.getCurrentTarget();
|
return pMgr.getCurrentTarget();
|
||||||
}
|
}
|
||||||
|
@ -199,13 +195,12 @@ public class Session implements ICDISession, ICDISessionObject {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#setCurrentTarget()
|
* @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();
|
ProcessManager pMgr = getProcessManager();
|
||||||
if (target instanceof Target) {
|
pMgr.setCurrentTarget((Target)target);
|
||||||
pMgr.setCurrentTarget((Target)target);
|
// } else {
|
||||||
} else {
|
// throw new CDIException(CdiResources.getString("cdi.Session.Unknown_target")); //$NON-NLS-1$
|
||||||
throw new CDIException(CdiResources.getString("cdi.Session.Unknown_target")); //$NON-NLS-1$
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi;
|
package org.eclipse.cdt.debug.mi.core.cdi;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
@ -85,14 +84,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return miLibs;
|
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 {
|
public void update(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
List eventList = updateState(target);
|
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[])
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
||||||
*/
|
*/
|
||||||
public void setAutoLoadSymbols(boolean set) throws CDIException {
|
public void setAutoLoadSymbols(boolean set) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
setAutoLoadSymbols(target, set);
|
setAutoLoadSymbols(target, set);
|
||||||
}
|
}
|
||||||
public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
|
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 {
|
public boolean isAutoLoadSymbols() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return isAutoLoadSymbols(target);
|
return isAutoLoadSymbols(target);
|
||||||
}
|
}
|
||||||
public boolean isAutoLoadSymbols(Target target) throws CDIException {
|
public boolean isAutoLoadSymbols(Target target) throws CDIException {
|
||||||
|
@ -231,8 +224,13 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @param set
|
||||||
|
* @throws CDIException
|
||||||
|
*/
|
||||||
public void setStopOnSolibEvents(boolean set) throws CDIException {
|
public void setStopOnSolibEvents(boolean set) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
setStopOnSolibEvents(target, set);
|
setStopOnSolibEvents(target, set);
|
||||||
}
|
}
|
||||||
public void setStopOnSolibEvents(Target target, boolean set) throws CDIException {
|
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 {
|
public boolean isStopOnSolibEvents() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return isStopOnSolibEvents(target);
|
return isStopOnSolibEvents(target);
|
||||||
}
|
}
|
||||||
public boolean isStopOnSolibEvents(Target target) throws CDIException {
|
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[])
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
||||||
*/
|
*/
|
||||||
public void setSharedLibraryPaths(String[] libPaths) throws CDIException {
|
public void setSharedLibraryPaths(String[] libPaths) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
setSharedLibraryPaths(target, libPaths);
|
setSharedLibraryPaths(target, libPaths);
|
||||||
}
|
}
|
||||||
public void setSharedLibraryPaths(Target target, String[] libPaths) throws CDIException {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraryPaths()
|
||||||
*/
|
*/
|
||||||
public String[] getSharedLibraryPaths() throws CDIException {
|
public String[] getSharedLibraryPaths() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getSharedLibraryPaths(target);
|
return getSharedLibraryPaths(target);
|
||||||
}
|
}
|
||||||
public String[] getSharedLibraryPaths(Target target) throws CDIException {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraries()
|
||||||
*/
|
*/
|
||||||
public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
|
public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getSharedLibraries(target);
|
return getSharedLibraries(target);
|
||||||
}
|
}
|
||||||
public ICDISharedLibrary[] getSharedLibraries(Target target) throws CDIException {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols()
|
||||||
*/
|
*/
|
||||||
public void loadSymbols() throws CDIException {
|
public void loadSymbols() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
loadSymbols(target);
|
loadSymbols(target);
|
||||||
}
|
}
|
||||||
public void loadSymbols(Target target) throws CDIException {
|
public void loadSymbols(Target target) throws CDIException {
|
||||||
|
@ -342,14 +349,15 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
}
|
}
|
||||||
update();
|
update(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols(ICDISharedLibrary[])
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols(ICDISharedLibrary[])
|
||||||
*/
|
*/
|
||||||
public void loadSymbols(ICDISharedLibrary[] libs) throws CDIException {
|
public void loadSymbols(ICDISharedLibrary[] libs) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
loadSymbols(target, libs);
|
loadSymbols(target, libs);
|
||||||
}
|
}
|
||||||
public void loadSymbols(Target target, ICDISharedLibrary[] libs) throws CDIException {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISignalManager#getSignals()
|
||||||
*/
|
*/
|
||||||
public ICDISignal[] getSignals() throws CDIException {
|
public ICDISignal[] getSignals() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getSignals(target);
|
return getSignals(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,14 +188,7 @@ public class SignalManager extends Manager implements ICDISignalManager {
|
||||||
}
|
}
|
||||||
return EMPTY_SIGNALS;
|
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 {
|
public void update(Target target) throws CDIException {
|
||||||
MISession miSession = target.getMISession();
|
MISession miSession = target.getMISession();
|
||||||
MISigHandle[] miSigs = getMISignals(miSession);
|
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[])
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#addSourcePaths(String[])
|
||||||
*/
|
*/
|
||||||
public void addSourcePaths(String[] dirs) throws CDIException {
|
public void addSourcePaths(String[] dirs) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
addSourcePaths(target, dirs);
|
addSourcePaths(target, dirs);
|
||||||
}
|
}
|
||||||
public void addSourcePaths(Target target, String[] dirs) throws CDIException {
|
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()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getSourcePaths()
|
||||||
*/
|
*/
|
||||||
public String[] getSourcePaths() throws CDIException {
|
public String[] getSourcePaths() throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getSourcePaths(target);
|
return getSourcePaths(target);
|
||||||
}
|
}
|
||||||
public String[] getSourcePaths(Target target) throws CDIException {
|
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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(String, int, int)
|
||||||
*/
|
*/
|
||||||
public ICDIInstruction[] getInstructions(String filename, int linenum, int lines) throws CDIException {
|
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);
|
return getInstructions(target, filename, linenum, lines);
|
||||||
}
|
}
|
||||||
public ICDIInstruction[] getInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(long, long)
|
||||||
*/
|
*/
|
||||||
public ICDIInstruction[] getInstructions(BigInteger start, BigInteger end) throws CDIException {
|
public ICDIInstruction[] getInstructions(BigInteger start, BigInteger end) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getInstructions(target, start, end);
|
return getInstructions(target, start, end);
|
||||||
}
|
}
|
||||||
public ICDIInstruction[] getInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(String, int, int)
|
||||||
*/
|
*/
|
||||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum, int lines) throws CDIException {
|
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);
|
return getMixedInstructions(target, filename, linenum, lines);
|
||||||
}
|
}
|
||||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(String, int)
|
||||||
*/
|
*/
|
||||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum) throws CDIException {
|
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum) throws CDIException {
|
||||||
return getMixedInstructions(filename, linenum, -1);
|
return getMixedInstructions(filename, linenum, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(long, long)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getMixedInstructions(long, long)
|
||||||
*/
|
*/
|
||||||
public ICDIMixedInstruction[] getMixedInstructions(BigInteger start, BigInteger end) throws CDIException {
|
public ICDIMixedInstruction[] getMixedInstructions(BigInteger start, BigInteger end) throws CDIException {
|
||||||
Target target = (Target)getSession().getCurrentTarget();
|
Target target = ((Session)getSession()).getCurrentTarget();
|
||||||
return getMixedInstructions(target, start, end);
|
return getMixedInstructions(target, start, end);
|
||||||
}
|
}
|
||||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
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 {
|
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 {
|
public String getDetailTypeName(ICDIStackFrame frame, String typename) throws CDIException {
|
||||||
|
Session session = (Session)getSession();
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
session.setCurrentTarget(target);
|
||||||
target.setCurrentThread(frame.getThread(), false);
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
|
@ -475,16 +477,20 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTypeName(VariableObject vo, String variable) throws CDIException {
|
public String getTypeName(VariableObject vo, String variable) throws CDIException {
|
||||||
Target target = (Target)vo.getTarget();
|
Session session = (Session)getSession();
|
||||||
ICDIStackFrame frame = vo.getStackFrame();
|
ICDIStackFrame frame = vo.getStackFrame();
|
||||||
|
Target target = (Target)vo.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = null;
|
ICDIThread currentThread = null;
|
||||||
ICDIStackFrame currentFrame = null;
|
ICDIStackFrame currentFrame = null;
|
||||||
|
session.setCurrentTarget(target);
|
||||||
if (frame != null) {
|
if (frame != null) {
|
||||||
currentThread = target.getCurrentThread();
|
currentThread = target.getCurrentThread();
|
||||||
currentFrame = currentThread.getCurrentStackFrame();
|
currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
@ -504,6 +510,7 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,11 +106,7 @@ public class ThreadManager extends Manager { //implements ICDIThreadManager {
|
||||||
return new ThreadSet(cthreads, currentThreadId);
|
return new ThreadSet(cthreads, currentThreadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void update(Target target) throws CDIException {
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.derug.core.cdi.ICDIThreadManager#update()
|
|
||||||
*/
|
|
||||||
public void update() throws CDIException {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,9 +150,12 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
*/
|
*/
|
||||||
public void checkType(StackFrame frame, String type) throws CDIException {
|
public void checkType(StackFrame frame, String type) throws CDIException {
|
||||||
if (type != null && type.length() > 0) {
|
if (type != null && type.length() > 0) {
|
||||||
|
Session session = (Session)getSession();
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
session.setCurrentTarget(target);
|
||||||
target.setCurrentThread(frame.getThread(), false);
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
frame.getThread().setCurrentStackFrame(frame, false);
|
frame.getThread().setCurrentStackFrame(frame, false);
|
||||||
try {
|
try {
|
||||||
|
@ -167,6 +170,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
|
@ -232,6 +236,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
ICDIThread currentThread = null;
|
ICDIThread currentThread = null;
|
||||||
ICDIStackFrame currentFrame = null;
|
ICDIStackFrame currentFrame = null;
|
||||||
Target target = (Target)argObj.getTarget();
|
Target target = (Target)argObj.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
currentThread = target.getCurrentThread();
|
currentThread = target.getCurrentThread();
|
||||||
currentFrame = currentThread.getCurrentStackFrame();
|
currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
@ -253,6 +258,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
|
@ -271,6 +277,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
List argObjects = new ArrayList();
|
List argObjects = new ArrayList();
|
||||||
Session session = (Session) getSession();
|
Session session = (Session) getSession();
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
target.setCurrentThread(frame.getThread(), false);
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
|
@ -302,6 +309,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, 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)
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getGlobalVariableObject(String, String, String)
|
||||||
*/
|
*/
|
||||||
public ICDIVariableObject getGlobalVariableObject(String filename, String function, String name) throws CDIException {
|
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);
|
return getGlobalVariableObject(target, filename, function, name);
|
||||||
}
|
}
|
||||||
public ICDIVariableObject getGlobalVariableObject(Target target, String filename, String function, String name) throws CDIException {
|
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();
|
List varObjects = new ArrayList();
|
||||||
Session session = (Session) getSession();
|
Session session = (Session) getSession();
|
||||||
Target target = (Target)frame.getTarget();
|
Target target = (Target)frame.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
ICDIThread currentThread = target.getCurrentThread();
|
ICDIThread currentThread = target.getCurrentThread();
|
||||||
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
ICDIStackFrame currentFrame = currentThread.getCurrentStackFrame();
|
||||||
target.setCurrentThread(frame.getThread(), false);
|
target.setCurrentThread(frame.getThread(), false);
|
||||||
|
@ -423,6 +433,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, false);
|
currentThread.setCurrentStackFrame(currentFrame, false);
|
||||||
}
|
}
|
||||||
|
@ -458,6 +469,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
ICDIThread currentThread = null;
|
ICDIThread currentThread = null;
|
||||||
ICDIStackFrame currentFrame = null;
|
ICDIStackFrame currentFrame = null;
|
||||||
Target target = (Target)varObj.getTarget();
|
Target target = (Target)varObj.getTarget();
|
||||||
|
Target currentTarget = session.getCurrentTarget();
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
currentThread = target.getCurrentThread();
|
currentThread = target.getCurrentThread();
|
||||||
currentFrame = currentThread.getCurrentStackFrame();
|
currentFrame = currentThread.getCurrentStackFrame();
|
||||||
|
@ -479,6 +491,7 @@ public class VariableManager extends Manager implements ICDIVariableManager {
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
throw new MI2CDIException(e);
|
throw new MI2CDIException(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
session.setCurrentTarget(currentTarget);
|
||||||
if (currentThread != null) {
|
if (currentThread != null) {
|
||||||
target.setCurrentThread(currentThread, false);
|
target.setCurrentThread(currentThread, false);
|
||||||
currentThread.setCurrentStackFrame(currentFrame, 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,
|
* 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.
|
* 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 {
|
public void update(Target target) throws CDIException {
|
||||||
int high = 0;
|
int high = 0;
|
||||||
int low = 0;
|
int low = 0;
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class Breakpoint extends CObject implements ICDILocationBreakpoint {
|
||||||
String exp = miBreakpoints[0].getCondition();
|
String exp = miBreakpoints[0].getCondition();
|
||||||
condition = new Condition(icount, exp, tids);
|
condition = new Condition(icount, exp, tids);
|
||||||
} else {
|
} else {
|
||||||
condition = new Condition(0, "", null);
|
condition = new Condition(0, new String(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return condition;
|
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.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIExceptionpoint;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exceptionpoint
|
* Exceptionpoint
|
||||||
|
|
|
@ -288,9 +288,6 @@ public class Target implements ICDITarget {
|
||||||
return cthreads;
|
return cthreads;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getCurrentThread()
|
|
||||||
*/
|
|
||||||
public ICDIThread getCurrentThread() throws CDIException {
|
public ICDIThread getCurrentThread() throws CDIException {
|
||||||
ICDIThread[] threads = getThreads();
|
ICDIThread[] threads = getThreads();
|
||||||
for (int i = 0; i < threads.length; i++) {
|
for (int i = 0; i < threads.length; i++) {
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
package org.eclipse.cdt.debug.mi.core.cdi.model;
|
package org.eclipse.cdt.debug.mi.core.cdi.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
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.ICDIStackFrame;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
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.MIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
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.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.Format;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
|
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.ArrayValue;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolValue;
|
import org.eclipse.cdt.debug.mi.core.cdi.model.type.BoolValue;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.type.CharValue;
|
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 (this instanceof Register) {
|
||||||
// If register was on autoupdate, update all the other registers
|
// If register was on autoupdate, update all the other registers
|
||||||
// assigning may have side effects i.e. affecting 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()) {
|
if (mgr.isAutoUpdate()) {
|
||||||
mgr.update();
|
mgr.update(target);
|
||||||
}
|
}
|
||||||
} else if (this instanceof Expression) {
|
} else if (this instanceof Expression) {
|
||||||
// If expression was on autoupdate, update all the other expression
|
// If expression was on autoupdate, update all the other expression
|
||||||
// assigning may have side effects i.e. affecting other expressions.
|
// assigning may have side effects i.e. affecting other expressions.
|
||||||
ICDIExpressionManager mgr = target.getSession().getExpressionManager();
|
ExpressionManager mgr = (ExpressionManager)target.getSession().getExpressionManager();
|
||||||
if (mgr.isAutoUpdate()) {
|
if (mgr.isAutoUpdate()) {
|
||||||
mgr.update();
|
mgr.update(target);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// FIXME: Should we always call the Variable Manager ?
|
// FIXME: Should we always call the Variable Manager ?
|
||||||
ICDIVariableManager mgr = target.getSession().getVariableManager();
|
VariableManager mgr = (VariableManager)target.getSession().getVariableManager();
|
||||||
if (mgr.isAutoUpdate()) {
|
if (mgr.isAutoUpdate()) {
|
||||||
mgr.update();
|
mgr.update(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue