1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Bugzillas 306829 & 305129.

Randy
This commit is contained in:
Randy Rohrbach 2010-03-23 16:45:00 +00:00
parent dc598d5a5d
commit 5a2bd63d5e
3 changed files with 17 additions and 8 deletions

View file

@ -375,10 +375,13 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
private String getAddressSpacePrefix()
{
String prefixes[] = (String[]) fGotoAddressSpaceControl.getData(KEY_ADDRESS_SPACE_PREFIXES);
if(prefixes.length > 0)
if(fGotoAddressSpaceControl.isVisible())
{
return prefixes[fGotoAddressSpaceControl.getSelectionIndex()];
String prefixes[] = (String[]) fGotoAddressSpaceControl.getData(KEY_ADDRESS_SPACE_PREFIXES);
if(prefixes != null && prefixes.length > 0)
{
return prefixes[fGotoAddressSpaceControl.getSelectionIndex()];
}
}
return "";
}

View file

@ -42,7 +42,7 @@ public class BufferedMemoryWriter
byte[] dataRemainder = new byte[data.length - length];
System.arraycopy(data, length, dataRemainder, 0, data.length - length);
data = dataRemainder;
address = fBufferStart.add(BigInteger.valueOf(length));
address = address.add(BigInteger.valueOf(length));
}
else if(fBufferStart.add(BigInteger.valueOf(fBufferPosition)).compareTo(address) != 0)
{
@ -51,15 +51,15 @@ public class BufferedMemoryWriter
else
{
int availableBufferLength = fBuffer.length - fBufferPosition;
int length = data.length <= fBuffer.length - availableBufferLength
? data.length : fBuffer.length - availableBufferLength;
int length = data.length <= availableBufferLength
? data.length : availableBufferLength;
System.arraycopy(data, 0, fBuffer, fBufferPosition, length);
fBufferPosition += length;
byte[] dataRemainder = new byte[data.length - length];
System.arraycopy(data, length, dataRemainder, 0, data.length - length);
data = dataRemainder;
address = fBufferStart.add(BigInteger.valueOf(length));
address = address.add(BigInteger.valueOf(length));
}
if(fBufferPosition == fBuffer.length)

View file

@ -349,7 +349,13 @@ public class SRecordImporter implements IMemoryImporter {
addressSize = 2;
else if("S2".equals(recordType)) //$NON-NLS-1$
addressSize = 3;
else if("S0".equals(recordType) || "S5".equals(recordType) ||"S7".equals(recordType) ||
"S8".equals(recordType) || "S9".equals(recordType) ) //$NON-NLS-1$
{ // ignore S0, S5, S7, S8 and S9 records
line = reader.readLine();
lineNo++;
continue;
}
try {
recordAddress = new BigInteger(line.substring(position, position + addressSize * 2), 16);
} catch (NumberFormatException ex) {