1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 455408 - Improve GDB label in the debug view

Change-Id: Iff449cd71f57ebcd9c8888f9958853323a6b7c2b
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38679
Tested-by: Hudson CI
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
This commit is contained in:
Marc Khouzam 2014-12-22 10:10:27 -05:00
parent 6a765aed3b
commit bbf27fec22

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2012 QNX Software Systems and others.
* Copyright (c) 2008, 2015 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -15,6 +15,7 @@
* Anton Gorenkov - Need to use a process factory (Bug 210366)
* Marc Khouzam (Ericsson) - Cleanup the launch if it is cancelled (Bug 374374)
* Marc-Andre Laperle - Bug 382462
* Marc Khouzam (Ericsson - Show GDB version in debug view node label (Bug 455408)
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.launching;
@ -201,7 +202,7 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
launch.initializeControl();
// Add the GDB process object to the launch.
launch.addCLIProcess("gdb"); //$NON-NLS-1$
launch.addCLIProcess(getCLILabel(config, gdbVersion));
monitor.worked(1);
@ -249,6 +250,14 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
}
}
/**
* Return the label to be used for the CLI node
* @since 4.6
*/
protected String getCLILabel(ILaunchConfiguration config, String gdbVersion) throws CoreException {
return LaunchUtils.getGDBPath(config).toString().trim() + " (" + gdbVersion +")"; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* This method takes care of cleaning up any resources allocated by the launch, as early as
* the call to getLaunch(), whenever the launch is cancelled or does not complete properly.