From e1b824466e0610004eec173e7afa255e0f25a3e9 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 29 May 2006 21:52:21 +0000 Subject: [PATCH] Bug 108472: Debug continues to fail. --- .../cdt/debug/core/DebugCoreMessages.properties | 1 - .../cdt/debug/internal/core/model/CDebugTarget.java | 13 +++++++++---- .../core/model/CoreModelMessages.properties | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties index 8d3b14eafa0..0d2d3ba88b4 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties @@ -9,7 +9,6 @@ # QNX Software Systems - initial API and implementation ############################################################################### CDebugCorePlugin.0=No such debugger -CDebugModel.0=Unable to set temporary breakpoint in main.\nReason: {0}\nContinue? CDebugUtils.0=[line: {0}] CDebugUtils.1=[address: {0}] CDebugUtils.2=[function: {0}] diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index 4fd0c783232..ec924a51ff1 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -25,7 +25,6 @@ import org.eclipse.cdt.core.IBinaryParser.ISymbol; import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugUtils; -import org.eclipse.cdt.debug.core.DebugCoreMessages; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.ICDebugConstants; import org.eclipse.cdt.debug.core.ICGlobalVariableManager; @@ -1731,10 +1730,16 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv setInternalTemporaryBreakpoint( location ); } catch( CoreException e ) { - String message = MessageFormat.format( DebugCoreMessages.getString( "CDebugModel.0" ), new String[]{ e.getStatus().getMessage() } ); //$NON-NLS-1$ + boolean isTerminated = getCDITarget().isTerminated(); + if ( isTerminated ) { + String message = MessageFormat.format( CoreModelMessages.getString( "CDebugTarget.0" ), new String[]{ stopSymbol } ); //$NON-NLS-1$ + MultiStatus status = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(), IStatus.OK, message, null ); + status.add( e.getStatus() ); + throw new DebugException( status ); + } + String message = MessageFormat.format( CoreModelMessages.getString( "CDebugTarget.2" ), new String[]{ stopSymbol, e.getStatus().getMessage() } ); //$NON-NLS-1$ IStatus newStatus = new Status( IStatus.WARNING, e.getStatus().getPlugin(), ICDebugInternalConstants.STATUS_CODE_QUESTION, message, null ); if ( !CDebugUtils.question( newStatus, this ) ) { - terminate(); throw new DebugException( new Status( IStatus.OK, e.getStatus().getPlugin(), e.getStatus().getCode(), e.getStatus().getMessage(), null ) ); } } @@ -1748,7 +1753,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv setInternalTemporaryBreakpoint( location ); } catch( CoreException e ) { - String message = MessageFormat.format( DebugCoreMessages.getString( "CDebugModel.0" ), new String[]{ e.getStatus().getMessage() } ); //$NON-NLS-1$ + String message = MessageFormat.format( CoreModelMessages.getString( "CDebugTarget.2" ), new String[]{ mainSymbol, e.getStatus().getMessage() } ); //$NON-NLS-1$ IStatus newStatus = new Status( IStatus.WARNING, e.getStatus().getPlugin(), ICDebugInternalConstants.STATUS_CODE_QUESTION, message, null ); if ( !CDebugUtils.question( newStatus, this ) ) { terminate(); diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CoreModelMessages.properties b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CoreModelMessages.properties index b62c44c0f32..ab70ef71661 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CoreModelMessages.properties +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CoreModelMessages.properties @@ -12,6 +12,8 @@ CDebugTarget.Unable_to_get_globals_1=Unable to get globals. Reason: CArrayPartition.0=Type is not available. CArrayPartition.1=Qualified name is not available. CDebugTarget.1=Execution is suspended because of error. +CDebugTarget.0=Error stopping at {0}. +CDebugTarget.2=Error stopping at {0}.\nReason: {1}\nContinue? CModificationVariable.0=Unable to set value. CModificationVariable.1=Unable to set value. CStackFrame.0={0} at {1}: {2}