[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] new methods in SharedLibraryManager
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.85
diff -u -r1.85 ChangeLog
--- ChangeLog 29 Jan 2003 03:48:18 -0000 1.85
+++ ChangeLog 29 Jan 2003 19:18:18 -0000
@@ -1,3 +1,12 @@
+2003-01-29 Alain Magloire
+
+ * src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java (getSharedLibraryPaths):
+ New method.
+ (setSharedLibraryPaths): New method.
+ (setAutoLoadSymbols): New methos set autosolib.
+ * src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java (setAutoSolib):
+ Move to SharedLibraryManager.java
+
2003-01-28 Alain Magloire
* src/org/eclipse/cdt/debug/mi/core/command/MIInfoSignals.java:
Index: src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java,v
retrieving revision 1.12
diff -u -r1.12 GDBDebugger.java
--- src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java 27 Jan 2003 03:21:23 -0000 1.12
+++ src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java 29 Jan 2003 19:18:18 -0000
@@ -12,8 +12,8 @@
import org.eclipse.cdt.debug.core.ICDebugger;
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
import org.eclipse.cdt.debug.mi.core.cdi.Session;
-import org.eclipse.cdt.debug.mi.core.cdi.SourceManager;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -23,13 +23,13 @@
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
try {
- SourceManager mgr = (SourceManager)session.getSourceManager();
+ ICDISharedLibraryManager mgr = session.getSharedLibraryManager();
boolean autolib = config.getAttribute(IMILaunchConfigurationConstants.ATTR_AUTO_SOLIB, true);
- mgr.setAutoSolib(autolib);
+ mgr.setAutoLoadSymbols(autolib);
List p = config.getAttribute(IMILaunchConfigurationConstants.ATTR_SOLIB_PATH, new ArrayList(1));
if (p.size() > 0) {
String[] paths = (String[])p.toArray(new String[0]);
- mgr.setLibraryPaths(paths);
+ mgr.setSharedLibraryPaths(paths);
}
} catch (CoreException e) {
throw new CDIException("Error initializing: " + e.getMessage());
Index: src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java,v
retrieving revision 1.8
diff -u -r1.8 SharedLibraryManager.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java 28 Jan 2003 03:45:40 -0000 1.8
+++ src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java 29 Jan 2003 19:18:18 -0000
@@ -17,12 +17,16 @@
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.model.SharedLibrary;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
+import org.eclipse.cdt.debug.mi.core.command.MIGDBSetAutoSolib;
+import org.eclipse.cdt.debug.mi.core.command.MIGDBSetSolibSearchPath;
+import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
import org.eclipse.cdt.debug.mi.core.command.MIInfoSharedLibrary;
import org.eclipse.cdt.debug.mi.core.command.MISharedLibrary;
import org.eclipse.cdt.debug.mi.core.event.MIEvent;
import org.eclipse.cdt.debug.mi.core.event.MISharedLibChangedEvent;
import org.eclipse.cdt.debug.mi.core.event.MISharedLibCreatedEvent;
import org.eclipse.cdt.debug.mi.core.event.MISharedLibUnloadedEvent;
+import org.eclipse.cdt.debug.mi.core.output.MIGDBShowSolibSearchPathInfo;
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
import org.eclipse.cdt.debug.mi.core.output.MIInfoSharedLibraryInfo;
import org.eclipse.cdt.debug.mi.core.output.MIShared;
@@ -152,6 +156,55 @@
}
}
return null;
+ }
+
+ /**
+ * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
+ */
+ public void setAutoLoadSymbols(boolean set) throws CDIException {
+ Session session = (Session)getSession();
+ MISession mi = session.getMISession();
+ CommandFactory factory = mi.getCommandFactory();
+ MIGDBSetAutoSolib solib = factory.createMIGDBSetAutoSolib(set);
+ try {
+ mi.postCommand(solib);
+ solib.getMIInfo();
+ } catch (MIException e) {
+ throw new MI2CDIException(e);
+ }
+ }
+
+ /**
+ * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
+ */
+ public void setSharedLibraryPaths(String[] libPaths) throws CDIException {
+ Session session = (Session)getSession();
+ MISession mi = session.getMISession();
+ CommandFactory factory = mi.getCommandFactory();
+ MIGDBSetSolibSearchPath solib = factory.createMIGDBSetSolibSearchPath(libPaths);
+ try {
+ mi.postCommand(solib);
+ solib.getMIInfo();
+ } catch (MIException e) {
+ throw new MI2CDIException(e);
+ }
+ }
+
+ /**
+ * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#getSharedLibraryPaths()
+ */
+ public String[] getSharedLibraryPaths() throws CDIException {
+ Session session = (Session)getSession();
+ MISession mi = session.getMISession();
+ CommandFactory factory = mi.getCommandFactory();
+ MIGDBShowSolibSearchPath dir = factory.createMIGDBShowSolibSearchPath();
+ try {
+ mi.postCommand(dir);
+ MIGDBShowSolibSearchPathInfo info = dir.getMIGDBShowSolibSearchPathInfo();
+ return info.getDirectories();
+ } catch (MIException e) {
+ throw new MI2CDIException(e);
+ }
}
/**
Index: src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java,v
retrieving revision 1.20
diff -u -r1.20 SourceManager.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java 27 Jan 2003 03:19:33 -0000 1.20
+++ src/org/eclipse/cdt/debug/mi/core/cdi/SourceManager.java 29 Jan 2003 19:18:18 -0000
@@ -16,14 +16,10 @@
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIDataDisassemble;
import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentDirectory;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetAutoSolib;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetSolibSearchPath;
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowDirectories;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
import org.eclipse.cdt.debug.mi.core.output.MIAsm;
import org.eclipse.cdt.debug.mi.core.output.MIDataDisassembleInfo;
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowDirectoriesInfo;
-import org.eclipse.cdt.debug.mi.core.output.MIGDBShowSolibSearchPathInfo;
import org.eclipse.cdt.debug.mi.core.output.MISrcAsm;
@@ -66,46 +62,6 @@
mi.postCommand(dir);
MIGDBShowDirectoriesInfo info = dir.getMIGDBShowDirectoriesInfo();
return info.getDirectories();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public void setLibraryPaths(String[] libPaths) throws CDIException {
- Session session = (Session)getSession();
- MISession mi = session.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBSetSolibSearchPath solib = factory.createMIGDBSetSolibSearchPath(libPaths);
- try {
- mi.postCommand(solib);
- solib.getMIInfo();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public String[] getLibraryPaths() throws CDIException {
- Session session = (Session)getSession();
- MISession mi = session.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBShowSolibSearchPath dir = factory.createMIGDBShowSolibSearchPath();
- try {
- mi.postCommand(dir);
- MIGDBShowSolibSearchPathInfo info = dir.getMIGDBShowSolibSearchPathInfo();
- return info.getDirectories();
- } catch (MIException e) {
- throw new MI2CDIException(e);
- }
- }
-
- public void setAutoSolib(boolean set) throws CDIException {
- Session session = (Session)getSession();
- MISession mi = session.getMISession();
- CommandFactory factory = mi.getCommandFactory();
- MIGDBSetAutoSolib solib = factory.createMIGDBSetAutoSolib(set);
- try {
- mi.postCommand(solib);
- solib.getMIInfo();
} catch (MIException e) {
throw new MI2CDIException(e);
}