Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2010-11-12 12:48:01 -0500
committerAnton Leherbauer2010-11-12 12:48:01 -0500
commit1e2b8c24bb69dc28b33c03efd2b61c18252c7fb8 (patch)
tree820beaf3f5b298dc292af93600ad83997518d049 /debug/org.eclipse.cdt.debug.ui
parentd0907f8bec0adc6d5b7235ef11dab7876771c7cc (diff)
downloadorg.eclipse.cdt-1e2b8c24bb69dc28b33c03efd2b61c18252c7fb8.tar.gz
org.eclipse.cdt-1e2b8c24bb69dc28b33c03efd2b61c18252c7fb8.tar.xz
org.eclipse.cdt-1e2b8c24bb69dc28b33c03efd2b61c18252c7fb8.zip
Bug 329682 - Restore backwards compatibility
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/AbstractDisassemblyBackend.java37
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java12
3 files changed, 42 insertions, 13 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/AbstractDisassemblyBackend.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/AbstractDisassemblyBackend.java
new file mode 100644
index 0000000000..ac1f9f15fc
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/AbstractDisassemblyBackend.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Freescale Semiconductor - refactoring
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
+
+import java.math.BigInteger;
+
+public abstract class AbstractDisassemblyBackend implements IDisassemblyBackend {
+
+ protected IDisassemblyPartCallback fCallback;
+
+ protected AbstractDisassemblyBackend() {
+ }
+
+ public void init(IDisassemblyPartCallback callback) {
+ assert callback != null;
+ fCallback = callback;
+ }
+
+ /**
+ * Evaluate the symbol address.
+ *
+ * @param symbol the symbol
+ * @param suppressError true to suppress error dialogs
+ * @return the address, <code>null</code> if failed to evaluate symbol
+ */
+ public abstract BigInteger evaluateSymbolAddress(String symbol, boolean suppressError);
+
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java
index 87c0bb721f..116eb87669 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java
@@ -57,9 +57,8 @@ import com.ibm.icu.text.MessageFormat;
* The CDI backend to the DSF disassembly view.
*
*/
-public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSetListener {
+public class DisassemblyBackendCdi extends AbstractDisassemblyBackend implements IDebugEventSetListener {
- private IDisassemblyPartCallback fCallback;
private ICThread fTargetContext;
private String fCdiSessionId;
private ICStackFrame fTargetFrameContext;
@@ -74,8 +73,7 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#init(org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyPartCallback)
*/
public void init(IDisassemblyPartCallback callback) {
- assert callback != null;
- fCallback = callback;
+ super.init(callback);
DebugPlugin.getDefault().addDebugEventListener(this);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java
index 0e65121e8c..dfba77dcf0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java
@@ -22,6 +22,9 @@ import org.eclipse.jface.text.Position;
* DSF backends. This interface is obtained through IAdaptable. A new instance
* is provided every time the adapter is requested. The caller must invoke
* {@link #dispose()} when it has no further use for the instance.
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * Clients should extend {@link AbstractDisassemblyBackend}.
*/
public interface IDisassemblyBackend {
@@ -142,15 +145,6 @@ public interface IDisassemblyBackend {
Object insertSource(Position pos, BigInteger address, final String file, int lineNumber);
void gotoSymbol(String symbol);
-
- /**
- * Evaluate the symbol address.
- *
- * @param symbol the symbol
- * @param suppressError true to suppress error dialogs
- * @return the address, <code>null</code> if failed to evaluate symbol
- */
- BigInteger evaluateSymbolAddress(String symbol, boolean suppressError);
/**
* Retrieves disassembly of the code generated by a source file, starting at

Back to the top