mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Merge remote-tracking branch 'cdt/master' into sd90
This commit is contained in:
commit
d7542914e9
33 changed files with 108 additions and 61 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2011 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2012 Wind River Systems, 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
|
||||
|
@ -209,7 +209,7 @@ public class BasicCEditorTest extends BaseUITestCase {
|
|||
content= fDocument.get();
|
||||
assertEquals("Save failed", newContent, content);
|
||||
// check reconciler
|
||||
ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
|
||||
ITranslationUnit tUnit= fEditor.getInputCElement();
|
||||
ICElement[] children= tUnit.getChildren();
|
||||
assertEquals(2, children.length);
|
||||
setCaret(content.length());
|
||||
|
@ -287,7 +287,7 @@ public class BasicCEditorTest extends BaseUITestCase {
|
|||
content= fDocument.get().trim();
|
||||
assertEquals("Save failed", newContent, content);
|
||||
// check reconciler
|
||||
ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
|
||||
ITranslationUnit tUnit= fEditor.getInputCElement();
|
||||
ICElement[] children= tUnit.getChildren();
|
||||
assertEquals(4, children.length);
|
||||
setCaret(content.length());
|
||||
|
@ -349,7 +349,7 @@ public class BasicCEditorTest extends BaseUITestCase {
|
|||
content= fDocument.get();
|
||||
assertEquals("Save failed", newContent, content);
|
||||
// check reconciler
|
||||
ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
|
||||
ITranslationUnit tUnit= fEditor.getInputCElement();
|
||||
ICElement[] children= tUnit.getChildren();
|
||||
assertEquals(2, children.length);
|
||||
setCaret(content.length());
|
||||
|
@ -390,7 +390,7 @@ public class BasicCEditorTest extends BaseUITestCase {
|
|||
content= fDocument.get();
|
||||
assertEquals("Save failed", newContent, content);
|
||||
// check reconciler
|
||||
ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
|
||||
ITranslationUnit tUnit= fEditor.getInputCElement();
|
||||
ICElement[] children= tUnit.getChildren();
|
||||
assertEquals(2, children.length);
|
||||
setCaret(content.length());
|
||||
|
@ -459,7 +459,7 @@ public class BasicCEditorTest extends BaseUITestCase {
|
|||
int ngc = 10;
|
||||
while (ref.get() != null && ngc-- > 0) {
|
||||
System.gc();
|
||||
Thread.sleep(200);
|
||||
EditorTestHelper.runEventQueue(200);
|
||||
}
|
||||
assertNull("CEditor instance seems to be leaking after close", ref.get());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2012 IBM Corporation 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
|
||||
|
@ -55,7 +55,9 @@ import org.eclipse.ui.texteditor.ITextEditor;
|
|||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTBreakStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCaseStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDefaultStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDoStatement;
|
||||
|
@ -73,6 +75,7 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfdefStatement;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfndefStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTProblem;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTSwitchStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
|
@ -121,7 +124,7 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
|
|||
}
|
||||
private final Stack<StatementRegion> fStatements;
|
||||
int fLevel= 0;
|
||||
String fFunction= ""; //$NON-NLS-1$
|
||||
Stack<String> fScope= new Stack<String>();
|
||||
|
||||
private StatementVisitor(Stack<StatementRegion> statements) {
|
||||
fStatements = statements;
|
||||
|
@ -239,9 +242,14 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
|
|||
if (declaration instanceof IASTFunctionDefinition) {
|
||||
final IASTFunctionDeclarator declarator = ((IASTFunctionDefinition)declaration).getDeclarator();
|
||||
if (declarator != null) {
|
||||
fFunction= new String(ASTQueries.findInnermostDeclarator(declarator).getName().toCharArray());
|
||||
fScope.push(new String(ASTQueries.findInnermostDeclarator(declarator).getName().toCharArray()));
|
||||
fLevel= 0;
|
||||
}
|
||||
} else if (declaration instanceof IASTSimpleDeclaration) {
|
||||
IASTDeclSpecifier declSpecifier = ((IASTSimpleDeclaration) declaration).getDeclSpecifier();
|
||||
if (declSpecifier instanceof IASTCompositeTypeSpecifier) {
|
||||
fScope.push(new String(((IASTCompositeTypeSpecifier) declSpecifier).getName().toCharArray()));
|
||||
}
|
||||
}
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
@ -249,13 +257,20 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
|
|||
@Override
|
||||
public int leave(IASTDeclaration declaration) {
|
||||
if (declaration instanceof IASTFunctionDefinition) {
|
||||
fFunction= ""; //$NON-NLS-1$
|
||||
if (!fScope.isEmpty())
|
||||
fScope.pop();
|
||||
} else if (declaration instanceof IASTSimpleDeclaration) {
|
||||
IASTDeclSpecifier declSpecifier = ((IASTSimpleDeclaration) declaration).getDeclSpecifier();
|
||||
if (declSpecifier instanceof IASTCompositeTypeSpecifier) {
|
||||
if (!fScope.isEmpty())
|
||||
fScope.pop();
|
||||
}
|
||||
}
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
||||
private StatementRegion createRegion() {
|
||||
return new StatementRegion(fFunction, fLevel);
|
||||
return new StatementRegion(fScope.toString(), fLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
|||
/**
|
||||
* Displays warning message - if any - for selected language settings entry.
|
||||
* Multiline selection is not supported.
|
||||
* @since 5.4
|
||||
*/
|
||||
protected void updateStatusLine() {
|
||||
ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration();
|
||||
|
|
|
@ -236,8 +236,12 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
|
|||
/** Returns resource manager for this plugin */
|
||||
public UIResourceManager getPluginResources() {
|
||||
if (s_resources == null) {
|
||||
s_resources = new UIResourceManager(this);
|
||||
s_resources.setParentManager(CDTVisualizerUIPlugin.getResources());
|
||||
// FindBugs reported that it is unsafe to set s_resources
|
||||
// before we finish to initialize the object, because of
|
||||
// multi-threading. This is why we use a temporary variable.
|
||||
UIResourceManager resourceManager = new UIResourceManager(this);
|
||||
resourceManager.setParentManager(CDTVisualizerUIPlugin.getResources());
|
||||
s_resources = resourceManager;
|
||||
}
|
||||
|
||||
return s_resources;
|
||||
|
@ -245,7 +249,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin
|
|||
|
||||
/** Releases resource manager for this plugin. */
|
||||
public void cleanupPluginResources() {
|
||||
s_resources.dispose();
|
||||
if (s_resources != null) s_resources.dispose();
|
||||
}
|
||||
|
||||
/** Convenience method for getting plugin resource manager */
|
||||
|
|
|
@ -69,6 +69,11 @@ public class VisualizerThread
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return m_pid ^ m_tid ^ m_gdbtid;
|
||||
}
|
||||
|
||||
/** Returns string representation. */
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -215,9 +215,9 @@ public class GdbPinProvider implements IPinProvider {
|
|||
IDMContext dmc = null;
|
||||
if (debugContext instanceof IAdaptable) {
|
||||
dmc = (IDMContext) ((IAdaptable) debugContext).getAdapter(IDMContext.class);
|
||||
sessionId = dmc.getSessionId() + "."; //$NON-NLS-1$
|
||||
|
||||
if (dmc != null) {
|
||||
sessionId = dmc.getSessionId() + "."; //$NON-NLS-1$
|
||||
IMIExecutionDMContext execDmc = getExecutionDmc(dmc);
|
||||
IProcessDMContext processDmc = getProcessDmc(dmc);
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.eclipse.debug.core.commands.IEnabledStateRequest;
|
|||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GdbSelectNextTraceRecordCommand extends AbstractDebugCommand implements ISelectNextTraceRecordHandler {
|
||||
private final DsfExecutor fExecutor;
|
||||
private final DsfServicesTracker fTracker;
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.eclipse.debug.core.commands.IEnabledStateRequest;
|
|||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GdbSelectPrevTraceRecordCommand extends AbstractDebugCommand implements ISelectPrevTraceRecordHandler {
|
||||
private final DsfExecutor fExecutor;
|
||||
private final DsfServicesTracker fTracker;
|
||||
|
|
|
@ -77,7 +77,6 @@ import org.eclipse.ui.PlatformUI;
|
|||
/**
|
||||
* A preference page for settings that are currently only supported in GDB.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GdbDebugPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,6 @@ import org.eclipse.jface.viewers.TreePath;
|
|||
* A specialization of ExpressionVMProvider that uses a GDB-specific variable VM
|
||||
* node. To understand why this is necessary, see GdbVariableVMNode.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GdbExpressionVMProvider extends ExpressionVMProvider {
|
||||
|
||||
private IPropertyChangeListener fPreferencesListener;
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.eclipse.jface.viewers.TreePath;
|
|||
* A specialization of VariableVMProvider that uses a GDB-specific variable VM
|
||||
* node. To understand why this is necessary, see GdbVariableVMNode.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GdbVariableVMProvider extends VariableVMProvider {
|
||||
|
||||
private IPropertyChangeListener fPreferencesListener;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* Ericsson - Initial API and implementation
|
||||
* Wind River Systems - Factored out AbstractContainerVMNode
|
||||
* Patrick Chuong (Texas Instruments) - Add support for icon overlay in the debug view (Bug 334566)
|
||||
* Marc Khouzam (Ericsson) - Respect the "Show Full Path" option for the process name (Bug 378418)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
|
||||
|
@ -32,6 +33,7 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractContainerVMNode;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ExecutionContextLabelText;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants;
|
||||
|
@ -55,6 +57,7 @@ import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
|
|||
import org.eclipse.cdt.dsf.ui.viewmodel.properties.VMDelegatingPropertiesUpdate;
|
||||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
|
||||
|
@ -320,7 +323,14 @@ public class ContainerVMNode extends AbstractContainerVMNode
|
|||
}
|
||||
|
||||
protected void fillThreadDataProperties(IPropertiesUpdate update, IThreadDMData data) {
|
||||
update.setProperty(PROP_NAME, data.getName());
|
||||
String fileName = data.getName();
|
||||
if (fileName != null) {
|
||||
Object showFullPathPreference = getVMProvider().getPresentationContext().getProperty(IDsfDebugUIConstants.DEBUG_VIEW_SHOW_FULL_PATH_PROPERTY);
|
||||
if (showFullPathPreference instanceof Boolean && (Boolean)showFullPathPreference == false) {
|
||||
fileName = new Path(fileName).lastSegment();
|
||||
}
|
||||
}
|
||||
update.setProperty(PROP_NAME, fileName);
|
||||
update.setProperty(ILaunchVMConstants.PROP_ID, data.getId());
|
||||
|
||||
String coresStr = null;
|
||||
|
|
|
@ -36,7 +36,6 @@ import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
|
|||
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbPinProvider;
|
||||
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
||||
import org.eclipse.cdt.dsf.gdb.service.IGDBProcesses.IGdbThreadDMData;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
import org.eclipse.cdt.dsf.ui.concurrent.ViewerCountingRequestMonitor;
|
||||
|
@ -53,6 +52,7 @@ import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
|
|||
import org.eclipse.cdt.dsf.ui.viewmodel.properties.VMDelegatingPropertiesUpdate;
|
||||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
|
||||
|
@ -67,7 +67,6 @@ import org.eclipse.jface.util.PropertyChangeEvent;
|
|||
import org.eclipse.ui.IMemento;
|
||||
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class ThreadVMNode extends AbstractThreadVMNode
|
||||
implements IElementLabelProvider, IElementMementoProvider
|
||||
{
|
||||
|
@ -317,7 +316,7 @@ public class ThreadVMNode extends AbstractThreadVMNode
|
|||
final IThreadDMContext threadDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IThreadDMContext.class);
|
||||
|
||||
if (processService == null || threadDmc == null) {
|
||||
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Service or handle invalid", null)); //$NON-NLS-1$
|
||||
update.setStatus(new Status(IDsfStatusConstants.INVALID_HANDLE, GdbUIPlugin.PLUGIN_ID, "Service or handle invalid", null)); //$NON-NLS-1$
|
||||
} else {
|
||||
processService.getExecutionData(
|
||||
threadDmc,
|
||||
|
|
|
@ -10,15 +10,16 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.internal.service.command.output;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommand;
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandResult;
|
||||
import org.eclipse.cdt.internal.core.ICoreInfo;
|
||||
|
||||
/**
|
||||
* Result obtined from MIMetaGetCPUInfo.
|
||||
* Result obtained from MIMetaGetCPUInfo.
|
||||
* @since 4.1
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class MIMetaGetCPUInfoInfo implements ICommandResult {
|
||||
|
||||
private final ICoreInfo[] fCoresInfo;
|
||||
|
@ -36,6 +37,6 @@ public class MIMetaGetCPUInfoInfo implements ICommandResult {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " (" + getInfo() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return getClass().getSimpleName() + " (" + Arrays.toString(getInfo()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
|
@ -110,7 +110,8 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
|
|||
}
|
||||
}
|
||||
|
||||
private void launchDebugSession( final ILaunchConfiguration config, ILaunch l, IProgressMonitor monitor ) throws CoreException {
|
||||
/** @since 4.1 */
|
||||
protected void launchDebugSession( final ILaunchConfiguration config, ILaunch l, IProgressMonitor monitor ) throws CoreException {
|
||||
if ( monitor.isCanceled() ) {
|
||||
cleanupLaunch();
|
||||
return;
|
||||
|
|
|
@ -65,7 +65,6 @@ import org.osgi.framework.BundleContext;
|
|||
*
|
||||
* @since 4.1
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardwareAndOS, ICachingService {
|
||||
|
||||
@Immutable
|
||||
|
|
|
@ -256,7 +256,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return baseEquals(obj) && (fReference == ((MIBreakpointDMContext) obj).fReference);
|
||||
return baseEquals(obj) && (fReference.equals(((MIBreakpointDMContext)obj).fReference));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -399,7 +399,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
|||
@Override
|
||||
public boolean equals(Object other) {
|
||||
return super.baseEquals(other) &&
|
||||
expression == null ? ((InvalidContextExpressionDMC) other).getExpression() == null : expression.equals(((InvalidContextExpressionDMC) other).getExpression());
|
||||
(expression == null ? ((InvalidContextExpressionDMC) other).getExpression() == null : expression.equals(((InvalidContextExpressionDMC) other).getExpression()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
@ -814,7 +815,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
|||
} catch(IllegalArgumentException e2) {
|
||||
// Message format string invalid. Fallback to just appending the strings.
|
||||
clientMsg.append(message);
|
||||
clientMsg.append(parameters);
|
||||
clientMsg.append(Arrays.toString(parameters));
|
||||
}
|
||||
} else {
|
||||
clientMsg.append(message);
|
||||
|
@ -865,7 +866,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
|||
} catch(IllegalArgumentException e2) {
|
||||
// Message format string invalid. Fallback to just appending the strings.
|
||||
clientMsg.append(message);
|
||||
clientMsg.append(parameters);
|
||||
clientMsg.append(Arrays.toString(parameters));
|
||||
}
|
||||
} else {
|
||||
clientMsg.append(message);
|
||||
|
|
|
@ -36,12 +36,7 @@ public class CLITraceDumpInfo extends MIInfo {
|
|||
// tdump parsed info
|
||||
private String fTracepointNum = null;
|
||||
private String fTraceFrameNumber = null;
|
||||
/*
|
||||
* Timestamp, if present in tracepoint frame data
|
||||
* Note: not yet available in printout of command
|
||||
* "tdump" -> revisit when it is.
|
||||
*/
|
||||
private String timestamp = null;
|
||||
|
||||
// keep the tdump header in parsed result or not - by default we keep
|
||||
private static final boolean KEEP_HEADER = true;
|
||||
|
||||
|
@ -156,7 +151,9 @@ public class CLITraceDumpInfo extends MIInfo {
|
|||
* @return the timestamp of the tracepoint frame
|
||||
*/
|
||||
public String getTimestamp() {
|
||||
return timestamp;
|
||||
// Timestamp not yet available in printout of command
|
||||
// "tdump" -> revisit when it is.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@ public class CLITraceInfo extends MIInfo {
|
|||
for (int i = 0; i < oobs.length; i++) {
|
||||
if (oobs[i] instanceof MIConsoleStreamOutput) {
|
||||
MIStreamRecord cons = (MIStreamRecord) oobs[i];
|
||||
String str = cons.getString();
|
||||
str.trim();
|
||||
String str = cons.getString().trim();
|
||||
if(str.length() > 0 ){
|
||||
Pattern pattern = Pattern.compile("^Tracepoint\\s(\\d+)", Pattern.MULTILINE); //$NON-NLS-1$
|
||||
Matcher matcher = pattern.matcher(str);
|
||||
|
|
|
@ -180,6 +180,9 @@ public class MIParser {
|
|||
case '=' :
|
||||
async = new MINotifyAsyncOutput();
|
||||
break;
|
||||
default :
|
||||
assert false;
|
||||
async = new MINotifyAsyncOutput();
|
||||
}
|
||||
async.setToken(id);
|
||||
// Extract the Async-Class
|
||||
|
@ -212,6 +215,9 @@ public class MIParser {
|
|||
case '&' :
|
||||
stream = new MILogStreamOutput();
|
||||
break;
|
||||
default :
|
||||
assert false;
|
||||
stream = new MIConsoleStreamOutput();
|
||||
}
|
||||
// translateCString() assumes that the leading " is deleted
|
||||
if (buffer.length() > 0 && buffer.charAt(0) == '"') {
|
||||
|
|
|
@ -32,8 +32,8 @@ Export-Package: org.eclipse.cdt.dsf.debug.internal.ui;x-internal:=true,
|
|||
org.eclipse.cdt.dsf.debug.internal.ui.disassembly.provisional;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.disassembly.text;x-internal:=true,
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.disassembly.util;x-internal:=true,
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.preferences;x-internal:=true,
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.viewmodel;x-internal:=true,
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.preferences;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.viewmodel;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.actions;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.detailsupport;x-internal:=true,
|
||||
org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.numberformat.detail;x-internal:=true,
|
||||
|
|
|
@ -54,13 +54,18 @@ public class EvaluationContextManager implements IWindowListener, IDebugContextL
|
|||
@Override
|
||||
public void run() {
|
||||
if ( fgManager == null ) {
|
||||
fgManager = new EvaluationContextManager();
|
||||
// FindBugs reported that it is unsafe to set s_resources
|
||||
// before we finish to initialize the object, because of
|
||||
// multi-threading. This is why we use a temporary variable.
|
||||
EvaluationContextManager manager = new EvaluationContextManager();
|
||||
IWorkbench workbench = PlatformUI.getWorkbench();
|
||||
IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
|
||||
for( int i = 0; i < windows.length; i++ ) {
|
||||
fgManager.windowOpened( windows[i] );
|
||||
manager.windowOpened( windows[i] );
|
||||
}
|
||||
workbench.addWindowListener( fgManager );
|
||||
workbench.addWindowListener( manager );
|
||||
|
||||
fgManager = manager;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -851,7 +851,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
|||
if (positions != null) {
|
||||
positions.removeAll(toRemove);
|
||||
}
|
||||
if (category != CATEGORY_MODEL) {
|
||||
if (!category.equals(CATEGORY_MODEL)) {
|
||||
positions = (List<Position>) getDocumentManagedPositions().get(CATEGORY_MODEL);
|
||||
if (positions != null) {
|
||||
positions.removeAll(toRemove);
|
||||
|
|
|
@ -117,7 +117,7 @@ public class REDRun implements CharSequence {
|
|||
try {
|
||||
return asString();
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -788,7 +788,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
|||
* elements being displayed in this view
|
||||
*/
|
||||
protected void setDebugModel(String id) {
|
||||
if (id != fDebugModelIdentifier) {
|
||||
if (!id.equals(fDebugModelIdentifier)) {
|
||||
fDebugModelIdentifier = id;
|
||||
configureDetailsViewer();
|
||||
}
|
||||
|
|
|
@ -65,8 +65,9 @@ public class VMHandlerUtils {
|
|||
IPartService partService = (IPartService)serviceLocator.getService(IPartService.class);
|
||||
if (partService != null) {
|
||||
part = partService.getActivePart();
|
||||
return getVMProviderForPart(part);
|
||||
}
|
||||
return getVMProviderForPart(part);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
|||
return IModelDelta.EXPAND | IModelDelta.SELECT;
|
||||
}
|
||||
}
|
||||
else if (event instanceof DebugContextEvent && (((DebugContextEvent)event).getFlags() | DebugContextEvent.ACTIVATED) != 0) {
|
||||
else if (event instanceof DebugContextEvent && (((DebugContextEvent)event).getFlags() & DebugContextEvent.ACTIVATED) != 0) {
|
||||
int flags = IModelDelta.NO_CHANGE;
|
||||
if ( Boolean.TRUE.equals(getVMProvider().getPresentationContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION)) ) {
|
||||
flags |= IModelDelta.CONTENT;
|
||||
|
@ -203,7 +203,7 @@ public abstract class AbstractBreakpointVMNode extends AbstractVMNode {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (event instanceof DebugContextEvent && (((DebugContextEvent)event).getFlags() | DebugContextEvent.ACTIVATED) != 0) {
|
||||
else if (event instanceof DebugContextEvent && (((DebugContextEvent)event).getFlags() & DebugContextEvent.ACTIVATED) != 0) {
|
||||
if ( Boolean.TRUE.equals(getVMProvider().getPresentationContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION)) ) {
|
||||
parent.setFlags(parent.getFlags() | IModelDelta.CONTENT);
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ abstract class DataCache<V> {
|
|||
if (!isCanceled()) {
|
||||
fValid = true;
|
||||
fRm = null;
|
||||
set(getData(), getStatus());
|
||||
set(super.getData(), super.getStatus());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -729,9 +729,10 @@ public class SyncRegisterDataAccess {
|
|||
IRegisterGroupDMContext.class);
|
||||
}
|
||||
|
||||
if (dmc != null) {
|
||||
DsfSession session = DsfSession.getSession(dmc.getSessionId());
|
||||
|
||||
if (dmc != null && session != null) {
|
||||
if (session != null) {
|
||||
GetRegisterGroupDataQuery query = new GetRegisterGroupDataQuery(dmc);
|
||||
session.getExecutor().execute(query);
|
||||
|
||||
|
@ -741,6 +742,7 @@ public class SyncRegisterDataAccess {
|
|||
} catch (ExecutionException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -762,9 +764,11 @@ public class SyncRegisterDataAccess {
|
|||
if (element instanceof IDMVMContext) {
|
||||
dmc = DMContexts.getAncestorOfType( ((IDMVMContext) element).getDMContext(), IRegisterDMContext.class );
|
||||
}
|
||||
|
||||
if (dmc != null) {
|
||||
DsfSession session = DsfSession.getSession(dmc.getSessionId());
|
||||
|
||||
if (dmc != null && session != null) {
|
||||
if (session != null) {
|
||||
GetRegisterDataQuery query = new GetRegisterDataQuery(dmc);
|
||||
session.getExecutor().execute(query);
|
||||
|
||||
|
@ -774,6 +778,7 @@ public class SyncRegisterDataAccess {
|
|||
} catch (ExecutionException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -794,9 +799,11 @@ public class SyncRegisterDataAccess {
|
|||
if (element instanceof IDMVMContext) {
|
||||
dmc = DMContexts.getAncestorOfType( ((IDMVMContext) element).getDMContext(), IBitFieldDMContext.class );
|
||||
}
|
||||
DsfSession session = DsfSession.getSession(dmc.getSessionId());
|
||||
|
||||
if (dmc != null && session != null) {
|
||||
if (dmc != null) {
|
||||
DsfSession session = DsfSession.getSession(dmc.getSessionId());
|
||||
|
||||
if (session != null) {
|
||||
GetBitFieldQuery query = new GetBitFieldQuery(dmc);
|
||||
session.getExecutor().execute(query);
|
||||
|
||||
|
@ -806,6 +813,7 @@ public class SyncRegisterDataAccess {
|
|||
} catch (ExecutionException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode
|
|||
if (element instanceof IDMVMContext) {
|
||||
// If update element is a DMC, check if session is still alive.
|
||||
IDMContext dmc = ((IDMVMContext)element).getDMContext();
|
||||
if (dmc.getSessionId() != getSession().getId() || !DsfSession.isSessionActive(dmc.getSessionId())) {
|
||||
if (!dmc.getSessionId().equals(getSession().getId()) || !DsfSession.isSessionActive(dmc.getSessionId())) {
|
||||
handleFailedUpdate(update);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -473,9 +473,9 @@ public class DsfSession
|
|||
if (o1.fListener == o2.fListener) {
|
||||
return 0;
|
||||
} if (o1.fListener instanceof IDsfService && !(o2.fListener instanceof IDsfService)) {
|
||||
return Integer.MIN_VALUE;
|
||||
return -1;
|
||||
} else if (o2.fListener instanceof IDsfService && !(o1.fListener instanceof IDsfService)) {
|
||||
return Integer.MAX_VALUE;
|
||||
return 1;
|
||||
} else if ( (o1.fListener instanceof IDsfService) && (o2.fListener instanceof IDsfService) ) {
|
||||
return ((IDsfService)o1.fListener).getStartupNumber() - ((IDsfService)o2.fListener).getStartupNumber();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue