mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
2004-10-29 Alain Magloire
Remove of ICDISharedLibraryManager * cdi/org/eclipse/cdt/debug/core/cdi/Session.java * cdi/org/eclipse/cdt/debug/core/cdi/SharedLibraryManager.java * cdi/org/eclipse/cdt/debug/core/cdi/model/Target.java * cdi/org/eclipse/cdt/debug/core/cdi/model/SharedLibraryManagement.java * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java * src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
This commit is contained in:
parent
080a687752
commit
35a28e136d
9 changed files with 82 additions and 147 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2004-10-29 Alain Magloire
|
||||||
|
Remove of ICDISharedLibraryManager
|
||||||
|
* cdi/org/eclipse/cdt/debug/core/cdi/Session.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/core/cdi/SharedLibraryManager.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/core/cdi/model/Target.java
|
||||||
|
* cdi/org/eclipse/cdt/debug/core/cdi/model/SharedLibraryManagement.java
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java
|
||||||
|
* src/org/eclipse/cdt/debug/mi/core/GDBServerCDIDebugger.java
|
||||||
|
|
||||||
2004-10-28 Alain Magloire
|
2004-10-28 Alain Magloire
|
||||||
Add ICDIValue.getType() and ICDIExpression.geType() new methods.
|
Add ICDIValue.getType() and ICDIExpression.geType() new methods.
|
||||||
|
|
||||||
|
|
|
@ -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.ICDICondition;
|
import org.eclipse.cdt.debug.core.cdi.ICDICondition;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
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.core.cdi.model.ICDILocationBreakpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
||||||
|
@ -532,10 +531,8 @@ public class BreakpointManager extends Manager {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
Session session = (Session)target.getSession();
|
Session session = (Session)target.getSession();
|
||||||
ICDISharedLibraryManager sharedMgr = session.getSharedLibraryManager();
|
SharedLibraryManager sharedMgr = session.getSharedLibraryManager();
|
||||||
if (sharedMgr instanceof SharedLibraryManager) {
|
if (sharedMgr.isDeferredBreakpoint()) {
|
||||||
SharedLibraryManager mgr = (SharedLibraryManager)sharedMgr;
|
|
||||||
if (mgr.isDeferredBreakpoint()) {
|
|
||||||
List dList = (List)deferredMap.get(target);
|
List dList = (List)deferredMap.get(target);
|
||||||
if (dList == null) {
|
if (dList == null) {
|
||||||
dList = Collections.synchronizedList(new ArrayList());
|
dList = Collections.synchronizedList(new ArrayList());
|
||||||
|
@ -546,7 +543,6 @@ public class BreakpointManager extends Manager {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return bkpt;
|
return bkpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Observer;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIEventManager;
|
import org.eclipse.cdt.debug.core.cdi.ICDIEventManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
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.event.ICDIEventListener;
|
import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
|
@ -350,14 +349,9 @@ public class EventManager extends SessionObject implements ICDIEventManager, Obs
|
||||||
MISession miSession = stopped.getMISession();
|
MISession miSession = stopped.getMISession();
|
||||||
|
|
||||||
Target currentTarget = session.getTarget(miSession);
|
Target currentTarget = session.getTarget(miSession);
|
||||||
ICDISharedLibraryManager libMgr = session.getSharedLibraryManager();
|
SharedLibraryManager mgr = session.getSharedLibraryManager();
|
||||||
SharedLibraryManager mgr = null;
|
|
||||||
|
|
||||||
if (libMgr instanceof SharedLibraryManager) {
|
if (mgr.isDeferredBreakpoint()) {
|
||||||
mgr = (SharedLibraryManager)libMgr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mgr !=null && mgr.isDeferredBreakpoint()) {
|
|
||||||
if (stopped instanceof MISharedLibEvent) {
|
if (stopped instanceof MISharedLibEvent) {
|
||||||
// Check if we have a new library loaded
|
// Check if we have a new library loaded
|
||||||
List eventList = null;
|
List eventList = null;
|
||||||
|
|
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.debug.core.cdi.ICDIEventManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterManager;
|
import org.eclipse.cdt.debug.core.cdi.ICDIRegisterManager;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIVariableManager;
|
import org.eclipse.cdt.debug.core.cdi.ICDIVariableManager;
|
||||||
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.core.cdi.model.ICDITarget;
|
||||||
|
@ -155,10 +154,7 @@ public class Session implements ICDISession, ICDISessionObject {
|
||||||
return registerManager;
|
return registerManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public SharedLibraryManager getSharedLibraryManager() {
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getSharedLibraryManager()
|
|
||||||
*/
|
|
||||||
public ICDISharedLibraryManager getSharedLibraryManager() {
|
|
||||||
return sharedLibraryManager;
|
return sharedLibraryManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,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.ICDIConfiguration;
|
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
|
||||||
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;
|
||||||
|
@ -47,7 +46,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIShared;
|
||||||
/**
|
/**
|
||||||
* Manager of the CDI shared libraries.
|
* Manager of the CDI shared libraries.
|
||||||
*/
|
*/
|
||||||
public class SharedLibraryManager extends Manager implements ICDISharedLibraryManager {
|
public class SharedLibraryManager extends Manager {
|
||||||
|
|
||||||
ICDISharedLibrary[] EMPTY_SHAREDLIB = {};
|
ICDISharedLibrary[] EMPTY_SHAREDLIB = {};
|
||||||
Map sharedMap;
|
Map sharedMap;
|
||||||
|
@ -180,14 +179,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return isDeferred;
|
return isDeferred;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
|
||||||
*/
|
|
||||||
public void setAutoLoadSymbols(boolean set) throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
setAutoLoadSymbols(target, set);
|
|
||||||
}
|
|
||||||
public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
|
public void setAutoLoadSymbols(Target target, boolean set) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -200,13 +191,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public boolean isAutoLoadSymbols() throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
return isAutoLoadSymbols(target);
|
|
||||||
}
|
|
||||||
public boolean isAutoLoadSymbols(Target target) throws CDIException {
|
public boolean isAutoLoadSymbols(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -224,15 +208,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @param set
|
|
||||||
* @throws CDIException
|
|
||||||
*/
|
|
||||||
public void setStopOnSolibEvents(boolean set) throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
setStopOnSolibEvents(target, set);
|
|
||||||
}
|
|
||||||
public void setStopOnSolibEvents(Target target, boolean set) throws CDIException {
|
public void setStopOnSolibEvents(Target target, boolean set) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -245,15 +220,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @return
|
|
||||||
* @throws CDIException
|
|
||||||
*/
|
|
||||||
public boolean isStopOnSolibEvents() throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
return isStopOnSolibEvents(target);
|
|
||||||
}
|
|
||||||
public boolean isStopOnSolibEvents(Target target) throws CDIException {
|
public boolean isStopOnSolibEvents(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -271,14 +237,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
|
|
||||||
*/
|
|
||||||
public void setSharedLibraryPaths(String[] libPaths) throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
setSharedLibraryPaths(target, libPaths);
|
|
||||||
}
|
|
||||||
public void setSharedLibraryPaths(Target target, String[] libPaths) throws CDIException {
|
public void setSharedLibraryPaths(Target target, String[] libPaths) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -291,14 +249,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraryPaths()
|
|
||||||
*/
|
|
||||||
public String[] getSharedLibraryPaths() throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
return getSharedLibraryPaths(target);
|
|
||||||
}
|
|
||||||
public String[] getSharedLibraryPaths(Target target) throws CDIException {
|
public String[] getSharedLibraryPaths(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -312,14 +262,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraries()
|
|
||||||
*/
|
|
||||||
public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
return getSharedLibraries(target);
|
|
||||||
}
|
|
||||||
public ICDISharedLibrary[] getSharedLibraries(Target target) throws CDIException {
|
public ICDISharedLibrary[] getSharedLibraries(Target target) throws CDIException {
|
||||||
List sharedList = (List)sharedMap.get(target);
|
List sharedList = (List)sharedMap.get(target);
|
||||||
if (sharedList != null) {
|
if (sharedList != null) {
|
||||||
|
@ -328,14 +270,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
return EMPTY_SHAREDLIB;
|
return EMPTY_SHAREDLIB;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols()
|
|
||||||
*/
|
|
||||||
public void loadSymbols() throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
loadSymbols(target);
|
|
||||||
}
|
|
||||||
public void loadSymbols(Target target) throws CDIException {
|
public void loadSymbols(Target target) throws CDIException {
|
||||||
MISession mi = target.getMISession();
|
MISession mi = target.getMISession();
|
||||||
CommandFactory factory = mi.getCommandFactory();
|
CommandFactory factory = mi.getCommandFactory();
|
||||||
|
@ -352,14 +286,6 @@ public class SharedLibraryManager extends Manager implements ICDISharedLibraryMa
|
||||||
update(target);
|
update(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#loadSymbols(ICDISharedLibrary[])
|
|
||||||
*/
|
|
||||||
public void loadSymbols(ICDISharedLibrary[] libs) throws CDIException {
|
|
||||||
Target target = ((Session)getSession()).getCurrentTarget();
|
|
||||||
loadSymbols(target, libs);
|
|
||||||
}
|
|
||||||
public void loadSymbols(Target target, ICDISharedLibrary[] libs) throws CDIException {
|
public void loadSymbols(Target target, ICDISharedLibrary[] libs) throws CDIException {
|
||||||
MISession miSession = target.getMISession();
|
MISession miSession = target.getMISession();
|
||||||
CommandFactory factory = miSession.getCommandFactory();
|
CommandFactory factory = miSession.getCommandFactory();
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
||||||
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.ICDIMixedInstruction;
|
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.ICDIRuntimeOptions;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
|
||||||
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.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
|
@ -40,6 +41,7 @@ import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
|
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.Session;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.SignalManager;
|
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.SourceManager;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
|
||||||
|
@ -923,4 +925,12 @@ public class Target implements ICDITarget {
|
||||||
return memMgr.getMemoryBlocks(this);
|
return memMgr.getMemoryBlocks(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibraryManagement#getSharedLibraries()
|
||||||
|
*/
|
||||||
|
public ICDISharedLibrary[] getSharedLibraries() throws CDIException {
|
||||||
|
SharedLibraryManager sharedMgr = ((Session)getSession()).getSharedLibraryManager();
|
||||||
|
return sharedMgr.getSharedLibraries(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,10 @@ import org.eclipse.cdt.debug.core.ICDIDebugger;
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -183,14 +183,16 @@ public class GDBCDIDebugger implements ICDIDebugger {
|
||||||
|
|
||||||
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CoreException {
|
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CoreException {
|
||||||
try {
|
try {
|
||||||
ICDISharedLibraryManager manager = session.getSharedLibraryManager();
|
SharedLibraryManager sharedMgr = session.getSharedLibraryManager();
|
||||||
if (manager instanceof SharedLibraryManager) {
|
|
||||||
SharedLibraryManager mgr = (SharedLibraryManager)manager;
|
|
||||||
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
||||||
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT);
|
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT);
|
||||||
|
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
|
||||||
|
ICDITarget[] dtargets = session.getTargets();
|
||||||
|
for (int i = 0; i < dtargets.length; ++i) {
|
||||||
|
Target target = (Target)dtargets[i];
|
||||||
try {
|
try {
|
||||||
mgr.setAutoLoadSymbols(autolib);
|
sharedMgr.setAutoLoadSymbols(target, autolib);
|
||||||
mgr.setStopOnSolibEvents(stopOnSolibEvents);
|
sharedMgr.setStopOnSolibEvents(target, stopOnSolibEvents);
|
||||||
// The idea is that if the user set autolib, by default
|
// The idea is that if the user set autolib, by default
|
||||||
// we provide with the capability of deferred breakpoints
|
// we provide with the capability of deferred breakpoints
|
||||||
// And we set setStopOnSolib events for them(but they should not see those things.
|
// And we set setStopOnSolib events for them(but they should not see those things.
|
||||||
|
@ -198,21 +200,20 @@ public class GDBCDIDebugger implements ICDIDebugger {
|
||||||
// If the user explicitly set stopOnSolibEvents well it probably
|
// If the user explicitly set stopOnSolibEvents well it probably
|
||||||
// means that they wanted to see those events so do no do deferred breakpoints.
|
// means that they wanted to see those events so do no do deferred breakpoints.
|
||||||
if (autolib && !stopOnSolibEvents) {
|
if (autolib && !stopOnSolibEvents) {
|
||||||
mgr.setDeferredBreakpoint(true);
|
sharedMgr.setDeferredBreakpoint(true);
|
||||||
mgr.setStopOnSolibEvents(true);
|
sharedMgr.setStopOnSolibEvents(target, true);
|
||||||
}
|
}
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
// Ignore this error
|
// Ignore this error
|
||||||
// it seems to be a real problem on many gdb platform
|
// it seems to be a real problem on many gdb platform
|
||||||
}
|
}
|
||||||
}
|
|
||||||
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
|
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] oldPaths = manager.getSharedLibraryPaths();
|
String[] oldPaths = sharedMgr.getSharedLibraryPaths(target);
|
||||||
String[] paths = new String[oldPaths.length + p.size()];
|
String[] paths = new String[oldPaths.length + p.size()];
|
||||||
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||||
manager.setSharedLibraryPaths(paths);
|
sharedMgr.setSharedLibraryPaths(target, paths);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
throw newCoreException(MIPlugin.getResourceString("src.GDBDebugger.Error_initializing_shared_lib_options") + e.getMessage(), e); //$NON-NLS-1$
|
throw newCoreException(MIPlugin.getResourceString("src.GDBDebugger.Error_initializing_shared_lib_options") + e.getMessage(), e); //$NON-NLS-1$
|
||||||
|
|
|
@ -18,27 +18,29 @@ import java.util.List;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugger;
|
import org.eclipse.cdt.debug.core.ICDebugger;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
|
||||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
|
|
||||||
public class GDBDebugger implements ICDebugger {
|
public class GDBDebugger implements ICDebugger {
|
||||||
|
|
||||||
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
||||||
try {
|
try {
|
||||||
ICDISharedLibraryManager manager = session.getSharedLibraryManager();
|
SharedLibraryManager mgr = session.getSharedLibraryManager();
|
||||||
if (manager instanceof SharedLibraryManager) {
|
|
||||||
SharedLibraryManager mgr = (SharedLibraryManager)manager;
|
|
||||||
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
||||||
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT);
|
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IMILaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT);
|
||||||
|
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
|
||||||
|
ICDITarget[] dtargets = session.getTargets();
|
||||||
|
for (int i = 0; i < dtargets.length; ++i) {
|
||||||
|
Target target = (Target)dtargets[i];
|
||||||
try {
|
try {
|
||||||
mgr.setAutoLoadSymbols(autolib);
|
mgr.setAutoLoadSymbols(target, autolib);
|
||||||
mgr.setStopOnSolibEvents(stopOnSolibEvents);
|
mgr.setStopOnSolibEvents(target, stopOnSolibEvents);
|
||||||
// The idea is that if the user set autolib, by default
|
// The idea is that if the user set autolib, by default
|
||||||
// we provide with the capability of deferred breakpoints
|
// we provide with the capability of deferred breakpoints
|
||||||
// And we set setStopOnSolib events for them(but they should not see those things.
|
// And we set setStopOnSolib events for them(but they should not see those things.
|
||||||
|
@ -47,20 +49,19 @@ public class GDBDebugger implements ICDebugger {
|
||||||
// means that they wanted to see those events so do no do deferred breakpoints.
|
// means that they wanted to see those events so do no do deferred breakpoints.
|
||||||
if (autolib && !stopOnSolibEvents) {
|
if (autolib && !stopOnSolibEvents) {
|
||||||
mgr.setDeferredBreakpoint(true);
|
mgr.setDeferredBreakpoint(true);
|
||||||
mgr.setStopOnSolibEvents(true);
|
mgr.setStopOnSolibEvents(target, true);
|
||||||
}
|
}
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
// Ignore this error
|
// Ignore this error
|
||||||
// it seems to be a real problem on many gdb platform
|
// it seems to be a real problem on many gdb platform
|
||||||
}
|
}
|
||||||
}
|
|
||||||
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
|
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] oldPaths = manager.getSharedLibraryPaths();
|
String[] oldPaths = mgr.getSharedLibraryPaths(target);
|
||||||
String[] paths = new String[oldPaths.length + p.size()];
|
String[] paths = new String[oldPaths.length + p.size()];
|
||||||
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
System.arraycopy(p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||||
manager.setSharedLibraryPaths(paths);
|
mgr.setSharedLibraryPaths(target, paths);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
throw new CDIException(MIPlugin.getResourceString("src.GDBDebugger.Error_initializing_shared_lib_options") + e.getMessage()); //$NON-NLS-1$
|
throw new CDIException(MIPlugin.getResourceString("src.GDBDebugger.Error_initializing_shared_lib_options") + e.getMessage()); //$NON-NLS-1$
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.List;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugger;
|
import org.eclipse.cdt.debug.core.ICDebugger;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||||
|
@ -38,19 +37,21 @@ public class GDBServerDebugger implements ICDebugger {
|
||||||
|
|
||||||
void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
||||||
try {
|
try {
|
||||||
ICDISharedLibraryManager mgr = session.getSharedLibraryManager();
|
SharedLibraryManager mgr = session.getSharedLibraryManager();
|
||||||
if (mgr instanceof SharedLibraryManager) {
|
|
||||||
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT);
|
||||||
|
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, new ArrayList(1));
|
||||||
|
ICDITarget[] dtargets = session.getTargets();
|
||||||
|
for (int i = 0; i < dtargets.length; ++i) {
|
||||||
|
Target target = (Target)dtargets[i];
|
||||||
try {
|
try {
|
||||||
((SharedLibraryManager)mgr).setAutoLoadSymbols(autolib);
|
mgr.setAutoLoadSymbols(target, autolib);
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
// ignore this one, cause problems for many gdb.
|
// ignore this one, cause problems for many gdb.
|
||||||
}
|
}
|
||||||
}
|
|
||||||
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, new ArrayList(1));
|
|
||||||
if (p.size() > 0) {
|
if (p.size() > 0) {
|
||||||
String[] paths = (String[])p.toArray(new String[0]);
|
String[] paths = (String[])p.toArray(new String[0]);
|
||||||
mgr.setSharedLibraryPaths(paths);
|
mgr.setSharedLibraryPaths(target, paths);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
throw new CDIException(MIPlugin.getResourceString("src.GDBServerDebugger.Error_initializing") + e.getMessage()); //$NON-NLS-1$
|
throw new CDIException(MIPlugin.getResourceString("src.GDBServerDebugger.Error_initializing") + e.getMessage()); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue