mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
2004-10-26 Alain Magloire
Remove of ICDISourceManager in CDI * cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java * mi/org/eclipse/cdt/debug/mi/core/cdi/command/MIDataDsassemble.java
This commit is contained in:
parent
1b38b3e339
commit
3374f172f0
5 changed files with 95 additions and 67 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-10-26 Alain Magloire
|
||||
Remove of ICDISourceManager in CDI
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java
|
||||
|
||||
* mi/org/eclipse/cdt/debug/mi/core/cdi/command/MIDataDsassemble.java
|
||||
|
||||
2004-10-26 Alain Magloire
|
||||
Remove of ICDISignalManager in CDI
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Session.java
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.debug.core.cdi.ICDIRegisterManager;
|
|||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISourceManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIVariableManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
|
@ -175,10 +174,7 @@ public class Session implements ICDISession, ICDISessionObject {
|
|||
return signalManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getSourceManager()
|
||||
*/
|
||||
public ICDISourceManager getSourceManager() {
|
||||
public SourceManager getSourceManager() {
|
||||
return sourceManager;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.math.BigInteger;
|
|||
import java.util.StringTokenizer;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISourceManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
||||
|
@ -62,7 +61,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIWhatisInfo;
|
|||
|
||||
/**
|
||||
*/
|
||||
public class SourceManager extends Manager implements ICDISourceManager {
|
||||
public class SourceManager extends Manager {
|
||||
|
||||
GDBTypeParser gdbTypeParser;
|
||||
|
||||
|
@ -71,14 +70,6 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
gdbTypeParser = new GDBTypeParser();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#addSourcePaths(String[])
|
||||
*/
|
||||
public void addSourcePaths(String[] dirs) throws CDIException {
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
addSourcePaths(target, dirs);
|
||||
}
|
||||
public void addSourcePaths(Target target, String[] dirs) throws CDIException {
|
||||
Session session = (Session)getSession();
|
||||
MISession mi = target.getMISession();
|
||||
|
@ -92,14 +83,6 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getSourcePaths()
|
||||
*/
|
||||
public String[] getSourcePaths() throws CDIException {
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getSourcePaths(target);
|
||||
}
|
||||
public String[] getSourcePaths(Target target) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -113,14 +96,10 @@ 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 = ((Session)getSession()).getCurrentTarget();
|
||||
return getInstructions(target, filename, linenum, lines);
|
||||
public ICDIInstruction[] getInstructions(Target target, String filename, int linenum) throws CDIException {
|
||||
return getInstructions(target, filename, linenum, -1);
|
||||
}
|
||||
|
||||
public ICDIInstruction[] getInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -139,21 +118,6 @@ public class SourceManager extends Manager implements ICDISourceManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(String, int)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(String filename, int linenum) throws CDIException {
|
||||
return getInstructions(filename, linenum, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISourceManager#getInstructions(long, long)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(BigInteger start, BigInteger end) throws CDIException {
|
||||
Target target = ((Session)getSession()).getCurrentTarget();
|
||||
return getInstructions(target, start, end);
|
||||
}
|
||||
public ICDIInstruction[] getInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -175,14 +139,10 @@ 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 = ((Session)getSession()).getCurrentTarget();
|
||||
return getMixedInstructions(target, filename, linenum, lines);
|
||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum) throws CDIException {
|
||||
return getMixedInstructions(target, filename, linenum, -1);
|
||||
}
|
||||
|
||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, String filename, int linenum, int lines) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
@ -201,21 +161,6 @@ 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 = ((Session)getSession()).getCurrentTarget();
|
||||
return getMixedInstructions(target, start, end);
|
||||
}
|
||||
public ICDIMixedInstruction[] getMixedInstructions(Target target, BigInteger start, BigInteger end) throws CDIException {
|
||||
MISession mi = target.getMISession();
|
||||
CommandFactory factory = mi.getCommandFactory();
|
||||
|
|
|
@ -20,7 +20,9 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
|||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRuntimeOptions;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
||||
|
@ -37,6 +39,7 @@ 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.Session;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.SignalManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIDataEvaluateExpression;
|
||||
|
@ -814,4 +817,68 @@ public class Target implements ICDITarget {
|
|||
return sigMgr.getSignals(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#addSourcePaths(java.lang.String[])
|
||||
*/
|
||||
public void addSourcePaths(String[] srcPaths) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
srcMgr.addSourcePaths(this, srcPaths);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getSourcePaths()
|
||||
*/
|
||||
public String[] getSourcePaths() throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getSourcePaths(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.math.BigInteger, java.math.BigInteger)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(BigInteger startAddress, BigInteger endAddress) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getInstructions(this, startAddress, endAddress);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.lang.String, int)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(String filename, int linenum) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getInstructions(this, filename, linenum);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getInstructions(java.lang.String, int, int)
|
||||
*/
|
||||
public ICDIInstruction[] getInstructions(String filename, int linenum, int lines) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getInstructions(this, filename, linenum, lines);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.math.BigInteger, java.math.BigInteger)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(BigInteger startAddress, BigInteger endAddress) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getMixedInstructions(this, startAddress, endAddress);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.lang.String, int)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getMixedInstructions(this, filename, linenum);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISourceManagement#getMixedInstructions(java.lang.String, int, int)
|
||||
*/
|
||||
public ICDIMixedInstruction[] getMixedInstructions(String filename, int linenum, int lines) throws CDIException {
|
||||
SourceManager srcMgr = ((Session)getSession()).getSourceManager();
|
||||
return srcMgr.getMixedInstructions(this, filename, linenum, lines);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -107,4 +107,16 @@ public class MIDataDisassemble extends MICommand
|
|||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
/*
|
||||
* GDB the -data-disassemble uses "--" as a separator wit only the MODE
|
||||
* So override the MICommand
|
||||
*/
|
||||
protected String parametersToString() {
|
||||
if (parameters != null && parameters.length > 0) {
|
||||
return "-- " + parameters[0]; //$NON-NLS-1$
|
||||
}
|
||||
return new String();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue