1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix for bug 77275: Disassembly causes Java exception for fn's with 0 bytes fn prologues.

This commit is contained in:
Mikhail Khodjaiants 2004-11-09 23:25:44 +00:00
parent 216cc40051
commit ebe5bb2770
2 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,7 @@
2004-11-09 Mikhail Khodjaiants
Fix for bug 77275: Disassembly causes Java exception for fn's with 0 bytes fn prologues.
* DisassemblyBlock.java
2004-11-09 Mikhail Khodjaiants
Partial fix for bug 41725: I can't set a breakpoint in a function where I used attach source.
* CBreakpointManager.java

View file

@ -41,9 +41,9 @@ public class DisassemblyBlock implements IDisassemblyBlock, IAdaptable {
private IAsmSourceLine[] fSourceLines;
private IAddress fStartAddress;
private IAddress fStartAddress = null;
private IAddress fEndAddress;
private IAddress fEndAddress = null;
private boolean fMixedMode = false;
@ -104,6 +104,8 @@ public class DisassemblyBlock implements IDisassemblyBlock, IAdaptable {
public boolean contains( ICStackFrame frame ) {
if ( !getDisassembly().getDebugTarget().equals( frame.getDebugTarget() ) )
return false;
if ( fStartAddress == null || fEndAddress == null )
return false;
IAddress address = frame.getAddress();
return (address.compareTo( fStartAddress ) >= 0 && address.compareTo( fEndAddress ) <= 0);
}
@ -185,13 +187,15 @@ public class DisassemblyBlock implements IDisassemblyBlock, IAdaptable {
}
private void initializeAddresses() {
if ( fSourceLines.length > 0 ) {
IAsmInstruction[] instr = fSourceLines[0].getInstructions();
for ( int i = 0; i < fSourceLines.length; ++i ) {
IAsmInstruction[] instr = fSourceLines[i].getInstructions();
if ( instr.length > 0 ) {
if ( fStartAddress == null )
fStartAddress = instr[0].getAdress();
instr = fSourceLines[fSourceLines.length - 1].getInstructions();
fEndAddress = instr[instr.length - 1].getAdress();
}
}
}
private void setMixedMode( boolean mixedMode ) {
this.fMixedMode = mixedMode;