Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Moving shared library features from mi to CDI

 
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.237
diff -u -r1.237 ChangeLog
--- ChangeLog	21 Aug 2003 15:24:21 -0000	1.237
+++ ChangeLog	29 Aug 2003 20:40:03 -0000
@@ -1,3 +1,14 @@
+2003-08-29 Mikhail Khodjaiants
+	Moving shared library features from mi to CDI.
+	Added new methods to ICDISharedLibraryManager:
+	- isAutoLoadSymbols
+	- isStopOnSolibEvents
+	- setAutoLoadSymbols
+	- setStopOnSolibEvents
+	- supportsAutoLoadSymbols
+	- supportsStopOnSolibEvents
+	* ICDISharedLibraryManager.java 
+
 2003-08-21 Mikhail Khodjaiants
 	Removed the 'isAccessSpecifier' method from CVaraiable.
 	* CArrayPartitionValue.java

Index: ICDISharedLibraryManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICDISharedLibraryManager.java,v
retrieving revision 1.5
diff -u -r1.5 ICDISharedLibraryManager.java
--- ICDISharedLibraryManager.java	13 Feb 2003 00:15:49 -0000	1.5
+++ ICDISharedLibraryManager.java	29 Aug 2003 20:39:42 -0000
@@ -25,7 +25,7 @@
 	ICDISharedLibrary[] getSharedLibraries() throws CDIException;
 
 	/**
-	 * load symbols for the specified shared libraries.
+	 * Loads symbols for the specified shared libraries.
 	 * 
 	 * @return the array of loaded shared libraries
 	 * @throws CDIException on failure. Reasons include:
@@ -33,7 +33,7 @@
 	void loadSymbols(ICDISharedLibrary[] libs) throws CDIException;
 
 	/**
-	 * load symbols of all the shared libs.
+	 * Loads symbols of all shared libraries.
 	 * 
 	 * @return the array of loaded shared libraries
 	 * @throws CDIException on failure. Reasons include:
@@ -41,19 +41,64 @@
 	void loadSymbols() throws CDIException;
 
 	/**
-	 * return the search paths for shared libraries.
+	 * Returns the search paths for shared libraries.
 	 * 
-	 * @return String[]
+	 * @return the array of the search paths
 	 * @throws CDIException
 	 */
 	String[] getSharedLibraryPaths() throws CDIException;
 
 	/**
-	 * Reset the shared libs paths to libpaths.
-	 * @param libpaths
+	 * Sets the shared libs paths to libpaths.
+	 * 
+	 * @param array of search paths
 	 * @throws CDIException
 	 */
 	void setSharedLibraryPaths(String[] libpaths) throws CDIException;
 
+	/**
+	 * Sets the "automatically load symbols from shared libraries" mode.
+	 *  
+	 * @param set
+	 * @throws CDIException
+	 */
+	void setAutoLoadSymbols(boolean set) throws CDIException;
+
+	/**
+	 * Returns the current autoloading mode.
+	 * 
+	 * @return the current autoloading mode
+	 * @throws CDIException
+	 */
+	boolean isAutoLoadSymbols() throws CDIException;
+
+	/**
+	 * Returns whether this manager supports autoloading.
+	 * 
+	 * @return whether this manager supports autoloading
+	 */
+	boolean supportsAutoLoadSymbols();
+
+	/**
+	 * Sets the "stop on shared library events" mode.
+	 * 
+	 * @param set
+	 * @throws CDIException
+	 */
+	void setStopOnSolibEvents(boolean set) throws CDIException;
 
+	/**
+	 * Returns the current mode of shared library events handling.
+	 * 
+	 * @return the current mode of shared library events handling
+	 * @throws CDIException
+	 */
+	boolean isStopOnSolibEvents() throws CDIException;
+
+	/**
+	 * Returns whether this manager supports shared library events handling.
+	 * 
+	 * @return whether this manager supports shared library events handling
+	 */
+	boolean supportsStopOnSolibEvents();
 }
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.171
diff -u -r1.171 ChangeLog
--- ChangeLog	26 Aug 2003 18:23:38 -0000	1.171
+++ ChangeLog	29 Aug 2003 20:47:51 -0000
@@ -1,3 +1,14 @@
+2003-08-29 Mikhail Khodjaiants
+	
+	Added new command - 'set stop-on-solib-events'.
+	 
+	* src/org/eclipse/cdt/debug/mi/core/command/MIGDBSetStopOnSolibEvents.java
+	* src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
+
+	Implementation of the new methods added to the 'ICDISharedLibraryManager' interface.
+	
+	* src/org/eclipse/cdt/debug/mi/core/cdi/SharedLibraryManager.java
+
 2003-08-26 Alain Magloire
 
 	This is still a hack: "info shared"  the real solution
