mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
Added the initialization of the shared libraries' attributes to CygwinGDBDebugger.
This commit is contained in:
parent
f72312491a
commit
dbfda6695e
2 changed files with 35 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-29 Mikhail Khodjaiants
|
||||
Added the initialization of the shared libraries' attributes to CygwinGDBDebugger.
|
||||
|
||||
* src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
|
||||
|
||||
2003-09-26 Alain Magloire
|
||||
|
||||
Second part of PR 43496.
|
||||
|
@ -14,7 +19,7 @@
|
|||
|
||||
* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
|
||||
|
||||
2003-11-10 Mikhail Khodjaiants
|
||||
2003-09-11 Mikhail Khodjaiants
|
||||
Moving the shared library search paths block to mi UI.
|
||||
* IMILaunchConfigurationConstants.java: added the 'ATTR_DEBUGGER_SOLIB_PATH' attribute.
|
||||
|
||||
|
@ -30,7 +35,7 @@
|
|||
|
||||
2003-09-09 Mikhail Khodjaiants
|
||||
Added the 'stop-on-solib-events' option.
|
||||
Changed the initialization of the hared library search path.
|
||||
Changed the initialization of the shared library search path.
|
||||
Changed the messages of the thrown exceptions.
|
||||
* GDBDebugger.java
|
||||
|
||||
|
|
|
@ -5,14 +5,20 @@
|
|||
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
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.SharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CygwinCommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
|
||||
|
@ -25,8 +31,29 @@ public class CygwinGDBDebugger extends GDBDebugger {
|
|||
static final CygwinCommandFactory commandFactory =
|
||||
new CygwinCommandFactory();
|
||||
|
||||
/* Cygwin does not have any special initialization like solib paths etc.. */
|
||||
protected void initializeLibraries(ILaunchConfiguration config, Session session) throws CDIException {
|
||||
try {
|
||||
ICDISharedLibraryManager mgr = session.getSharedLibraryManager();
|
||||
if (mgr instanceof SharedLibraryManager) {
|
||||
boolean stopOnSolibEvents = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false);
|
||||
try {
|
||||
((SharedLibraryManager)mgr).setStopOnSolibEvents(stopOnSolibEvents);
|
||||
} catch (CDIException e) {
|
||||
// Ignore this error
|
||||
// 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) {
|
||||
String[] oldPaths = mgr.getSharedLibraryPaths();
|
||||
String[] paths = new String[oldPaths.length + p.size()];
|
||||
System.arraycopy((String[])p.toArray(new String[p.size()]), 0, paths, 0, p.size());
|
||||
System.arraycopy(oldPaths, 0, paths, p.size(), oldPaths.length);
|
||||
mgr.setSharedLibraryPaths(paths);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
throw new CDIException("Error initializing shared library options: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public ICDISession createLaunchSession(
|
||||
|
|
Loading…
Add table
Reference in a new issue