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

getBytesFromAddress() would return null ifgetAddressableSize() was called first

This commit is contained in:
John Cortell 2007-11-30 22:38:45 +00:00
parent faf69d0940
commit 97c41a004d

View file

@ -189,7 +189,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
*/
public MemoryByte[] getBytesFromAddress( BigInteger address, long length ) throws DebugException {
ICDIMemoryBlock cdiBlock = getCDIBlock();
if ( cdiBlock == null ||
if ( fBytes == null || cdiBlock == null ||
cdiBlock.getStartAddress().compareTo( address ) > 0 ||
cdiBlock.getStartAddress().add( BigInteger.valueOf( cdiBlock.getLength()/cdiBlock.getWordSize() ) ).compareTo( address.add( BigInteger.valueOf( length ) ) ) < 0 ) {
synchronized( this ) {