Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 157023 Details for
Bug 300586
Error logged by DsfSuspendTrigger.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix with better error handling.
20100122_300586.patch (text/plain), 5.02 KB, created by
Pawel Piech
on 2010-01-22 19:58:34 EST
(
hide
)
Description:
Fix with better error handling.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2010-01-22 19:58:34 EST
Size:
5.02 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.dsf >Index: src/org/eclipse/cdt/dsf/concurrent/CountingRequestMonitor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/CountingRequestMonitor.java,v >retrieving revision 1.4 >diff -u -r1.4 CountingRequestMonitor.java >--- src/org/eclipse/cdt/dsf/concurrent/CountingRequestMonitor.java 21 Sep 2009 16:07:10 -0000 1.4 >+++ src/org/eclipse/cdt/dsf/concurrent/CountingRequestMonitor.java 23 Jan 2010 00:56:12 -0000 >@@ -115,8 +115,8 @@ > > @Override > public synchronized void setStatus(IStatus status) { >- if ((getStatus() instanceof MultiStatus)) { >- ((MultiStatus)getStatus()).add(status); >+ if ((getStatus() instanceof DsfMultiStatus)) { >+ ((DsfMultiStatus)getStatus()).add(status); > } > }; > } >Index: src/org/eclipse/cdt/dsf/concurrent/DsfMultiStatus.java >=================================================================== >RCS file: src/org/eclipse/cdt/dsf/concurrent/DsfMultiStatus.java >diff -N src/org/eclipse/cdt/dsf/concurrent/DsfMultiStatus.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/cdt/dsf/concurrent/DsfMultiStatus.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,67 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Wind River 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Wind River Systems - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.cdt.dsf.concurrent; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.MultiStatus; >+ >+/** >+ * Multi-status that calculates the maximum error code for all children. >+ * >+ * @since 2.1 >+ */ >+public class DsfMultiStatus extends MultiStatus { >+ >+ /** >+ * Creates and returns a new multi-status object with the given children. >+ * >+ * @param pluginId the unique identifier of the relevant plug-in >+ * @param code the plug-in-specific status code >+ * @param newChildren the list of children status objects >+ * @param message a human-readable message, localized to the >+ * current locale >+ * @param exception a low-level exception, or <code>null</code> if not >+ * applicable >+ */ >+ public DsfMultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) { >+ super(pluginId, code, newChildren, message, exception); >+ } >+ >+ /** >+ * Creates and returns a new multi-status object with no children. >+ * >+ * @param pluginId the unique identifier of the relevant plug-in >+ * @param code the plug-in-specific status code >+ * @param message a human-readable message, localized to the >+ * current locale >+ * @param exception a low-level exception, or <code>null</code> if not >+ * applicable >+ */ >+ public DsfMultiStatus(String pluginId, int code, String message, Throwable exception) { >+ super(pluginId, code, message, exception); >+ } >+ >+ @Override >+ public int getCode() { >+ IStatus[] children = getChildren(); >+ if (children.length != 0) { >+ int maxCode = Integer.MIN_VALUE; >+ for (IStatus status : children) { >+ if (status.getCode() > maxCode) { >+ maxCode = status.getCode(); >+ } >+ } >+ return maxCode; >+ } else { >+ return super.getCode(); >+ } >+ } >+} >#P org.eclipse.cdt.dsf.gdb >Index: src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java,v >retrieving revision 1.9 >diff -u -r1.9 GDBControl.java >--- src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java 7 Jul 2009 19:33:02 -0000 1.9 >+++ src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java 23 Jan 2010 00:56:13 -0000 >@@ -22,6 +22,7 @@ > import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; > import org.eclipse.cdt.dsf.concurrent.DsfRunnable; > import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants; >+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor; > import org.eclipse.cdt.dsf.concurrent.RequestMonitor; > import org.eclipse.cdt.dsf.concurrent.Sequence; > import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent; >@@ -419,7 +420,7 @@ > IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, > true, null)) { > // If the inferior finishes, let's terminate GDB >- terminate(new RequestMonitor(getExecutor(), null)); >+ terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null)); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
pawel.1.piech
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 300586
: 157023 |
157803