diff options
author | Alain Magloire | 2003-01-17 15:12:05 +0000 |
---|---|---|
committer | Alain Magloire | 2003-01-17 15:12:05 +0000 |
commit | 90e870294f9eb8d1624e75910e09a5c9c6b55a37 (patch) | |
tree | ccc07d5052b512355c8748a053e4e4dcc82cc158 | |
parent | 449883344d56acfe930425c18f844867b59c4955 (diff) | |
download | org.eclipse.cdt-90e870294f9eb8d1624e75910e09a5c9c6b55a37.tar.gz org.eclipse.cdt-90e870294f9eb8d1624e75910e09a5c9c6b55a37.tar.xz org.eclipse.cdt-90e870294f9eb8d1624e75910e09a5c9c6b55a37.zip |
Get the cwd and gdbinit location.
-rw-r--r-- | debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java index 95e6484594d..15b4b5a1d98 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java @@ -38,7 +38,9 @@ public class GDBDebugger implements ICDebugger { public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException { try { String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb"); - CSession session = (CSession)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toOSString()); + String cwd = exe.getProject().getLocation().toOSString(); + String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit"); + CSession session = (CSession)MIPlugin.getDefault().createCSession(cwd, gdbinit, gdb, exe.getLocation().toOSString()); initializeLibraries(config, session); return session; } catch (IOException e) { @@ -53,7 +55,9 @@ public class GDBDebugger implements ICDebugger { public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException { try { String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb"); - CSession session = (CSession)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toOSString(), pid, null); + String cwd = exe.getProject().getLocation().toOSString(); + String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit"); + CSession session = (CSession)MIPlugin.getDefault().createCSession(cwd, gdbinit, gdb, exe.getLocation().toOSString(), pid, null); initializeLibraries(config, session); return session; } catch (IOException e) { @@ -69,7 +73,9 @@ public class GDBDebugger implements ICDebugger { public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile) throws CDIException { try { String gdb = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb"); - CSession session = (CSession)MIPlugin.getDefault().createCSession(gdb, exe.getLocation().toOSString(), corefile.toOSString()); + String cwd = exe.getProject().getLocation().toOSString(); + String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit"); + CSession session = (CSession)MIPlugin.getDefault().createCSession(cwd, gdbinit, gdb, exe.getLocation().toOSString(), corefile.toOSString()); initializeLibraries(config, session); return session; } catch (IOException e) { |