1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Fix for bug 80055: ArrayIndexOutOfBoundsException in DisassemblyView.

This commit is contained in:
Mikhail Khodjaiants 2004-12-02 21:20:57 +00:00
parent 3c6b029ae7
commit 15c37f6a0a
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2004-12-02 Mikhail Khodjaiants
Fix for bug 80055: ArrayIndexOutOfBoundsException in DisassemblyView.
* DisassemblyEditorInput.java
2004-11-26 Mikhail Khodjaiants
Do not use "void" if parameter's list is empty when constructing a function or
method name for function breakpoints. Name mapping should be done on the implementation level.

View file

@ -213,8 +213,9 @@ public class DisassemblyEditorInput implements IEditorInput {
String opcode = instructions[i].getOpcode();
if ( opcode.length() > maxOpcodeLength )
maxOpcodeLength = opcode.length();
if ( instructions[i].getOffset() > maxOffset ) {
maxOffset = instructions[i].getOffset();
long offset = Math.abs( instructions[i].getOffset() );
if ( offset > maxOffset ) {
maxOffset = offset;
}
}
}
@ -249,8 +250,10 @@ public class DisassemblyEditorInput implements IEditorInput {
if ( functionName != null && functionName.length() > 0 ) {
sb.append( '<' );
sb.append( functionName );
if ( instruction.getOffset() != 0 ) {
sb.append( '+' );
long offset = instruction.getOffset();
if ( offset != 0 ) {
if ( offset > 0 )
sb.append( '+' );
sb.append( instruction.getOffset() );
}
sb.append( ">:" ); //$NON-NLS-1$