Index: 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.12
diff -u -r1.12 SharedLibraryManager.java
--- SharedLibraryManager.java	12 Feb 2003 18:53:57 -0000	1.12
+++ SharedLibraryManager.java	29 Aug 2003 20:47:06 -0000
@@ -19,6 +19,7 @@
 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.MIGDBSetStopOnSolibEvents;
 import org.eclipse.cdt.debug.mi.core.command.MIGDBShow;
 import org.eclipse.cdt.debug.mi.core.command.MIGDBShowSolibSearchPath;
 import org.eclipse.cdt.debug.mi.core.command.MIInfoSharedLibrary;
@@ -168,6 +169,37 @@
 		return false;
 	}
 
+	public void setStopOnSolibEvents(boolean set) throws CDIException {
+		Session session = (Session)getSession();
+		MISession mi = session.getMISession();
+		CommandFactory factory = mi.getCommandFactory();
+		MIGDBSetStopOnSolibEvents stop = factory.createMIGDBSetStopOnSolibEvents(set);
+		try {
+			mi.postCommand(stop);
+			stop.getMIInfo();
+		} catch (MIException e) {
+			throw new MI2CDIException(e);
+		}
+	}
+
+	public boolean isStopOnSolibEvents() throws CDIException {
+		Session session = (Session)getSession();
+		MISession mi = session.getMISession();
+		CommandFactory factory = mi.getCommandFactory();
+		MIGDBShow show = factory.createMIGDBShow(new String[]{"stop-on-solib-events"});
+		try {
+			mi.postCommand(show);
+			MIGDBShowInfo info = show.getMIGDBShowInfo();
+			String value = info.getValue();
+			if (value != null) {
+				return value.equalsIgnoreCase("1");
+			}
+		} catch (MIException e) {
+			throw new MI2CDIException(e);
+		}
+		return false;
+	}
+
 	/**
 	 * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#setSharedLibraryPaths(String[])
 	 */
@@ -268,4 +300,19 @@
 		autoupdate = update;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#supportsAutoLoadSymbols()
+	 */
+	public boolean supportsAutoLoadSymbols()
+	{
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager#supportsStopOnSolibEvents()
+	 */
+	public boolean supportsStopOnSolibEvents()
+	{
+		return true;
+	}
 }
Index: CommandFactory.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java,v
retrieving revision 1.24
diff -u -r1.24 CommandFactory.java
--- CommandFactory.java	24 Apr 2003 15:20:24 -0000	1.24
+++ CommandFactory.java	29 Aug 2003 20:46:26 -0000
@@ -181,6 +181,10 @@
 		return new MIGDBSetAutoSolib(set);
 	}
 
+	public MIGDBSetStopOnSolibEvents createMIGDBSetStopOnSolibEvents(boolean set) {
+		return new MIGDBSetStopOnSolibEvents(set);
+	}
+
 	public MIGDBSetSolibSearchPath createMIGDBSetSolibSearchPath(String[] params) {
 		return new MIGDBSetSolibSearchPath(params);
 	}
Index: MIGDBSetStopOnSolibEvents.java
===================================================================
RCS file: MIGDBSetStopOnSolibEvents.java
diff -N MIGDBSetStopOnSolibEvents.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MIGDBSetStopOnSolibEvents.java	29 Aug 2003 20:46:27 -0000
@@ -0,0 +1,20 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ * 
+ */
+
+package org.eclipse.cdt.debug.mi.core.command;
+
+/**
+ * 
+ *      -gdb-set stop-on-solib-events
+ *
+ *   Set an internal GDB variable.
+ * 
+ */
+public class MIGDBSetStopOnSolibEvents extends MIGDBSet {
+	public MIGDBSetStopOnSolibEvents(boolean isSet) {
+		super(new String[] {"stop-on-solib-events", (isSet) ? "1" : "0"});
+	}
+}

Back to the top