From c8e4f806471b098e74ffb4882b3d69d967f7d9e9 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 25 Aug 2005 21:44:59 +0000 Subject: [PATCH] Bug 66446: Use the debugger path as a debugger process label. --- debug/org.eclipse.cdt.debug.mi.core/ChangeLog | 4 ++++ .../eclipse/cdt/debug/mi/core/GDBCDIDebugger.java | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 061a45c405f..4a947ce9c42 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,7 @@ +2005-08-25 Mikhail Khodjaiants + Bug 66446: Use the debugger path as a debugger process label. + * src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java + 2005-07-28 Alain Magloire Fix Pr 104421: The register did not update. * cdi/org/eclipse/cdt/debug/mi/core/cdi/RegisterManager.java diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java index 94fb5efe636..883d9003d6c 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger.java @@ -80,7 +80,7 @@ public class GDBCDIDebugger implements ICDIDebugger { for (int i = 0; i < dtargets.length; i++) { Process debugger = dsession.getSessionProcess(dtargets[i]); if (debugger != null) { - IProcess debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel()); + IProcess debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel(config)); launch.addProcess(debuggerProcess); } } @@ -252,11 +252,16 @@ public class GDBCDIDebugger implements ICDIDebugger { return fLaunch; } - protected String renderDebuggerProcessLabel() { + protected String renderDebuggerProcessLabel(ILaunchConfiguration config) { String format = "{0} ({1})"; //$NON-NLS-1$ String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis())); - String message = MIPlugin.getResourceString("src.GDBDebugger.Debugger_process"); //$NON-NLS-1$ - return MessageFormat.format(format, new String[]{message, timestamp}); //$NON-NLS-1$ + String label = MIPlugin.getResourceString("src.GDBDebugger.Debugger_process"); //$NON-NLS-1$ + try { + label = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb"); //$NON-NLS-1$ + } + catch( CoreException e ) { + } + return MessageFormat.format(format, new String[]{label, timestamp}); //$NON-NLS-1$ } /**