[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Fix for Disassembly View line offset bug
|
Hi,
Here's a patch for a bug we've seen in the disassembly view (no current
bugzilla exists).
The problem is that clicking in the left hand margin of the disassembly
window seems to set/clear a breakpoint on the line above the one the
users clicks on. This only applies when it is disassembly mode, not
mixed mode c/assembly which works correctly.
The patch no longer increments over the non-existant source line when in
disassembly mode.
The patch should be applied to DisassemblyEditorInput.java which is in
the org.eclipse.cdt.debug.internal.ui.views.disassembly package of the
cdt.debug.ui plugin.
Would it be possible to have the patch applied to both the HEAD and the
2.1.1 branch please ?
(BTW, we have tested the patch on CDT 2.1.1).
Regards,
Tracy Miranda
Altera European Technology Centre (ETC)
<<DisassemblyEditorInput.txt>>
Index: DisassemblyEditorInput.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/disassembly/DisassemblyEditorInput.java,v
retrieving revision 1.15
diff -u -r1.15 DisassemblyEditorInput.java
--- DisassemblyEditorInput.java 2 Dec 2004 21:20:57 -0000 1.15
+++ DisassemblyEditorInput.java 23 Feb 2005 17:39:40 -0000
@@ -169,7 +169,9 @@
int current = 0;
for ( int i = 0; i < lines.length; ++i ) {
IAsmInstruction[] instructions = lines[i].getInstructions();
- ++current;
+ if (fBlock.isMixedMode()) {
+ ++current;
+ }
if ( lineNumber == current && instructions.length > 0 )
return instructions[0].getAdress();
if ( lineNumber > current && lineNumber <= current + instructions.length )