mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 00:35:49 +02:00
Fix for bug 78604: Disassembly causes Java exception when disassembling beyond fn(?).
This commit is contained in:
parent
407463cb32
commit
e99487c7dd
2 changed files with 7 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-11-15 Mikhail Khodjaiants
|
||||
Fix for bug 78604: Disassembly causes Java exception when disassembling beyond fn(?).
|
||||
* DisassemblyEditorInput.java
|
||||
|
||||
2004-11-11 Mikhail Khodjaiants
|
||||
Fix for bug 73801: Function breakpoints set from C View aren't shown in editor.
|
||||
* ToggleBreakpointAdapter.java
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package org.eclipse.cdt.debug.internal.ui.views.disassembly;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.cdt.core.IAddress;
|
||||
import org.eclipse.cdt.debug.core.CDIDebugModel;
|
||||
import org.eclipse.cdt.debug.core.model.IAsmInstruction;
|
||||
|
@ -219,8 +218,7 @@ public class DisassemblyEditorInput implements IEditorInput {
|
|||
}
|
||||
}
|
||||
}
|
||||
int instrPos = calculateInstructionPosition( maxFunctionName, maxOffset,
|
||||
fBlock.getSourceLines()[0].getInstructions()[0].getAdress().getCharsNum());
|
||||
int instrPos = calculateInstructionPosition( maxFunctionName, maxOffset );
|
||||
int argPosition = instrPos + maxOpcodeLength + 1;
|
||||
if ( fBlock.isMixedMode() )
|
||||
fSourceRegions = new IRegion[mi.length];
|
||||
|
@ -266,8 +264,9 @@ public class DisassemblyEditorInput implements IEditorInput {
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
private int calculateInstructionPosition( int maxFunctionName, long maxOffset, int addressLength ) {
|
||||
private int calculateInstructionPosition( int maxFunctionName, long maxOffset ) {
|
||||
//(Address prefix address representation in chars) + (space) + (<) + (+) + (>) + (:) + (space)
|
||||
int addressLength = getDisassembly().getAddressFactory().getMax().getCharsNum();
|
||||
return ( addressLength + 6 + maxFunctionName + Long.toString( maxOffset ).length() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue