1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +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 2004-11-26 Mikhail Khodjaiants
Do not use "void" if parameter's list is empty when constructing a function or 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. 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(); String opcode = instructions[i].getOpcode();
if ( opcode.length() > maxOpcodeLength ) if ( opcode.length() > maxOpcodeLength )
maxOpcodeLength = opcode.length(); maxOpcodeLength = opcode.length();
if ( instructions[i].getOffset() > maxOffset ) { long offset = Math.abs( instructions[i].getOffset() );
maxOffset = instructions[i].getOffset(); if ( offset > maxOffset ) {
maxOffset = offset;
} }
} }
} }
@ -249,7 +250,9 @@ public class DisassemblyEditorInput implements IEditorInput {
if ( functionName != null && functionName.length() > 0 ) { if ( functionName != null && functionName.length() > 0 ) {
sb.append( '<' ); sb.append( '<' );
sb.append( functionName ); sb.append( functionName );
if ( instruction.getOffset() != 0 ) { long offset = instruction.getOffset();
if ( offset != 0 ) {
if ( offset > 0 )
sb.append( '+' ); sb.append( '+' );
sb.append( instruction.getOffset() ); sb.append( instruction.getOffset() );
} }