mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
[302925] Incorporate John's review feedback
This commit is contained in:
parent
1400363b31
commit
e33b39e5b7
2 changed files with 10 additions and 14 deletions
|
@ -265,6 +265,8 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
if (endAddress.subtract(startAddress).compareTo(addressLength) > 0) {
|
||||
endAddress= startAddress.add(addressLength);
|
||||
}
|
||||
// make sure address range is no less than 32 bytes
|
||||
// this is an attempt to get better a response from the backend (bug 302925)
|
||||
final BigInteger finalEndAddress= startAddress.add(BigInteger.valueOf(32)).max(endAddress);
|
||||
final IDisassemblyRetrieval.DisassemblyRequest disassemblyRequest= new DisassemblyRequest() {
|
||||
@Override
|
||||
|
@ -415,7 +417,7 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
|
||||
assert !fCallback.getUpdatePending();
|
||||
fCallback.setUpdatePending(true);
|
||||
fDisassemblyRetrieval.asyncGetDisassembly(null, endAddress, file, 1, lines, true, disassemblyRequest);
|
||||
fDisassemblyRetrieval.asyncGetDisassembly(null, endAddress, file, 1, lines, mixed, disassemblyRequest);
|
||||
}
|
||||
|
||||
private boolean insertDisassembly(BigInteger startAddress, IDisassemblyBlock disassemblyBlock, boolean mixed, boolean showSymbols, boolean showDisassembly) {
|
||||
|
@ -512,11 +514,11 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
if (instructions.length == 1) {
|
||||
if (p.fAddressLength.compareTo(BigInteger.valueOf(8)) <= 0) {
|
||||
instrLength= p.fAddressLength;
|
||||
}
|
||||
}
|
||||
// if (instructions.length == 1) {
|
||||
// if (p.fAddressLength.compareTo(BigInteger.valueOf(8)) <= 0) {
|
||||
// instrLength= p.fAddressLength;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (instrLength == null) {
|
||||
// cannot determine length of last instruction
|
||||
|
|
|
@ -441,6 +441,8 @@ public class DisassemblyBackendDsf implements IDisassemblyBackend, SessionEndedL
|
|||
* @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#retrieveDisassembly(java.math.BigInteger, java.math.BigInteger, java.lang.String, int, int, boolean, boolean, boolean, int)
|
||||
*/
|
||||
public void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final String file, final int lineNumber, final int lines, boolean mixed, final boolean showSymbols, final boolean showDisassembly, final int linesHint) {
|
||||
// make sure address range is no less than 32 bytes
|
||||
// this is an attempt to get better a response from the backend (bug 302505)
|
||||
final BigInteger finalEndAddress= startAddress.add(BigInteger.valueOf(32)).max(endAddress);
|
||||
|
||||
DsfSession session = getSession();
|
||||
|
@ -609,10 +611,6 @@ public class DisassemblyBackendDsf implements IDisassemblyBackend, SessionEndedL
|
|||
BigInteger instrLength= null;
|
||||
if (j < instructions.length - 1) {
|
||||
instrLength= instructions[j+1].getAdress().subtract(instruction.getAdress()).abs();
|
||||
} else if (instructions.length == 1) {
|
||||
if (p.fAddressLength.compareTo(BigInteger.valueOf(8)) <= 0) {
|
||||
instrLength= p.fAddressLength;
|
||||
}
|
||||
}
|
||||
if (instrLength == null) {
|
||||
// cannot determine length of last instruction
|
||||
|
@ -739,10 +737,6 @@ public class DisassemblyBackendDsf implements IDisassemblyBackend, SessionEndedL
|
|||
if (nextSrcLineIdx >= mixedInstructions.length) {
|
||||
break;
|
||||
}
|
||||
} else if (instructions.length == 1) {
|
||||
if (p.fAddressLength.compareTo(BigInteger.valueOf(8)) <= 0) {
|
||||
instrLength= p.fAddressLength;
|
||||
}
|
||||
}
|
||||
if (instrLength == null) {
|
||||
// cannot determine length of last instruction
|
||||
|
|
Loading…
Add table
Reference in a new issue