diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java index b35599bc99a..a6725458419 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/ErrorParser.java @@ -7,11 +7,13 @@ * * Contributors: * Red Hat Inc. - initial API and implementation + * Sergey Prigogin (Google) *******************************************************************************/ package org.eclipse.cdt.internal.autotools.core; import java.io.File; import java.io.FileReader; +import java.io.IOException; import java.io.LineNumberReader; import java.lang.reflect.Method; import java.util.regex.Matcher; @@ -29,11 +31,10 @@ import org.eclipse.core.runtime.Path; // possibly other data in the future. The standard CDT ErrorParserManager doesn't allow // us to pass an extended ProblemMarkerInfo, so we are forced to have our own mechanism // which is similar to the CDT one. -public class ErrorParser extends MarkerGenerator implements IErrorParser{ - +public class ErrorParser extends MarkerGenerator implements IErrorParser { public static final String ID = AutotoolsPlugin.PLUGIN_ID + ".errorParser"; //$NON-NLS-1$ private Pattern pkgconfigError = - Pattern.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$ + Pattern.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$ private Pattern genconfigError = Pattern.compile(".*?configure:\\s+error:\\s+(.*)"); //$NON-NLS-1$ private Pattern checkingFail = @@ -54,6 +55,7 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{ this.sourcePath = sourcePath; } + @Override public boolean processLine(String line, org.eclipse.cdt.core.ErrorParserManager eoParser) { @@ -149,10 +151,9 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{ if (!file.exists()) return null; - FileReader stream; + LineNumberReader reader = null; try { - stream = new FileReader(file); - LineNumberReader reader = new LineNumberReader(stream); + reader = new LineNumberReader(new FileReader(file)); // look for something like: // if test "${ac_cv_prog_WINDRES+set}" = set; then : @@ -179,10 +180,16 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{ } line = reader.readLine(); } - stream.close(); - } catch (Exception e) { throw new RuntimeException(e); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + // Ignore. + } + } } return null; @@ -196,31 +203,34 @@ public class ErrorParser extends MarkerGenerator implements IErrorParser{ * @return */ private int getErrorConfigLineNumber(String name) { + LineNumberReader reader = null; try { File file = new File(buildDir + "/config.log"); // If the log file is not present there is nothing we can do. if (!file.exists()) return -1; - FileReader stream = new FileReader(file); - LineNumberReader reader = new LineNumberReader(stream); + reader = new LineNumberReader(new FileReader(file)); - Pattern errorPattern = Pattern - .compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$ - String line = reader.readLine(); - while (line != null) { + Pattern errorPattern = + Pattern.compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$ + String line; + while ((line = reader.readLine()) != null) { Matcher m = errorPattern.matcher(line); - if (m.matches()) { return Integer.parseInt(m.group(1)); } - - line = reader.readLine(); } - stream.close(); - } catch (Exception e) { return -1; + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + // Ignore. + } + } } return -1; } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 57808cc7664..53a03726d83 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -5787,7 +5787,7 @@ public class AST2TemplateTests extends AST2BaseTest { parseAndCheckBindings(); } - // template class TT> struct CTT { + // template class TT> struct CTT { // int y; // }; // template struct CT { @@ -5800,4 +5800,19 @@ public class AST2TemplateTests extends AST2BaseTest { public void testSpecializationOfClassType_368610c() throws Exception { parseAndCheckBindings(); } + + //struct A { + // int m(int i) const; + // void m() const; + //}; + // + //template struct B { + // typedef int (T::*Method)(int) const; + // B(Method p) {} + //}; + // + //B a(&A::m); + public void testConstInTypeParameter_377223() throws Exception { + parseAndCheckBindings(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java index 65206c1d7aa..c84ee84c4b6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java @@ -2352,9 +2352,9 @@ public class CPPSemantics { } public static IBinding resolveFunction(LookupData data, ICPPFunction[] fns, boolean allowUDC) throws DOMException { - fns= ArrayUtil.trim(ICPPFunction.class, fns); - if (fns == null || fns.length == 0) + if (fns == null || fns.length == 0 || fns[0] == null) return null; + fns= ArrayUtil.trim(fns); sortAstBeforeIndex(fns); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java index 8b514346c83..98763fc3a8b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java @@ -46,6 +46,7 @@ import org.eclipse.cdt.core.dom.ast.IEnumerator; import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IFunctionType; import org.eclipse.cdt.core.dom.ast.IProblemBinding; +import org.eclipse.cdt.core.dom.ast.IQualifierType; import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.ISemanticProblem; import org.eclipse.cdt.core.dom.ast.IType; @@ -1190,6 +1191,9 @@ public class CPPTemplates { ICPPPointerToMemberType ptm = (ICPPPointerToMemberType) typeContainer; IType memberOfClass = ptm.getMemberOfClass(); IType newMemberOfClass = instantiateType(memberOfClass, tpMap, packOffset, within); + if (newMemberOfClass instanceof IQualifierType) { + newMemberOfClass = ((IQualifierType) newMemberOfClass).getType(); + } if (!(newMemberOfClass instanceof ICPPClassType || newMemberOfClass instanceof UniqueType || newMemberOfClass instanceof ICPPUnknownBinding)) { return new ProblemType(ISemanticProblem.BINDING_INVALID_TYPE); diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java index 9f39ff8e319..eca556d38dc 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java @@ -918,7 +918,7 @@ outer: for (IErrorParser[] parsers : fErrorParsers.values()) { for (IErrorParser parser : parsers) { if (parser instanceof IErrorParser3) { - ((IErrorParser3) parser).streamFinished(); + ((IErrorParser3) parser).shutdown(); } } } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IConsoleParser.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IConsoleParser.java index ca41651e021..898b27e64a9 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IConsoleParser.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IConsoleParser.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation + * IBM - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core; @@ -24,8 +24,8 @@ public interface IConsoleParser { public boolean processLine(String line); /** - * Finalization of a console parser when the stream is closed. + * Called to let the parser know that the end of the error stream has been reached. + * Can be used by the parser to flush its internal buffers. */ public void shutdown(); - } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IErrorParser3.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IErrorParser3.java index 61bfda836ba..92c2ac2b26b 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IErrorParser3.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IErrorParser3.java @@ -15,7 +15,8 @@ package org.eclipse.cdt.core; */ public interface IErrorParser3 extends IErrorParser2 { /** - * Notification that the stream of data to parse has ended. + * Called to let the parser know that the end of the error stream has been reached. + * Can be used by the parser to flush its internal buffers. */ - void streamFinished(); + void shutdown(); } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/ErrorParserExtensionManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/ErrorParserExtensionManager.java index b3b58aa4a1a..e2ec9d561de 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/ErrorParserExtensionManager.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/ErrorParserExtensionManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2011 Andrew Gvozdev (Quoin Inc.) and others. + * Copyright (c) 2009, 2012 Andrew Gvozdev (Quoin Inc.) 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 @@ -7,8 +7,8 @@ * * Contributors: * Andrew Gvozdev (Quoin Inc.) - initial API and implementation + * Alex Ruiz (Google) *******************************************************************************/ - package org.eclipse.cdt.internal.errorparsers; import static org.eclipse.cdt.core.ErrorParserContext.BUILD; @@ -25,8 +25,8 @@ import java.util.Set; import java.util.TreeSet; import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.ErrorParserManager; import org.eclipse.cdt.core.ErrorParserContext; +import org.eclipse.cdt.core.ErrorParserManager; import org.eclipse.cdt.core.IErrorParser; import org.eclipse.cdt.core.IErrorParserNamed; import org.eclipse.cdt.core.IMarkerGenerator; @@ -52,8 +52,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * ErrorParserExtensionManager manages error parser extensions, serialization and preferences - * + * ErrorParserExtensionManager manages error parser extensions, serialization and preferences. */ public class ErrorParserExtensionManager { private static final String STORAGE_ERRORPARSER_EXTENSIONS = "model.extensions.xml"; //$NON-NLS-1$ @@ -396,7 +395,7 @@ public class ErrorParserExtensionManager { IErrorParser errorParser = errorParserNamed; if (errorParser instanceof ErrorParserNamedWrapper) - errorParser = ((ErrorParserNamedWrapper)errorParser).getErrorParser(); + errorParser = ((ErrorParserNamedWrapper) errorParser).getErrorParser(); // Element elementExtension = XmlUtil.appendElement(elementPlugin, ELEM_EXTENSION, new String[] { @@ -413,7 +412,7 @@ public class ErrorParserExtensionManager { }); if (errorParserNamed instanceof RegexErrorParser) { - RegexErrorParser regexErrorParser = (RegexErrorParser)errorParserNamed; + RegexErrorParser regexErrorParser = (RegexErrorParser) errorParserNamed; RegexErrorPattern[] patterns = regexErrorParser.getPatterns(); for (RegexErrorPattern pattern : patterns) { @@ -521,7 +520,7 @@ public class ErrorParserExtensionManager { if (ce.getAttribute(ATTR_CLASS)!=null) { IErrorParser ep = (IErrorParser)ce.createExecutableExtension(ATTR_CLASS); if (ep instanceof IErrorParserNamed) { - errorParser = (IErrorParserNamed)ep; + errorParser = (IErrorParserNamed) ep; errorParser.setId(initialId); errorParser.setName(initialName); } else if (ep!=null) { @@ -546,7 +545,7 @@ public class ErrorParserExtensionManager { errorParser.setId(id); errorParser.setName(name); if (errorParser instanceof RegexErrorParser) { - RegexErrorParser regexErrorParser = (RegexErrorParser)errorParser; + RegexErrorParser regexErrorParser = (RegexErrorParser) errorParser; NodeList patternNodes = errorparserNode.getChildNodes(); for (int ipat=0;ipat pair = fAvailableErrorParsers.get(id); IErrorParserNamed errorParser = pair.first; if (errorParser instanceof ErrorParserNamedWrapper) - return ((ErrorParserNamedWrapper)errorParser).getErrorParser(); + return ((ErrorParserNamedWrapper) errorParser).getErrorParser(); return errorParser; } @@ -748,10 +747,10 @@ public class ErrorParserExtensionManager { * @return default error parsers IDs to be used if error parser list is empty. */ public static String[] getDefaultErrorParserIds() { - if (fDefaultErrorParserIds==null) { - return fAvailableErrorParsers.keySet().toArray(new String[0]); + if (fDefaultErrorParserIds == null) { + return getErrorParserIds(fAvailableErrorParsers, BUILD); } - return fDefaultErrorParserIds.toArray(new String[0]); + return fDefaultErrorParserIds.toArray(new String[fDefaultErrorParserIds.size()]); } /** @@ -777,15 +776,15 @@ public class ErrorParserExtensionManager { int context) { Pair pair = isExtension ? fExtensionErrorParsers.get(id) : fAvailableErrorParsers.get(id); - if (!isInContext(pair, context)) { + if (pair == null || !isInContext(pair, context)) { return null; } IErrorParserNamed errorParser = pair.first; try { if (errorParser instanceof RegexErrorParser) { - return (RegexErrorParser) ((RegexErrorParser)errorParser).clone(); + return (RegexErrorParser) ((RegexErrorParser) errorParser).clone(); } else if (errorParser instanceof ErrorParserNamedWrapper) { - return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper)errorParser).clone(); + return (ErrorParserNamedWrapper) ((ErrorParserNamedWrapper) errorParser).clone(); } } catch (CloneNotSupportedException e) { CCorePlugin.log(e); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java index 4af23c88ed1..86cc18fe4a8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java @@ -96,61 +96,43 @@ public class CReconciler extends MonoReconciler { public boolean isConflicting(ISchedulingRule rule) { return rule == this; } - } /** * Internal part listener for activating the reconciler. */ private class PartListener implements IPartListener2 { - /* - * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference) - */ @Override public void partActivated(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partBroughtToTop(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partClosed(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partDeactivated(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partHidden(IWorkbenchPartReference partRef) { if (partRef.getPart(false) == fTextEditor) { setEditorActive(false); } } - /* - * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partInputChanged(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partOpened(IWorkbenchPartReference partRef) { } - /* - * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference) - */ + @Override public void partVisible(IWorkbenchPartReference partRef) { if (partRef.getPart(false) == fTextEditor) { @@ -164,7 +146,6 @@ public class CReconciler extends MonoReconciler { * Internal Shell activation listener for activating the reconciler. */ private class ActivationListener extends ShellAdapter { - private Control fControl; public ActivationListener(Control control) { @@ -172,9 +153,6 @@ public class CReconciler extends MonoReconciler { fControl= control; } - /* - * @see org.eclipse.swt.events.ShellListener#shellActivated(org.eclipse.swt.events.ShellEvent) - */ @Override public void shellActivated(ShellEvent e) { if (!fControl.isDisposed() && fControl.isVisible()) { @@ -184,9 +162,6 @@ public class CReconciler extends MonoReconciler { } } - /* - * @see org.eclipse.swt.events.ShellListener#shellDeactivated(org.eclipse.swt.events.ShellEvent) - */ @Override public void shellDeactivated(ShellEvent e) { if (!fControl.isDisposed() && fControl.getShell() == e.getSource()) { @@ -199,9 +174,6 @@ public class CReconciler extends MonoReconciler { * Internal C element changed listener */ private class ElementChangedListener implements IElementChangedListener { - /* - * @see org.eclipse.cdt.core.model.IElementChangedListener#elementChanged(org.eclipse.cdt.core.model.ElementChangedEvent) - */ @Override public void elementChanged(ElementChangedEvent event) { if (event.getType() == ElementChangedEvent.POST_CHANGE) { @@ -246,9 +218,6 @@ public class CReconciler extends MonoReconciler { private class IndexerListener implements IIndexerStateListener, IIndexChangeListener { private boolean fIndexChanged; - /* - * @see org.eclipse.cdt.core.index.IIndexerStateListener#indexChanged(org.eclipse.cdt.core.index.IIndexerStateEvent) - */ @Override public void indexChanged(IIndexerStateEvent event) { if (event.indexerIsIdle()) { @@ -263,9 +232,6 @@ public class CReconciler extends MonoReconciler { } } - /* - * @see org.eclipse.cdt.core.index.IIndexChangeListener#indexChanged(org.eclipse.cdt.core.index.IIndexChangeEvent) - */ @Override public void indexChanged(IIndexChangeEvent event) { if (!fIndexChanged && isRelevantProject(event.getAffectedProject())) { @@ -305,9 +271,6 @@ public class CReconciler extends MonoReconciler { fTextEditor= editor; } - /* - * @see org.eclipse.jface.text.reconciler.IReconciler#install(org.eclipse.jface.text.ITextViewer) - */ @Override public void install(ITextViewer textViewer) { super.install(textViewer); @@ -335,9 +298,6 @@ public class CReconciler extends MonoReconciler { }}); } - /* - * @see org.eclipse.jface.text.reconciler.IReconciler#uninstall() - */ @Override public void uninstall() { fTriggerReconcilerJob.cancel(); @@ -369,9 +329,6 @@ public class CReconciler extends MonoReconciler { } } - /* - * @see org.eclipse.jface.text.reconciler.AbstractReconciler#forceReconciling() - */ @Override protected void forceReconciling() { if (!fInitialProcessDone) @@ -379,18 +336,12 @@ public class CReconciler extends MonoReconciler { super.forceReconciling(); } - /* - * @see org.eclipse.jface.text.reconciler.AbstractReconciler#aboutToBeReconciled() - */ @Override protected void aboutToBeReconciled() { - CCompositeReconcilingStrategy strategy= (CCompositeReconcilingStrategy)getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); + CCompositeReconcilingStrategy strategy= (CCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); strategy.aboutToBeReconciled(); } - /* - * @see org.eclipse.jface.text.reconciler.MonoReconciler#initialProcess() - */ @Override protected void initialProcess() { super.initialProcess(); @@ -400,9 +351,6 @@ public class CReconciler extends MonoReconciler { } } - /* - * @see org.eclipse.jface.text.reconciler.MonoReconciler#process(org.eclipse.jface.text.reconciler.DirtyRegion) - */ @Override protected void process(DirtyRegion dirtyRegion) { fIsReconciling= true; @@ -469,7 +417,6 @@ public class CReconciler extends MonoReconciler { return false; } - private boolean isRelevantProject(ICProject affectedProject) { if (affectedProject == null) { return false; @@ -499,5 +446,4 @@ public class CReconciler extends MonoReconciler { } return false; } - } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java index 6d93ad17912..7ce98f2e180 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2011 Ericsson and others. + * Copyright (c) 2008, 2012 Ericsson 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 @@ -9,6 +9,7 @@ * Ericsson - initial API and implementation * Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306) * John Dallaway - GDB 7.x MI thread details field ignored (Bug 325556) + * Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748) *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.service; @@ -118,7 +119,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService */ @Immutable private static class MIExecutionDMC extends AbstractDMContext - implements IMIExecutionDMContext + implements IMIExecutionDMContext, IDisassemblyDMContext { /** * String ID that is used to identify the thread in the GDB/MI protocol. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java index 250782a5027..c590274c35a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIProcesses.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Ericsson and others. + * Copyright (c) 2008, 2012 Ericsson 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 @@ -7,6 +7,7 @@ * * Contributors: * Ericsson - initial API and implementation + * Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service; @@ -76,7 +77,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa */ @Immutable private static class MIExecutionDMC extends AbstractDMContext - implements IMIExecutionDMContext + implements IMIExecutionDMContext, IDisassemblyDMContext { /** * String ID that is used to identify the thread in the GDB/MI protocol. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java index b9a97767985..b15021870f3 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java @@ -10,6 +10,7 @@ * Ericsson AB - Modified for handling of multiple threads * Vladimir Prus (Mentor Graphics) - Add proper stop reason for step return (Bug 362274) * Indel AG - [369622] fixed moveToLine using MinGW + * Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service; @@ -37,6 +38,7 @@ import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext; import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext; import org.eclipse.cdt.dsf.debug.service.IBreakpointsExtension.IBreakpointHitDMEvent; import org.eclipse.cdt.dsf.debug.service.ICachingService; +import org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext; import org.eclipse.cdt.dsf.debug.service.IProcesses; import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext; import org.eclipse.cdt.dsf.debug.service.command.BufferedCommandControl; @@ -93,7 +95,7 @@ import org.osgi.framework.BundleContext; */ public class MIRunControl extends AbstractDsfService implements IMIRunControl, ICachingService { - private static class MIExecutionDMC extends AbstractDMContext implements IMIExecutionDMContext + private static class MIExecutionDMC extends AbstractDMContext implements IMIExecutionDMContext, IDisassemblyDMContext { /** * Integer ID that is used to identify the thread in the GDB/MI protocol.