mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 564553: Fetch the path to GDB from GdbLaunch
In order to present the same path to the binary as actually launched, fetch the path from the GdbLaunch instance rather than reading the attribute from the launch configuration. Change-Id: I9f973a590136167d1c8d19b6af52378c95645e35 Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
This commit is contained in:
parent
c1a5fc6093
commit
1a4736c725
7 changed files with 24 additions and 20 deletions
|
@ -40,6 +40,7 @@
|
|||
<li><a href="#arduino">Arduino plug-ins and features removed.</a></li>
|
||||
<li><a href="#oldparsers">Remove LRParser, XLC and UPC.</a></li>
|
||||
<li><a href="#cdtutilsPlatform">Remove org.eclipse.cdt.utils.Platform.</a></li>
|
||||
<li><a href="#dsf">DSF and DSF-GDB API Changes.</a></li>
|
||||
</ol>
|
||||
<p>
|
||||
Planned Removals after June 2022
|
||||
|
@ -187,6 +188,16 @@
|
|||
See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=564123" target="_blank">Bug 564123</a>.
|
||||
</p>
|
||||
|
||||
<h3>9. <a name="dsf">DSF and DSF-GDB API Changes</a></h3>
|
||||
<p>
|
||||
DSF and DSF-GDB have had some small API changes, but they are still breaking changes and are listed here:
|
||||
<ul>
|
||||
<li>org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.getCLILabel(ILaunchConfiguration, String) has been removed.
|
||||
Use org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.getCLILabel(GdbLaunch, ILaunchConfiguration, String)
|
||||
instead. See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=564553" target="_blank">Bug 564553</a>.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Future Deletions</h2>
|
||||
|
|
|
@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.eclipse.cdt.dsf.ui,
|
||||
org.eclipse.debug.ui,
|
||||
org.eclipse.cdt.debug.core,
|
||||
org.eclipse.cdt.dsf.gdb;bundle-version="[5.5.0,6.0.0)",
|
||||
org.eclipse.cdt.dsf.gdb;bundle-version="[6.0.0,7.0.0)",
|
||||
org.eclipse.cdt.debug.ui,
|
||||
org.eclipse.cdt.core,
|
||||
org.eclipse.cdt.ui,
|
||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: %pluginName
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb;singleton:=true
|
||||
Bundle-Version: 5.8.200.qualifier
|
||||
Bundle-Version: 6.0.0.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.GdbPlugin
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
|
|
|
@ -206,7 +206,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 {
|
|||
launch.initializeControl();
|
||||
|
||||
// Add the GDB process object to the launch.
|
||||
launch.addCLIProcess(getCLILabel(config, gdbVersion));
|
||||
launch.addCLIProcess(getCLILabel(launch, config, gdbVersion));
|
||||
|
||||
monitor.worked(1);
|
||||
|
||||
|
@ -266,10 +266,15 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 {
|
|||
|
||||
/**
|
||||
* Return the label to be used for the CLI node
|
||||
* @since 4.6
|
||||
* @since 6.0
|
||||
*/
|
||||
protected String getCLILabel(ILaunchConfiguration config, String gdbVersion) throws CoreException {
|
||||
return LaunchUtils.getGDBPath(config).toString().trim() + " (" + gdbVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
protected String getCLILabel(GdbLaunch launch, ILaunchConfiguration config, String gdbVersion)
|
||||
throws CoreException {
|
||||
IPath gdbPath = launch.getGDBPath();
|
||||
if (gdbPath == null) {
|
||||
gdbPath = LaunchUtils.getGDBPath(config);
|
||||
}
|
||||
return gdbPath.toString().trim() + " (" + gdbVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.eclipse.core.variables,
|
||||
org.eclipse.ui.ide,
|
||||
org.eclipse.cdt.debug.core,
|
||||
org.eclipse.cdt.dsf.gdb;bundle-version="[5.5.0,6.0.0)",
|
||||
org.eclipse.cdt.dsf.gdb;bundle-version="[6.0.0,7.0.0)",
|
||||
org.eclipse.cdt.dsf.gdb.ui
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: %providerName
|
||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: %pluginName
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.llvm.dsf.lldb.core;singleton:=true
|
||||
Bundle-Version: 1.100.0.qualifier
|
||||
Bundle-Version: 1.100.100.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.debug.core,
|
||||
|
|
|
@ -44,18 +44,6 @@ public class LLDBLaunchDelegate extends GdbLaunchDelegate {
|
|||
super(requireCProject);
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: The fact that both getCLILabel and GdbLaunch.getGDBPath have to be
|
||||
* overridden and made consistent seems error prone. getCLILabel should call
|
||||
* GdbLaunch.getGDBPath somehow by default. This is something that should be
|
||||
* looked into in dsf-gdb.
|
||||
*/
|
||||
@Override
|
||||
protected String getCLILabel(ILaunchConfiguration config, String gdbVersion) throws CoreException {
|
||||
return LLDBLaunch.getLLDBPath(config).toString().trim() + " (" + Messages.LLDBLaunchDelegate_mimicking_gdb //$NON-NLS-1$
|
||||
+ " gdb " + gdbVersion + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IDsfDebugServicesFactory newServiceFactory(ILaunchConfiguration config, String version) {
|
||||
return new LLDBServiceFactory(version, config);
|
||||
|
|
Loading…
Add table
Reference in a new issue