Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2010-04-28 13:40:17 +0000
committerAnton Leherbauer2010-04-28 13:40:17 +0000
commit2f123dcce2764abaf72376d8402e6e4958e4c257 (patch)
tree7599755c860f9a605f08f8332ff3a1b9c3ca012a /dsf/org.eclipse.cdt.dsf.ui
parentf6da41c4664fe391608f9397d40fe7c6937cb271 (diff)
downloadorg.eclipse.cdt-2f123dcce2764abaf72376d8402e6e4958e4c257.tar.gz
org.eclipse.cdt-2f123dcce2764abaf72376d8402e6e4958e4c257.tar.xz
org.eclipse.cdt-2f123dcce2764abaf72376d8402e6e4958e4c257.zip
Bug 310443 - DSF Disassembly part cannot locate external source files
Bug 310171 - DSF disassembly view doesn't display mixed instructions from multiple files
Diffstat (limited to 'dsf/org.eclipse.cdt.dsf.ui')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index 69b827c9536..c351d119c10 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -24,6 +24,7 @@ import java.util.ListIterator;
import java.util.Map;
import org.eclipse.cdt.core.IAddress;
+import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.AddressRangePosition;
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyPosition;
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.ErrorPosition;
@@ -1625,7 +1626,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
return;
}
if (DEBUG) System.out.println("retrieveDisassembly "+getAddressText(startAddress)+" "+lines+" lines"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- retrieveDisassembly(startAddress, endAddress, lines, fShowSource, false);
+ retrieveDisassembly(startAddress, endAddress, lines, fShowSource, true);
}
/* (non-Javadoc)
@@ -1730,7 +1731,6 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
}
AddressRangePosition pos = fDocument.getPositionOfAddress(address);
assert !(pos instanceof SourcePosition);
- assert pos != null || address.compareTo(fStartAddress) < 0|| address.compareTo(fEndAddress) >= 0;
return pos;
}
@@ -2712,6 +2712,11 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
}
if (sourceElement instanceof File) {
sourceElement = new LocalFileStorage((File)sourceElement);
+ } else if (sourceElement instanceof ITranslationUnit) {
+ IPath location = ((ITranslationUnit) sourceElement).getLocation();
+ if (location != null) {
+ sourceElement = new LocalFileStorage(location.toFile());
+ }
}
if (sourceElement instanceof IStorage) {
if (!(sourceElement instanceof IFile)) {
@@ -2725,9 +2730,11 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
}
}
fFile2Storage.put(file, sourceElement);
- } else {
- fFile2Storage.put(file, null);
+ } else if (sourceElement == null) {
logWarning(DisassemblyMessages.Disassembly_log_error_locateFile+file, null);
+ } else {
+ fFile2Storage.put(file, null);
+ assert false : "missing support for source element of type " + sourceElement.getClass().toString(); //$NON-NLS-1$
}
if (sourceElement instanceof IStorage) {

Back to the top