Index:
ChangeLog =================================================================== RCS
file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v retrieving revision
1.71 diff -u -r1.71 ChangeLog --- ChangeLog 5 Dec 2002 16:02:07
-0000 1.71 +++ ChangeLog 9 Dec 2002 00:55:01 -0000 @@ -1,3 +1,7
@@ +2002-12-08 Mikhail Khodjaiants + Display the error message with
details when program is suspended because of ICDIErrorInfo. + *
CDebugTarget.java + 2002-12-05 Alain
Magloire Some debuggers like gdb/mi can provide detail
information, for example Index:
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java =================================================================== RCS
file:
/home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java,v retrieving
revision 1.59 diff -u -r1.59 CDebugTarget.java ---
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 2 Dec 2002
23:22:22 -0000 1.59 +++
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 9 Dec 2002
00:55:04 -0000 @@ -24,6 +24,7 @@ import
org.eclipse.cdt.debug.core.cdi.ICDICondition; import
org.eclipse.cdt.debug.core.cdi.ICDIConfiguration; import
org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange; +import
org.eclipse.cdt.debug.core.cdi.ICDIErrorInfo; import
org.eclipse.cdt.debug.core.cdi.ICDIExpressionManager; import
org.eclipse.cdt.debug.core.cdi.ICDILocation; import
org.eclipse.cdt.debug.core.cdi.ICDIRegisterObject; @@ -62,7 +63,9
@@ import
org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; import
org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator; import
org.eclipse.cdt.debug.core.sourcelookup.ISourceMode; +import
org.eclipse.cdt.debug.internal.core.CDebugUtils; import
org.eclipse.cdt.debug.internal.core.CMemoryManager; +import
org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants; import
org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint; import
org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLocator; import
org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager; @@ -73,6
+76,9 @@ import org.eclipse.core.resources.IResource; import
org.eclipse.core.runtime.CoreException; import
org.eclipse.core.runtime.IPath; +import
org.eclipse.core.runtime.IStatus; +import
org.eclipse.core.runtime.MultiStatus; +import
org.eclipse.core.runtime.Status; import
org.eclipse.debug.core.DebugEvent; import
org.eclipse.debug.core.DebugException; import
org.eclipse.debug.core.DebugPlugin; @@ -1264,6 +1270,10
@@ { handleWatchpointScope(
(ICDIWatchpointScope)reason ); } + else if (
reason instanceof ICDIErrorInfo
) + { + handleErrorInfo( (ICDIErrorInfo)reason
); + } } private void
handleResumedEvent( ICDIResumedEvent event ) @@ -1327,6 +1337,23
@@ fireSuspendEvent( DebugEvent.UNSPECIFIED
); } + private void handleErrorInfo(
ICDIErrorInfo info ) + { + if ( info != null
) + { + MultiStatus status = new MultiStatus(
CDebugCorePlugin.getUniqueIdentifier(), +
ICDebugInternalConstants.STATUS_CODE_ERROR, +
"The execution of program is suspended because of
error.", +
null ); + status.add( new Status( IStatus.ERROR,
+ status.getPlugin(),
+ ICDebugInternalConstants.STATUS_CODE_ERROR, + info.getDetailMessage(), + null
) ); + CDebugUtils.error( status, this
); + } + } + private void
handleExitedEvent( ICDIExitedEvent event
) { removeAllThreads(); @@ -1339,7
+1366,7 @@ } catch( DebugException e
) { - CDebugCorePlugin.log(
e.getStatus() ); + CDebugCorePlugin.log( e.getStatus()
); } }
|