mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Check for Shared library support.
This commit is contained in:
parent
b4ce2ca28f
commit
6d076ba860
5 changed files with 33 additions and 2 deletions
|
@ -83,6 +83,13 @@ public interface ICDIConfiguration
|
||||||
*/
|
*/
|
||||||
boolean supportsRegisterModification();
|
boolean supportsRegisterModification();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this session supports shared library.
|
||||||
|
*
|
||||||
|
* @return whether this session supports registers modification
|
||||||
|
*/
|
||||||
|
boolean supportsSharedLibrary();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this session supports memory retrieval.
|
* Returns whether this session supports memory retrieval.
|
||||||
*
|
*
|
||||||
|
|
|
@ -185,12 +185,16 @@ public class CSession implements ICDISession, ICDISessionObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICSuration()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getConfiguration()
|
||||||
*/
|
*/
|
||||||
public ICDIConfiguration getConfiguration() {
|
public ICDIConfiguration getConfiguration() {
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setConfiguration(ICDIConfiguration conf) {
|
||||||
|
configuration = conf;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getRuntimeOptions()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDISession#getRuntimeOptions()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -76,6 +76,13 @@ public class Configuration implements ICDIConfiguration {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSharedLibrary()
|
||||||
|
*/
|
||||||
|
public boolean supportsSharedLibrary() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsRestart()
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsRestart()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -65,4 +65,11 @@ public class CoreFileConfiguration implements ICDIConfiguration {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.debug.core.cdi.ICDIConfiguration#supportsSharedLibrary()
|
||||||
|
*/
|
||||||
|
public boolean supportsSharedLibrary() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
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.ICDISharedLibraryManager;
|
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;
|
||||||
|
@ -41,8 +42,13 @@ public class SharedLibraryManager extends SessionObject implements ICDISharedLib
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update() throws CDIException {
|
public void update() throws CDIException {
|
||||||
MIShared[] miLibs = new MIShared[0];
|
|
||||||
CSession s = getCSession();
|
CSession s = getCSession();
|
||||||
|
ICDIConfiguration conf = s.getConfiguration();
|
||||||
|
if (!conf.supportsSharedLibrary()) {
|
||||||
|
return; // Bail out early;
|
||||||
|
}
|
||||||
|
|
||||||
|
MIShared[] miLibs = new MIShared[0];
|
||||||
CommandFactory factory = s.getMISession().getCommandFactory();
|
CommandFactory factory = s.getMISession().getCommandFactory();
|
||||||
MIInfoSharedLibrary infoShared = factory.createMIInfoSharedLibrary();
|
MIInfoSharedLibrary infoShared = factory.createMIInfoSharedLibrary();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue