From bbf27fec225c83c5d904c8c2425081a161b2c8ce Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Mon, 22 Dec 2014 10:10:27 -0500 Subject: [PATCH] Bug 455408 - Improve GDB label in the debug view Change-Id: Iff449cd71f57ebcd9c8888f9958853323a6b7c2b Signed-off-by: Marc Khouzam Reviewed-on: https://git.eclipse.org/r/38679 Tested-by: Hudson CI Reviewed-by: Mikhail Khodjaiants --- .../cdt/dsf/gdb/launching/GdbLaunchDelegate.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java index 69d52b2482d..dce6820febc 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java @@ -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.